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
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
- 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.DStreamDStream 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.DStreamDStream containing predictions.