class_docstr: Passive-aggressive learning for regression.
  
  Parameters
  ----------
  C
  mode
  eps
  learn_intercept
  
  Examples
  --------
  
  The following example is taken from [this blog post](https://www.bonaccorso.eu/2017/10/06/ml-algorithms-addendum-passive-aggressive-algorithms/).
  
  >>> from river import linear_model
  >>> from river import metrics
  >>> from river import stream
  >>> import numpy as np
  >>> from sklearn import datasets
  
  >>> np.random.seed(1000)
  >>> X, y = datasets.make_regression(n_samples=500, n_features=4)
  
  >>> model = linear_model.PARegressor(
  ...     C=0.01,
  ...     mode=2,
  ...     eps=0.1,
  ...     learn_intercept=False
  ... )
  >>> metric = metrics.MAE() + metrics.MSE()
  
  >>> for xi, yi in stream.iter_array(X, y):
  ...     y_pred = model.predict_one(xi)
  ...     model.learn_one(xi, yi)
  ...     metric.update(yi, y_pred)
  
  >>> print(metric)
  MAE: 9.809402
  MSE: 472.393532
  
  References
  ----------
  [^1]: [Crammer, K., Dekel, O., Keshet, J., Shalev-Shwartz, S. and Singer, Y., 2006. Online passive-aggressive algorithms. Journal of Machine Learning Research, 7(Mar), pp.551-585.](http://jmlr.csail.mit.edu/papers/volume7/crammer06a/crammer06a.pdf)
class_docstr_tok: ["Passive-aggressive","learning","for","regression",".","Parameters","--","--","--","--","--","C","mode","eps","learn_intercept","Examples","--","--","--","--","The","following","example","is","taken","from","[","this","blog","post","]","(","https",":","\/\/www.bonaccorso.eu\/2017\/10\/06\/ml-algorithms-addendum-passive-aggressive-algorithms\/",")",".",">",">",">","from","river","import","linear_model",">",">",">","from","river","import","metrics",">",">",">","from","river","import","stream",">",">",">","import","numpy","as","np",">",">",">","from","sklearn","import","datasets",">",">",">","np.random.seed","(","1000",")",">",">",">","X",",","y","=","datasets.make_regression","(","n_samples=500",",","n_features=4",")",">",">",">","model","=","linear_model.PARegressor","(","...","C=0.01",",","...","mode=2",",","...","eps=0.1",",","...","learn_intercept=False","...",")",">",">",">","metric","=","metrics.MAE","(",")","+","metrics.MSE","(",")",">",">",">","for","xi",",","yi","in","stream.iter_array","(","X",",","y",")",":","...","y_pred","=","model.predict_one","(","xi",")","...","model.learn_one","(","xi",",","yi",")","...","metric.update","(","yi",",","y_pred",")",">",">",">","print","(","metric",")","MAE",":","9.809402","MSE",":","472.393532","References","--","--","--","--","--","[","^1","]",":","[","Crammer",",","K.",",","Dekel",",","O.",",","Keshet",",","J.",",","Shalev-Shwartz",",","S.","and","Singer",",","Y.",",","2006",".","Online","passive-aggressive","algorithms",".","Journal","of","Machine","Learning","Research",",","7","(","Mar",")",",","pp.551-585",".","]","(","http",":","\/\/jmlr.csail.mit.edu\/papers\/volume7\/crammer06a\/crammer06a.pdf",")"]
code: def predict_one(self, x):
      return utils.math.dot(x, self.weights) + self.intercept
  
imports: from __future__ import annotations
  import collections
  import numpy
  from river import base, optim, utils
label_desc: Use image node_id 3 for calling the PARegressor obj's underlying member method code with example usage: obj.predict_one(x) and returns: unknown