-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception occurred when initializing new KNNRegression() #42
Comments
It's not able to load your KNN object, do you have the spark classpath pointing to your JARs? |
Yes. Spark class path is in order. |
I am getting same error. do you have any update? |
I couldn't find a solution so I had to move on. |
what alternative did you use? |
I used version '0.3.0' and it seemed to work for me |
val knn = new KNNRegression().setTopTreeSize(df.count().toInt / 500)
.setFeaturesCol("features")
.setPredictionCol("predicted")
.setK(1)
This throws the following exception,
Caused by: java.lang.ClassNotFoundException: org.apache.spark.ml.param.shared.HasInputCols$class
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
The text was updated successfully, but these errors were encountered: