Translate flink scala in java

The Flink document provides a scala example for the SVM algorithm:

val trainingDS: DataSet[LabeledVector] = env.readLibSVM(pathToTrainingFile)
val svm = SVM()
.setBlocks(10)

// Learn the SVM model
svm.fit(trainingDS)

How would the fit call be translated into java?

(The explicit expression "svm.fit (trainingDS)" gives a java compiler error:

"The fit method (DataSet, ParameterMap, FitOperation) in the SVM type is not applicable for arguments (DataSet)")

+4
source share
1 answer

FlinkML can currently only be used with Scala. The reason is that FlinkML comes with a flexible pipelining mechanism that allows you to easily design data analysis pipelines. These pipelines can consist of an arbitrary number Estimatorsand one trailing Predictor.

, . , . , Scala .

. , , Flink Scala API, FlinkML.

+4

Source: https://habr.com/ru/post/1607474/


All Articles