This Class used to compute parameters for a model using Maximum Likelihood Estimation.
import pandas as pd
from pgmpy.models import BayesianModel
from pgmpy.estimators import MaximumLikelihoodEstimator
#create dataframe
data = pd.DataFrame(data={'A': [0, 0, 1], 'B': [0, 1, 0], 'C': [1, 1, 0]})
# creating model
model = BayesianModel([('A', 'C'), ('B', 'C')])
cpd_A = MaximumLikelihoodEstimator(model, data).estimate_cpd('A')
print(cpd_A)
cpd_C = MaximumLikelihoodEstimator(model, data).estimate_cpd('C')
print(cpd_C)