Commit 32ab7a9e authored by Baptiste Bauvin's avatar Baptiste Bauvin
Browse files

compatible with sklearn 00.24 & pytest

parent 299a5389
Pipeline #6439 failed with stage
in 6 minutes and 40 seconds
......@@ -127,13 +127,13 @@ class MuComboClassifier(BaseEnsemble, ClassifierMixin, UBoosting):
>>> views_ind = [0, 2, 4] # view 0: sepal data, view 1: petal data
>>> clf = MuComboClassifier(random_state=0)
>>> clf.fit(X, y, views_ind) # doctest: +NORMALIZE_WHITESPACE
MuComboClassifier(base_estimator=None, n_estimators=50, random_state=0)
MuComboClassifier(random_state=0)
>>> print(clf.predict([[ 5., 3., 1., 1.]]))
[0]
>>> views_ind = [[0, 2], [1, 3]] # view 0: length data, view 1: width data
>>> clf = MuComboClassifier(random_state=0)
>>> clf.fit(X, y, views_ind) # doctest: +NORMALIZE_WHITESPACE
MuComboClassifier(base_estimator=None, n_estimators=50, random_state=0)
MuComboClassifier(random_state=0)
>>> print(clf.predict([[ 5., 3., 1., 1.]]))
[0]
......@@ -141,13 +141,8 @@ class MuComboClassifier(BaseEnsemble, ClassifierMixin, UBoosting):
>>> base_estimator = DecisionTreeClassifier(max_depth=2)
>>> clf = MuComboClassifier(base_estimator=base_estimator, random_state=1)
>>> clf.fit(X, y, views_ind) # doctest: +NORMALIZE_WHITESPACE
MuComboClassifier(base_estimator=DecisionTreeClassifier(ccp_alpha=0.0, class_weight=None, criterion='gini', max_depth=2,
max_features=None, max_leaf_nodes=None,
min_impurity_decrease=0.0, min_impurity_split=None,
min_samples_leaf=1, min_samples_split=2,
min_weight_fraction_leaf=0.0, presort='deprecated', random_state=None,
splitter='best'),
n_estimators=50, random_state=1)
MuComboClassifier(base_estimator=DecisionTreeClassifier(max_depth=2),
random_state=1)
>>> print(clf.predict([[ 5., 3., 1., 1.]]))
[0]
......
......@@ -127,15 +127,13 @@ class MumboClassifier(BaseEnsemble, ClassifierMixin, UBoosting):
>>> views_ind = [0, 2, 4] # view 0: sepal data, view 1: petal data
>>> clf = MumboClassifier(random_state=0)
>>> clf.fit(X, y, views_ind) # doctest: +NORMALIZE_WHITESPACE
MumboClassifier(base_estimator=None, best_view_mode='edge',
n_estimators=50, random_state=0)
MumboClassifier(random_state=0)
>>> print(clf.predict([[ 5., 3., 1., 1.]]))
[1]
>>> views_ind = [[0, 2], [1, 3]] # view 0: length data, view 1: width data
>>> clf = MumboClassifier(random_state=0)
>>> clf.fit(X, y, views_ind) # doctest: +NORMALIZE_WHITESPACE
MumboClassifier(base_estimator=None, best_view_mode='edge',
n_estimators=50, random_state=0)
MumboClassifier(random_state=0)
>>> print(clf.predict([[ 5., 3., 1., 1.]]))
[1]
......@@ -143,13 +141,8 @@ class MumboClassifier(BaseEnsemble, ClassifierMixin, UBoosting):
>>> base_estimator = DecisionTreeClassifier(max_depth=2)
>>> clf = MumboClassifier(base_estimator=base_estimator, random_state=0)
>>> clf.fit(X, y, views_ind) # doctest: +NORMALIZE_WHITESPACE
MumboClassifier(base_estimator=DecisionTreeClassifier(ccp_alpha=0.0, class_weight=None,
criterion='gini', max_depth=2, max_features=None,
max_leaf_nodes=None, min_impurity_decrease=0.0,
min_impurity_split=None, min_samples_leaf=1, min_samples_split=2,
min_weight_fraction_leaf=0.0, presort='deprecated', random_state=None,
splitter='best'),
best_view_mode='edge', n_estimators=50, random_state=0)
MumboClassifier(base_estimator=DecisionTreeClassifier(max_depth=2),
random_state=0)
>>> print(clf.predict([[ 5., 3., 1., 1.]]))
[1]
......
......@@ -152,8 +152,7 @@ class MVML(MKernel, BaseEstimator, ClassifierMixin, RegressorMixin):
>>> clf.get_params()
{'eta': 1, 'kernel': 'linear', 'kernel_params': None, 'learn_A': 1, 'learn_w': 0, 'lmbda': 0.1, 'n_loops': 6, 'nystrom_param': 1.0, 'precision': 0.0001}
>>> clf.fit(X, y, views_ind) # doctest: +NORMALIZE_WHITESPACE
MVML(eta=1, kernel='linear', kernel_params=None, learn_A=1, learn_w=0,
lmbda=0.1, n_loops=6, nystrom_param=1.0, precision=0.0001)
MVML()
>>> print(clf.predict([[ 5., 3., 1., 1.]]))
0
......
......@@ -177,7 +177,7 @@ def setup_package():
'ensemble methods, boosting, kernel')
packages = find_packages(exclude=['*.tests'])
install_requires = ['scikit-learn>=0.24', 'numpy', 'scipy', 'cvxopt' ]
python_requires = '>=3.5'
python_requires = '>=3.6'
extras_require = {
'dev': ['pytest', 'pytest-cov'],
'doc': ['sphinx', 'numpydoc', 'sphinx_gallery', 'matplotlib']}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment