mirror of
https://github.com/Doctorado-ML/bayesclass.git
synced 2025-08-17 08:35:53 +00:00
Remove min_data hyperparameter
This commit is contained in:
@@ -324,11 +324,10 @@ class KDB(BayesBase):
|
|||||||
|
|
||||||
|
|
||||||
class AODE(BayesBase, BaseEnsemble):
|
class AODE(BayesBase, BaseEnsemble):
|
||||||
def __init__(self, min_data=30, show_progress=False, random_state=None):
|
def __init__(self, show_progress=False, random_state=None):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
show_progress=show_progress, random_state=random_state
|
show_progress=show_progress, random_state=random_state
|
||||||
)
|
)
|
||||||
self.min_data = min_data
|
|
||||||
|
|
||||||
def _check_params(self, X, y, kwargs):
|
def _check_params(self, X, y, kwargs):
|
||||||
expected_args = ["class_name", "features"]
|
expected_args = ["class_name", "features"]
|
||||||
|
@@ -2,8 +2,6 @@ import pytest
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
from sklearn.datasets import load_iris
|
from sklearn.datasets import load_iris
|
||||||
from sklearn.preprocessing import KBinsDiscretizer
|
from sklearn.preprocessing import KBinsDiscretizer
|
||||||
from matplotlib.testing.decorators import image_comparison
|
|
||||||
from matplotlib.testing.conftest import mpl_test_settings
|
|
||||||
|
|
||||||
|
|
||||||
from bayesclass import AODE
|
from bayesclass import AODE
|
||||||
@@ -26,11 +24,9 @@ def test_AODE_default_hyperparameters(data, clf):
|
|||||||
# Test default values of hyperparameters
|
# Test default values of hyperparameters
|
||||||
assert not clf.show_progress
|
assert not clf.show_progress
|
||||||
assert clf.random_state is None
|
assert clf.random_state is None
|
||||||
assert clf.min_data == 30
|
clf = AODE(show_progress=True, random_state=17)
|
||||||
clf = AODE(show_progress=True, random_state=17, min_data=3)
|
|
||||||
assert clf.show_progress
|
assert clf.show_progress
|
||||||
assert clf.random_state == 17
|
assert clf.random_state == 17
|
||||||
assert clf.min_data == 3
|
|
||||||
clf.fit(*data)
|
clf.fit(*data)
|
||||||
assert clf.class_name_ == "class"
|
assert clf.class_name_ == "class"
|
||||||
assert clf.features_ == [
|
assert clf.features_ == [
|
||||||
|
Reference in New Issue
Block a user