class_docstr: Base class for the discretizer classes in pgmpy. The discretizer
  classes are used to discretize a continuous random variable
  distribution into discrete probability masses.
  
  Parameters
  ----------
  factor: A ContinuousNode or a ContinuousFactor object
      the continuous node or factor representing the distribution
      to be discretized.
  
  low, high: float
      the range over which the function will be discretized.
  
  cardinality: int
      the number of states required in the discretized output.
  
  Examples
  --------
  >>> from scipy.stats import norm
  >>> from pgmpy.factors.continuous import ContinuousNode
  >>> normal = ContinuousNode(norm(0, 1).pdf)
  >>> from pgmpy.discretize import BaseDiscretizer
  >>> class ChildDiscretizer(BaseDiscretizer):
  ...     def get_discrete_values(self):
  ...         pass
  >>> discretizer = ChildDiscretizer(normal, -3, 3, 10)
  >>> discretizer.factor
  <pgmpy.factors.continuous.ContinuousNode.ContinuousNode object at 0x04C98190>
  >>> discretizer.cardinality
  10
  >>> discretizer.get_labels()
  ['x=-3.0', 'x=-2.4', 'x=-1.8', 'x=-1.2', 'x=-0.6', 'x=0.0', 'x=0.6', 'x=1.2', 'x=1.8', 'x=2.4']
class_docstr_tok: ["Base","class","for","the","discretizer","classes","in","pgmpy",".","The","discretizer","classes","are","used","to","discretize","a","continuous","random","variable","distribution","into","discrete","probability","masses",".","Parameters","--","--","--","--","--","factor",":","A","ContinuousNode","or","a","ContinuousFactor","object","the","continuous","node","or","factor","representing","the","distribution","to","be","discretized",".","low",",","high",":","float","the","range","over","which","the","function","will","be","discretized",".","cardinality",":","int","the","number","of","states","required","in","the","discretized","output",".","Examples","--","--","--","--",">",">",">","from","scipy.stats","import","norm",">",">",">","from","pgmpy.factors.continuous","import","ContinuousNode",">",">",">","normal","=","ContinuousNode","(","norm","(","0",",","1",")",".pdf",")",">",">",">","from","pgmpy.discretize","import","BaseDiscretizer",">",">",">","class","ChildDiscretizer","(","BaseDiscretizer",")",":","...","def","get_discrete_values","(","self",")",":","...","pass",">",">",">","discretizer","=","ChildDiscretizer","(","normal",",","-3",",","3",",","10",")",">",">",">","discretizer.factor","<","pgmpy.factors.continuous.ContinuousNode.ContinuousNode","object","at","0x04C98190",">",">",">",">","discretizer.cardinality","10",">",">",">","discretizer.get_labels","(",")","[","'","x=-3.0","'",",","'","x=-2.4","'",",","'","x=-1.8","'",",","'","x=-1.2","'",",","'","x=-0.6","'",",","'","x=0.0","'",",","'","x=0.6","'",",","'","x=1.2","'",",","'","x=1.8","'",",","'","x=2.4","'","]"]
docstr: Returns a list of strings representing the values about
  which the discretization method calculates the probability
  masses.
  
  Default value is the points -
  [low, low+step, low+2*step, ......... , high-step]
  unless the method is overridden by a subclass.
  
  Examples
  --------
  >>> from pgmpy.factors import ContinuousNode
  >>> from pgmpy.discretize import BaseDiscretizer
  >>> class ChildDiscretizer(BaseDiscretizer):
  ...     def get_discrete_values(self):
  ...         pass
  >>> from scipy.stats import norm
  >>> node = ContinuousNode(norm(0).pdf)
  >>> child = ChildDiscretizer(node, -5, 5, 20)
  >>> chld.get_labels()
  ['x=-5.0', 'x=-4.5', 'x=-4.0', 'x=-3.5', 'x=-3.0', 'x=-2.5',
   'x=-2.0', 'x=-1.5', 'x=-1.0', 'x=-0.5', 'x=0.0', 'x=0.5', 'x=1.0',
   'x=1.5', 'x=2.0', 'x=2.5', 'x=3.0', 'x=3.5', 'x=4.0', 'x=4.5']
docstr_tok: ["Returns","a","list","of","strings","representing","the","values","about","which","the","discretization","method","calculates","the","probability","masses",".","Default","value","is","the","points","-","[","low",",","low+step",",","low+2","*","step",",",".........",",","high-step","]","unless","the","method","is","overridden","by","a","subclass",".","Examples","--","--","--","--",">",">",">","from","pgmpy.factors","import","ContinuousNode",">",">",">","from","pgmpy.discretize","import","BaseDiscretizer",">",">",">","class","ChildDiscretizer","(","BaseDiscretizer",")",":","...","def","get_discrete_values","(","self",")",":","...","pass",">",">",">","from","scipy.stats","import","norm",">",">",">","node","=","ContinuousNode","(","norm","(","0",")",".pdf",")",">",">",">","child","=","ChildDiscretizer","(","node",",","-5",",","5",",","20",")",">",">",">","chld.get_labels","(",")","[","'","x=-5.0","'",",","'","x=-4.5","'",",","'","x=-4.0","'",",","'","x=-3.5","'",",","'","x=-3.0","'",",","'","x=-2.5","'",",","'","x=-2.0","'",",","'","x=-1.5","'",",","'","x=-1.0","'",",","'","x=-0.5","'",",","'","x=0.0","'",",","'","x=0.5","'",",","'","x=1.0","'",",","'","x=1.5","'",",","'","x=2.0","'",",","'","x=2.5","'",",","'","x=3.0","'",",","'","x=3.5","'",",","'","x=4.0","'",",","'","x=4.5","'","]"]
code: def get_labels(self):
      """
      Returns a list of strings representing the values about
      which the discretization method calculates the probability
      masses.
  
      Default value is the points -
      [low, low+step, low+2*step, ......... , high-step]
      unless the method is overridden by a subclass.
  
      Examples
      --------
      >>> from pgmpy.factors import ContinuousNode
      >>> from pgmpy.discretize import BaseDiscretizer
      >>> class ChildDiscretizer(BaseDiscretizer):
      ...     def get_discrete_values(self):
      ...         pass
      >>> from scipy.stats import norm
      >>> node = ContinuousNode(norm(0).pdf)
      >>> child = ChildDiscretizer(node, -5, 5, 20)
      >>> chld.get_labels()
      ['x=-5.0', 'x=-4.5', 'x=-4.0', 'x=-3.5', 'x=-3.0', 'x=-2.5',
       'x=-2.0', 'x=-1.5', 'x=-1.0', 'x=-0.5', 'x=0.0', 'x=0.5', 'x=1.0',
       'x=1.5', 'x=2.0', 'x=2.5', 'x=3.0', 'x=3.5', 'x=4.0', 'x=4.5']
  
      """
      step = (self.high - self.low) / self.cardinality
      labels = [
          f"x={str(i)}"
          for i in np.round(np.arange(self.low, self.high, step), 3)
      ]
      return labels
  
file_path: pgmpy/pgmpy/factors/continuous/discretize.py
imports: from abc import ABCMeta, abstractmethod
  import numpy
  from scipy import integrate
label_desc: Use image node_id 3 for calling the BaseDiscretizer obj's underlying member method code with example usage: obj.get_labels() and returns: labels