You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to ask why my code reported an error:Exception in thread "main" java.lang.AbstractMethodError
object FSTest01 {
def main(args: Array[String]): Unit = {
val conf = new SparkConf().setAppName("FS test")
val sc = new SparkContext(conf)
val raw = MLUtils.loadLibSVMFile(sc, "a2a.libsvm")
val data: RDD[LabeledPoint] = raw.map({ case LabeledPoint(label, values) => LabeledPoint(label, Vectors.dense(values.toArray)) })
val criterion: InfoThCriterionFactory = new InfoThCriterionFactory("mrmr")
val nToSelect = 5
val nPartitions = 10
val featureSelector = new InfoThSelector(criterion, nToSelect, nPartitions).fit(data)
val redData = data.map { lp =>
LabeledPoint(lp.label, featureSelector.transform(lp.features))
}
println(redData.first().toString())
}
}
Error reported on the fit line of the code
The text was updated successfully, but these errors were encountered:
I would like to ask why my code reported an error:Exception in thread "main" java.lang.AbstractMethodError
Error reported on the fit line of the code
The text was updated successfully, but these errors were encountered: