FlinkML - Machine Learning for Flink

FlinkML is the Machine Learning (ML) library for Flink. It is a new effort in the Flink community,
with a growing list of algorithms and contributors. With FlinkML we aim to provide
scalable ML algorithms, an intuitive API, and tools that help minimize glue code in end-to-end ML
systems. You can see more details about our goals and where the library is headed in our vision
and roadmap here.

Note that FlinkML is currently not part of the binary distribution.
See linking with it for cluster execution here.

Now you can start solving your analysis task.
The following code snippet shows how easy it is to train a multiple linear regression model.

// LabeledVector is a feature vector with a label (class or real value)valtrainingData:DataSet[LabeledVector]=...valtestingData:DataSet[Vector]=...// Alternatively, a Splitter is used to break up a DataSet into training and testing data.valdataSet:DataSet[LabeledVector]=...valtrainTestData:DataSet[TrainTestDataSet]=Splitter.trainTestSplit(dataSet)valtrainingData:DataSet[LabeledVector]=trainTestData.trainingvaltestingData:DataSet[Vector]=trainTestData.testing.map(lv=>lv.vector)valmlr=MultipleLinearRegression().setStepsize(1.0).setIterations(100).setConvergenceThreshold(0.001)mlr.fit(trainingData)// The fitted model can now be used to make predictionsvalpredictions:DataSet[LabeledVector]=mlr.predict(testingData)

Pipelines

A key concept of FlinkML is its scikit-learn inspired pipelining mechanism.
It allows you to quickly build complex data analysis pipelines how they appear in every data scientist’s daily work.
An in-depth description of FlinkML’s pipelines and their internal workings can be found here.

The following example code shows how easy it is to set up an analysis pipeline with FlinkML.

One can chain a Transformer to another Transformer or a set of chained Transformers by calling the method chainTransformer.
If one wants to chain a Predictor to a Transformer or a set of chained Transformers, one has to call the method chainPredictor.

How to contribute

The Flink community welcomes all contributors who want to get involved in the development of Flink and its libraries.
In order to get quickly started with contributing to FlinkML, please read our official
contribution guide.