Skip to content
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

Open
ashanwijenayake opened this issue May 1, 2019 · 6 comments
Open

Exception occurred when initializing new KNNRegression() #42

ashanwijenayake opened this issue May 1, 2019 · 6 comments

Comments

@ashanwijenayake
Copy link

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)

@sagnik-rzt
Copy link

It's not able to load your KNN object, do you have the spark classpath pointing to your JARs?

@ashanwijenayake
Copy link
Author

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.

@ntaherkhani
Copy link

I am getting same error. do you have any update?

@ashanwijenayake
Copy link
Author

I am getting same error. do you have any update?

I couldn't find a solution so I had to move on.

@ntaherkhani
Copy link

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?

@Alpus
Copy link

Alpus commented Sep 2, 2021

I used version '0.3.0' and it seemed to work for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants