Comments (4)
name := "SparkKnn"
version := "1.0"
scalaVersion := "2.10.5"
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % "1.6.0",
"org.apache.spark" %% "spark-sql" % "1.6.0",
"org.apache.spark" %% "spark-mllib" % "1.6.0",
"io.snappydata" % "snappy-spark-mllib_2.10" % "1.6.2-1",
"saurfang"%"spark-knn"%"0.1.0"
)
spDependencies += "saurfang/spark-knn:0.1.0"
sparkComponents +="mllib"
sparkVersion := "1.6.0"
my sbt configuration
from spark-knn.
object SparkKnn {
def main(args:Array[String]) :Unit={
//val conf = new SparkConf().set("spark.serializer", "org.apache.spark.serializer.KryoSerializer").setMaster("local[4]")
val conf = configure("Popularity")
val sc = new SparkContext(conf)
val sqlContext = new org.apache.spark.sql.SQLContext(sc)
// this is used to implicitly convert an RDD to a DataFrame.
import sqlContext.implicits._
val training = MLUtils.loadLibSVMFile(sc, "/home/gaur/svmdata").toDF().select("features","label")
training.show()
val knn = new KNNRegression().setTopTreeSize(500 / 5).setK(3)
val knnModel = knn.fit(training)
//val predicted = knnModel.transform(training)
//predicted.show()
}
def configure(appName: String = "Sparkling Water Demo"): SparkConf = {
val conf = new SparkConf().setAppName(appName)
conf.setIfMissing("spark.master", sys.env.getOrElse("spark.master", "local[*]"))
conf
}
}
from spark-knn.
till show it is working fine it may be version issue but which version shall I use I checked in project folder 1.6.0 spark-core dependency is being used so i changed it to 1.6.0 but still iam getting same issue
from spark-knn.
with spark submit jar option it is working fine
from spark-knn.
Related Issues (20)
- Problem with MNIST.scala example HOT 3
- Getting K nearest neighbor for each data point HOT 2
- Sparse Vectors?
- knn.fit(training) throws an exception HOT 10
- KNN set tree size and sub tree size and leave size
- TypeError: 'JavaPackage' object is not callable HOT 1
- Does this implementation support hundreds of millions points? HOT 2
- java.lang.NoSuchMethodError:breeze.linalg.Vector$.scalaOf() Lbreeze/linalg/support/ScalaOf HOT 1
- value transform in class KNNRegression cannot be accessed in org.apache.spark.ml.regression.KNNRegression
- Searching K nearest neighbors for each test sample in training set HOT 1
- Algorithm fails on small data
- Exception occurred when initializing new KNNRegression() HOT 6
- Release version for Spark 2.4.X / Scala 2.12
- offline use in pyspark2.3.3 HOT 3
- issue with running using spark-sumbit
- How to use it in pyspark environment
- Nearest Neighbor between two dataframes HOT 3
- How to get the exact nearest neighbors? HOT 1
- Got "Caused by: java.lang.ArrayStoreException" when running KNN
- Can not download the dependency
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spark-knn.