class_docstr: Class used to compute parameters for a model using Maximum Likelihood Estimation.
  
  Parameters
  ----------
  model: A pgmpy.models.BayesianNetwork instance
  
  data: pandas DataFrame object
      DataFrame object with column names identical to the variable names of the network.
      (If some values in the data are missing the data cells should be set to `numpy.NaN`.
      Note that pandas converts each column containing `numpy.NaN`s to dtype `float`.)
  
  state_names: dict (optional)
      A dict indicating, for each variable, the discrete set of states
      that the variable can take. If unspecified, the observed values
      in the data set are taken to be the only possible states.
  
  Examples
  --------
  >>> import numpy as np
  >>> import pandas as pd
  >>> from pgmpy.models import BayesianNetwork
  >>> from pgmpy.estimators import MaximumLikelihoodEstimator
  >>> data = pd.DataFrame(np.random.randint(low=0, high=2, size=(1000, 5)),
  ...                       columns=['A', 'B', 'C', 'D', 'E'])
  >>> model = BayesianNetwork([('A', 'B'), ('C', 'B'), ('C', 'D'), ('B', 'E')])
  >>> estimator = MaximumLikelihoodEstimator(model, data)
class_docstr_tok: ["Class","used","to","compute","parameters","for","a","model","using","Maximum","Likelihood","Estimation",".","Parameters","--","--","--","--","--","model",":","A","pgmpy.models.BayesianNetwork","instance","data",":","pandas","DataFrame","object","DataFrame","object","with","column","names","identical","to","the","variable","names","of","the","network",".","(","If","some","values","in","the","data","are","missing","the","data","cells","should","be","set","to","`","numpy.NaN","`",".","Note","that","pandas","converts","each","column","containing","`","numpy.NaN","`","s","to","dtype","`","float","`",".",")","state_names",":","dict","(","optional",")","A","dict","indicating",",","for","each","variable",",","the","discrete","set","of","states","that","the","variable","can","take",".","If","unspecified",",","the","observed","values","in","the","data","set","are","taken","to","be","the","only","possible","states",".","Examples","--","--","--","--",">",">",">","import","numpy","as","np",">",">",">","import","pandas","as","pd",">",">",">","from","pgmpy.models","import","BayesianNetwork",">",">",">","from","pgmpy.estimators","import","MaximumLikelihoodEstimator",">",">",">","data","=","pd.DataFrame","(","np.random.randint","(","low=0",",","high=2",",","size=","(","1000",",","5",")",")",",","...","columns=","[","'","A","'",",","'","B","'",",","'","C","'",",","'D","'",",","'","E","'","]",")",">",">",">","model","=","BayesianNetwork","(","[","(","'","A","'",",","'","B","'",")",",","(","'","C","'",",","'","B","'",")",",","(","'","C","'",",","'D","'",")",",","(","'","B","'",",","'","E","'",")","]",")",">",">",">","estimator","=","MaximumLikelihoodEstimator","(","model",",","data",")"]
code: def __init__(self, model, data, **kwargs):
      if not isinstance(model, BayesianNetwork):
          raise NotImplementedError(
              "Maximum Likelihood Estimate is only implemented for BayesianNetwork"
          )
  
      elif set(model.nodes()) > set(data.columns):
          raise ValueError(
              f"Found latent variables: {model.latents}. Maximum Likelihood doesn't support latent variables, please use ExpectationMaximization"
          )
  
      super(MaximumLikelihoodEstimator, self).__init__(
          model, data, **kwargs
      )
  
file_path: pgmpy/pgmpy/estimators/MLE.py
imports: from itertools import chain
  import numpy
  from joblib import Parallel, delayed
  from pgmpy.estimators import ParameterEstimator
  from pgmpy.factors.discrete import TabularCPD
  from pgmpy.models import BayesianNetwork
label_desc: Use image node_id 1 to create a new MaximumLikelihoodEstimator object from inherited base classes: ParameterEstimator with example: obj = MaximumLikelihoodEstimator(model, data)