kNN_IS (homepage)

kNN-IS: An Iterative Spark-based design of the k-Nearest Neighbors classifier for big data.

@JMailloH / (4)

This is an open-source Spark package about an exact k-nearest neighbors classification based on Apache Spark. We take advantage of its in-memory operations to simultaneously classify big amounts of unseen cases against a big training dataset. The map phase computes the k-nearest neighbors in different splits of the training data. Afterwards, multiple reducers process the definitive neighbors from the list obtained in the map phase. The key point of this proposal lies on the management of the test set, maintaining it in memory when it is possible. Otherwise, this is split into a minimum number of pieces, applying a MapReduce per chunk, using the caching skills of Spark to reuse the previously partitioned training set.


Tags

  • 2|ml
  • 2|machine learning
  • 2|mllib
  • 2|classification
  • 2|kNN

How to

Include this package in your Spark Applications using:

spark-shell, pyspark, or spark-submit

> $SPARK_HOME/bin/spark-shell --packages JMailloH:kNN_IS:3.0

sbt

If you use the sbt-spark-package plugin, in your sbt build file, add:

spDependencies += "JMailloH/kNN_IS:3.0"

Otherwise,

resolvers += "Spark Packages Repo" at "http://dl.bintray.com/spark-packages/maven"

libraryDependencies += "JMailloH" % "kNN_IS" % "3.0"

Maven

In your pom.xml, add:
<dependencies>
  <!-- list of dependencies -->
  <dependency>
    <groupId>JMailloH</groupId>
    <artifactId>kNN_IS</artifactId>
    <version>3.0</version>
  </dependency>
</dependencies>
<repositories>
  <!-- list of other repositories -->
  <repository>
    <id>SparkPackagesRepo</id>
    <url>http://dl.bintray.com/spark-packages/maven</url>
  </repository>
</repositories>

Releases

Version: 3.0 ( 7e5a53 | zip | jar ) / Date: 2016-07-12 / License: Apache-2.0 / Scala version: 2.10

Version: 2.0 ( 07da32 | zip | jar ) / Date: 2016-05-05 / License: Apache-2.0 / Scala version: 2.10

Version: 1.0 ( 2dd3d0 | zip | jar ) / Date: 2016-02-04 / License: Apache-2.0 / Scala version: 2.10

Spark Scala/Java API compatibility: 1.0.0 - 3% , 1.1.0 - 2% , 1.2.0 - 2% , 1.3.0 - 84% , 1.4.0 - 89% , 1.5.0 - 97%