class_docstr: Random Radial Basis Function generator with concept drift.
  
  This class is an extension from the `RandomRBF` generator. Concept drift
  can be introduced in instances of this class.
  
  The drift is created by adding a "speed" to certain centroids. As the
  samples are generated each of the moving centroids' centers is
  changed by an amount determined by its speed.
  
  Parameters
  ----------
  seed_model
      Model's random seed to generate centroids.
  seed_sample
      Sample's random seed.
  n_classes
      The number of class labels to generate.
  n_features
      The number of numerical features to generate.
  n_centroids
      The number of centroids to generate.
  change_speed
      The concept drift speed.
  n_drift_centroids
      The number of centroids that will drift.
  
  Examples
  --------
  >>> from river.datasets import synth
  >>>
  >>> dataset = synth.RandomRBFDrift(seed_model=42, seed_sample=42,
  ...                                n_classes=4, n_features=4, n_centroids=20,
  ...                                change_speed=0.87, n_drift_centroids=10)
  >>>
  >>> for x, y in dataset.take(5):
  ...     print(x, y)
  {0: 1.0989, 1: 0.3840, 2: 0.7759, 3: 0.6592} 2
  {0: 1.1496, 1: 1.9014, 2: 1.5393, 3: 0.3210} 0
  {0: 0.7146, 1: -0.2414, 2: 0.8933, 3: 1.6633} 0
  {0: 0.3797, 1: -0.1027, 2: 0.8717, 3: 1.1635} 0
  {0: 0.1295, 1: 0.5953, 2: 0.1774, 3: 0.6673} 1
class_docstr_tok: ["Random","Radial","Basis","Function","generator","with","concept","drift",".","This","class","is","an","extension","from","the","`","RandomRBF","`","generator",".","Concept","drift","can","be","introduced","in","instances","of","this","class",".","The","drift","is","created","by","adding","a","``","speed","''","to","certain","centroids",".","As","the","samples","are","generated","each","of","the","moving","centroids","'","centers","is","changed","by","an","amount","determined","by","its","speed",".","Parameters","--","--","--","--","--","seed_model","Model","'s","random","seed","to","generate","centroids",".","seed_sample","Sample","'s","random","seed",".","n_classes","The","number","of","class","labels","to","generate",".","n_features","The","number","of","numerical","features","to","generate",".","n_centroids","The","number","of","centroids","to","generate",".","change_speed","The","concept","drift","speed",".","n_drift_centroids","The","number","of","centroids","that","will","drift",".","Examples","--","--","--","--",">",">",">","from","river.datasets","import","synth",">",">",">",">",">",">","dataset","=","synth.RandomRBFDrift","(","seed_model=42",",","seed_sample=42",",","...","n_classes=4",",","n_features=4",",","n_centroids=20",",","...","change_speed=0.87",",","n_drift_centroids=10",")",">",">",">",">",">",">","for","x",",","y","in","dataset.take","(","5",")",":","...","print","(","x",",","y",")","{","0",":","1.0989",",","1",":","0.3840",",","2",":","0.7759",",","3",":","0.6592","}","2","{","0",":","1.1496",",","1",":","1.9014",",","2",":","1.5393",",","3",":","0.3210","}","0","{","0",":","0.7146",",","1",":","-0.2414",",","2",":","0.8933",",","3",":","1.6633","}","0","{","0",":","0.3797",",","1",":","-0.1027",",","2",":","0.8717",",","3",":","1.1635","}","0","{","0",":","0.1295",",","1",":","0.5953",",","2",":","0.1774",",","3",":","0.6673","}","1"]
code: def __init__(
      self,
      seed_model: int | None = None,
      seed_sample: int | None = None,
      n_classes: int = 2,
      n_features: int = 10,
      n_centroids: int = 50,
      change_speed: float = 0.0,
      n_drift_centroids: int = 50,
  ):
      super().__init__(
          seed_model=seed_model,
          seed_sample=seed_sample,
          n_classes=n_classes,
          n_features=n_features,
          n_centroids=n_centroids,
      )
      self.change_speed = change_speed
      if n_drift_centroids <= n_centroids:
          self.n_drift_centroids = n_drift_centroids
      else:
          warnings.warn(
              f"n_drift_centroids ({n_drift_centroids}) can not be larger than"
              f"n_centroids ({n_centroids}). Will use n_centroids instead."
          )
          self.n_drift_centroids = n_centroids
      self.centroid_speed = None
  
file_path: river/river/datasets/synth/random_rbf.py
imports: from __future__ import annotations
  import random
  import warnings
  from river import datasets
label_desc: Use image node_id 1 to create a new RandomRBFDrift object from inherited base classes: RandomRBF with example: obj = RandomRBFDrift(seed_model, seed_sample, n_classes, n_features, n_centroids, change_speed, n_drift_centroids)