StreamingLinearAlgorithm

class pyspark.mllib.regression.StreamingLinearAlgorithm(model)[source]

Base class that has to be inherited by any StreamingLinearAlgorithm.

Prevents reimplementation of methods predictOn and predictOnValues.

New in version 1.5.0.

Methods

Methods Documentation

latestModel()[source]

Returns the latest model.

New in version 1.5.0.

predictOn(dstream)[source]

Use the model to make predictions on batches of data from a DStream.

Returns

DStream containing predictions.

New in version 1.5.0.

predictOnValues(dstream)[source]

Use the model to make predictions on the values of a DStream and carry over its keys.

Returns

DStream containing the input keys and the predictions as values.

New in version 1.5.0.