skbn.BNClassifier: AttributeError: 'BNLearner' object has no attribute 'useMDL'
Receive an AttributeError
when using MIICMDL
argument for learningMethod
of skbn.BNClassifier
.
Looks like useMDL
should be replaced with useMDLCorrection
?
It looks like useNML
will also have a similar issue in _learningMethods.py
.
code to reproduce:
import pyAgrum.skbn as skbn
from sklearn.datasets import make_moons
from sklearn.model_selection import train_test_split
X, y = make_moons(noise=0.3, random_state=0)
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.4, random_state=42
)
clf = skbn.BNClassifier(
learningMethod="MIICMDL",
aPriori="Smoothing",
aPrioriWeight=1,
discretizationNbBins=5,
discretizationStrategy="uniform",
usePR=False,
)
clf.fit(X_train, y_train)
Environment:
Python 3.9.7
pyAgrum __version__ = 0.22.5
sklearn __version__ = 1.0.2
DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=21.2.0