-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels