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

latestModel()

Returns the latest model.

predictOn(dstream)

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

predictOnValues(dstream)

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

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.

New in version 1.5.0.

Returns
pyspark.streaming.DStream

DStream containing predictions.

predictOnValues(dstream)[source]

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

New in version 1.5.0.

Returns
pyspark.streaming.DStream

DStream containing predictions.