Failed to load class for data source: Libsvm in sp

2019-09-09 19:39发布

When I try to import a libsvm file in pyspark/scala using "sqlContext.read.format("libsvm").load", I get the following error -

"Failed to load class for data source: Libsvm."

At the same time, if I use "MLUtils.loadLibSVMFile" it works perfectly fine. I need to use both Spark ML (to get class probabilities) and MLlib for an evaluation. Have attached the error screenshot.

This is a MapR cluster. Spark version 1.5.2 Error

2条回答
聊天终结者
2楼-- · 2019-09-09 20:20

libsvm source format is available since version 1.6 of Spark.

查看更多
狗以群分
3楼-- · 2019-09-09 20:28

this is probably a version mismatch, the version of libsvm you have in your project may not have that particular API, can you verify the version of libsvm is loaded and then determine if that api is available?

查看更多
登录 后发表回答