class_docstr: Random Radial Basis Function generator.
  
  Produces a radial basis function stream. A number of centroids, having a
  random central position, a standard deviation, a class label and weight
  are generated. A new sample is created by choosing one of the centroids at
  random, taking into account their weights, and offsetting the attributes
  in a random direction from the centroid's center. The offset length is
  drawn from a Gaussian distribution.
  
  This process will create a normally distributed hypersphere of samples on
  the surrounds of each centroid.
  
  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.
  
  Examples
  --------
  >>> from river.datasets import synth
  >>>
  >>> dataset = synth.RandomRBF(seed_model=42, seed_sample=42,
  ...                           n_classes=4, n_features=4, n_centroids=20)
  >>>
  >>> for x, y in dataset.take(5):
  ...     print(x, y)
  {0: 1.0989, 1: 0.3840, 2: 0.7759, 3: 0.6592} 2
  {0: 0.2366, 1: 1.3233, 2: 0.5691, 3: 0.2083} 0
  {0: 1.3540, 1: -0.3306, 2: 0.1683, 3: 0.8865} 0
  {0: 0.2585, 1: -0.2217, 2: 0.4739, 3: 0.6522} 0
  {0: 0.1295, 1: 0.5953, 2: 0.1774, 3: 0.6673} 1
class_docstr_tok: ["Random","Radial","Basis","Function","generator",".","Produces","a","radial","basis","function","stream",".","A","number","of","centroids",",","having","a","random","central","position",",","a","standard","deviation",",","a","class","label","and","weight","are","generated",".","A","new","sample","is","created","by","choosing","one","of","the","centroids","at","random",",","taking","into","account","their","weights",",","and","offsetting","the","attributes","in","a","random","direction","from","the","centroid","'s","center",".","The","offset","length","is","drawn","from","a","Gaussian","distribution",".","This","process","will","create","a","normally","distributed","hypersphere","of","samples","on","the","surrounds","of","each","centroid",".","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",".","Examples","--","--","--","--",">",">",">","from","river.datasets","import","synth",">",">",">",">",">",">","dataset","=","synth.RandomRBF","(","seed_model=42",",","seed_sample=42",",","...","n_classes=4",",","n_features=4",",","n_centroids=20",")",">",">",">",">",">",">","for","x",",","y","in","dataset.take","(","5",")",":","...","print","(","x",",","y",")","{","0",":","1.0989",",","1",":","0.3840",",","2",":","0.7759",",","3",":","0.6592","}","2","{","0",":","0.2366",",","1",":","1.3233",",","2",":","0.5691",",","3",":","0.2083","}","0","{","0",":","1.3540",",","1",":","-0.3306",",","2",":","0.1683",",","3",":","0.8865","}","0","{","0",":","0.2585",",","1",":","-0.2217",",","2",":","0.4739",",","3",":","0.6522","}","0","{","0",":","0.1295",",","1",":","0.5953",",","2",":","0.1774",",","3",":","0.6673","}","1"]
docstr: Generates centroids
  
  Sequentially creates all the centroids, choosing at random a center,
  a label, a standard deviation and a weight.
docstr_tok: ["Generates","centroids","Sequentially","creates","all","the","centroids",",","choosing","at","random","a","center",",","a","label",",","a","standard","deviation","and","a","weight","."]
code: def _generate_centroids(self):
      """Generates centroids
  
      Sequentially creates all the centroids, choosing at random a center,
      a label, a standard deviation and a weight.
  
      """
      rng_model = random.Random(self.seed_model)
      self.centroids = []
      self.centroid_weights = []
      for i in range(self.n_centroids):
          self.centroids.append(Centroid())
          rand_centre = []
          for j in range(self.n_num_features):
              rand_centre.append(rng_model.random())
          self.centroids[i].centre = rand_centre
          self.centroids[i].class_label = rng_model.randint(
              0, self.n_classes - 1
          )
          self.centroids[i].std_dev = rng_model.random()
          self.centroid_weights.append(rng_model.random())
  
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 4 for calling the RandomRBF obj's underlying member method code with example usage: obj._generate_centroids() without return types