Hi

I'm using Flink ML 9.2.1 in order to perform a multiple linear regression
with a csv data file.

The Scala sample code for it is pretty straightforward:
val mlr = MultipleLinearRegression()

val parameters = ParameterMap()

parameters.add(MultipleLinearRegression.Stepsize, 2.0)
parameters.add(MultipleLinearRegression.Iterations, 10)
parameters.add(MultipleLinearRegression.ConvergenceThreshold, 0.001)
val inputDS = env.fromCollection(data)

mlr.fit(inputDS, parameters)

When I'm using Java(8) the fit method includes 3 parameters
1. dataset
2.parameters
3. object which implements -fitOperation interface

multipleLinearRegression.fit(regressionDS, parameters,fitOperation);

Is there a need to  implement the fitOperation interface which have been
already
implemented in Flinks ml source code.

Another option is using MultipleLinearRegression.fitMLR() method ,but I
haven't found a way to pass the train dataset to it as a parameter or by
setter.

I'll be more than happy if you could guide me how to implement it in Java

Thanks

Hanan Meyer

Reply via email to