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.

Added 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.

Added in version 1.5.0.

predictOn(dstream)[source]#

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

Added 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.

Added in version 1.5.0.

Returns:
pyspark.streaming.DStream

DStream containing predictions.