StreamingLinearAlgorithm¶
- 
class pyspark.mllib.regression.StreamingLinearAlgorithm(model: Optional[pyspark.mllib.regression.LinearModel])[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 - 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() → Optional[pyspark.mllib.regression.LinearModel][source]¶
- Returns the latest model. - New in version 1.5.0. 
 - 
predictOn(dstream: DStream[VectorLike]) → DStream[float][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: DStream[Tuple[K, VectorLike]]) → DStream[Tuple[K, float]][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. 
 
 
 
-