Getting pyAgrum error: 'Object not found: label 'x' is unknown
I am trying to train a Bayesian Network or a Naive Bayes Classifier using pyAgrum, but I keep on getting the following type of error:
[pyAgrum] Object not found: label '17' is unknown in number_inpatient:Integer({0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|18|19}
This is my code:
ClassfromBN = skbn.BNClassifier(
learningMethod="MIIC",
scoringType = "AIC",
prior="Smoothing",
DirichletCsv = None,
constraints = None,
possibleSkeleton = None,
priorWeight=2,
discretizationStrategy="kmeans",
discretizationNbBins = 4,
discretizationThreshold= 20,
usePR=False,
significant_digit=13
)
cv = cross_validate(ClassfromBN, df_filled.drop(target,axis=1), df_filled[target], cv=5)
cv['test_score'].mean()