class_docstr: Rolling version of the Receiving Operating Characteristic Area Under the Curve.
  
  The RollingROCAUC calculates the metric using the instances in its window
  of size S. It keeps a queue of the instances, when an instance is added and
  the queue length is equal to S, the last instance is removed. The metric has
  a tree with ordered instances, in order to calculate the AUC efficiently.
  It was implemented based on the algorithm presented in Brzezinski and
  Stefanowski, 2017.
  
  The difference between this metric and the standard ROCAUC is that the latter
  calculates an approximation of the real metric considering all data from the
  beginning of the stream, while the RollingROCAUC calculates the exact value
  considering only the last S instances. This approach may be beneficial if
  it's necessary to evaluate the model's performance over time, since
  calculating the metric using the entire stream may hide the current
  performance of the classifier.
  
  Parameters
  ----------
  window_size
      The max length of the window.
  pos_val
      Value to treat as "positive".
  
  Examples
  --------
  
  >>> from river import metrics
  
  >>> y_true = [ 0,  1,  0,  1,  0,  1,  0,  0,   1,  1]
  >>> y_pred = [.3, .5, .5, .7, .1, .3, .1, .4, .35, .8]
  
  >>> metric = metrics.RollingROCAUC(window_size=4)
  
  >>> for yt, yp in zip(y_true, y_pred):
  ...     metric.update(yt, yp)
  
  >>> metric
  RollingROCAUC: 75.00%
class_docstr_tok: ["Rolling","version","of","the","Receiving","Operating","Characteristic","Area","Under","the","Curve",".","The","RollingROCAUC","calculates","the","metric","using","the","instances","in","its","window","of","size","S.","It","keeps","a","queue","of","the","instances",",","when","an","instance","is","added","and","the","queue","length","is","equal","to","S",",","the","last","instance","is","removed",".","The","metric","has","a","tree","with","ordered","instances",",","in","order","to","calculate","the","AUC","efficiently",".","It","was","implemented","based","on","the","algorithm","presented","in","Brzezinski","and","Stefanowski",",","2017",".","The","difference","between","this","metric","and","the","standard","ROCAUC","is","that","the","latter","calculates","an","approximation","of","the","real","metric","considering","all","data","from","the","beginning","of","the","stream",",","while","the","RollingROCAUC","calculates","the","exact","value","considering","only","the","last","S","instances",".","This","approach","may","be","beneficial","if","it","'s","necessary","to","evaluate","the","model","'s","performance","over","time",",","since","calculating","the","metric","using","the","entire","stream","may","hide","the","current","performance","of","the","classifier",".","Parameters","--","--","--","--","--","window_size","The","max","length","of","the","window",".","pos_val","Value","to","treat","as","``","positive","''",".","Examples","--","--","--","--",">",">",">","from","river","import","metrics",">",">",">","y_true","=","[","0",",","1",",","0",",","1",",","0",",","1",",","0",",","0",",","1",",","1","]",">",">",">","y_pred","=","[",".3",",",".5",",",".5",",",".7",",",".1",",",".3",",",".1",",",".4",",",".35",",",".8","]",">",">",">","metric","=","metrics.RollingROCAUC","(","window_size=4",")",">",">",">","for","yt",",","yp","in","zip","(","y_true",",","y_pred",")",":","...","metric.update","(","yt",",","yp",")",">",">",">","metric","RollingROCAUC",":","75.00","%"]
code: def update(self, y_true, y_pred):
      p_true = (
          y_pred.get(True, 0.0) if isinstance(y_pred, dict) else y_pred
      )
      self._metric.update(y_true, p_true)
  
file_path: river/river/metrics/rolling_roc_auc.py
imports: from __future__ import annotations
  from river import metrics, utils
  from .efficient_rollingrocauc import EfficientRollingROCAUC
label_desc: Use image node_id 3 for calling the RollingROCAUC obj's underlying member method code with example usage: obj.update(y_true, y_pred) without return types