Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
scikit-multimodallearn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dev
scikit-multimodallearn
Commits
299a5389
Commit
299a5389
authored
Feb 25, 2021
by
Baptiste Bauvin
Browse files
Options
Downloads
Patches
Plain Diff
compatible with sklearn 00.24
parent
89d4a781
No related branches found
No related tags found
No related merge requests found
Pipeline
#6438
failed
Feb 25, 2021
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
multimodal/tests/test_combo.py
+9
-2
9 additions, 2 deletions
multimodal/tests/test_combo.py
multimodal/tests/test_mumbo.py
+3
-2
3 additions, 2 deletions
multimodal/tests/test_mumbo.py
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
13 additions
and
5 deletions
multimodal/tests/test_combo.py
+
9
−
2
View file @
299a5389
...
@@ -64,6 +64,12 @@ from multimodal.boosting.combo import MuComboClassifier
...
@@ -64,6 +64,12 @@ from multimodal.boosting.combo import MuComboClassifier
from
multimodal.tests.data.get_dataset_path
import
get_dataset_path
from
multimodal.tests.data.get_dataset_path
import
get_dataset_path
from
multimodal.datasets.data_sample
import
MultiModalArray
from
multimodal.datasets.data_sample
import
MultiModalArray
class
NoSampleWeightLasso
(
Lasso
):
def
fit
(
self
,
X
,
y
,
check_input
=
True
):
return
Lasso
.
fit
(
self
,
X
,
y
,
sample_weight
=
None
,
check_input
=
True
)
class
TestMuComboClassifier
(
unittest
.
TestCase
):
class
TestMuComboClassifier
(
unittest
.
TestCase
):
@classmethod
@classmethod
...
@@ -836,7 +842,7 @@ class TestMuComboClassifier(unittest.TestCase):
...
@@ -836,7 +842,7 @@ class TestMuComboClassifier(unittest.TestCase):
#
#
def
test_classifier
(
self
):
def
test_classifier
(
self
):
return
check_estimator
(
MuComboClassifier
)
return
check_estimator
(
MuComboClassifier
()
)
#
#
#
#
# def test_iris():
# def test_iris():
...
@@ -957,7 +963,8 @@ class TestMuComboClassifier(unittest.TestCase):
...
@@ -957,7 +963,8 @@ class TestMuComboClassifier(unittest.TestCase):
# # Check that using a base estimator that doesn't support sample_weight
# # Check that using a base estimator that doesn't support sample_weight
# # raises an error.
# # raises an error.
clf
=
MuComboClassifier
(
Lasso
())
clf
=
MuComboClassifier
(
NoSampleWeightLasso
())
self
.
assertRaises
(
ValueError
,
clf
.
fit
,
self
.
iris
.
data
,
self
.
iris
.
target
,
self
.
iris
.
views_ind
)
self
.
assertRaises
(
ValueError
,
clf
.
fit
,
self
.
iris
.
data
,
self
.
iris
.
target
,
self
.
iris
.
views_ind
)
# assert_raises(ValueError, clf.fit, iris.data, iris.target, iris.views_ind)
# assert_raises(ValueError, clf.fit, iris.data, iris.target, iris.views_ind)
#
#
...
...
This diff is collapsed.
Click to expand it.
multimodal/tests/test_mumbo.py
+
3
−
2
View file @
299a5389
...
@@ -57,6 +57,7 @@ from sklearn.tree import DecisionTreeClassifier
...
@@ -57,6 +57,7 @@ from sklearn.tree import DecisionTreeClassifier
from
sklearn
import
datasets
from
sklearn
import
datasets
from
multimodal.boosting.mumbo
import
MumboClassifier
from
multimodal.boosting.mumbo
import
MumboClassifier
from
multimodal.tests.test_combo
import
NoSampleWeightLasso
class
TestMuCumboClassifier
(
unittest
.
TestCase
):
class
TestMuCumboClassifier
(
unittest
.
TestCase
):
...
@@ -730,7 +731,7 @@ class TestMuCumboClassifier(unittest.TestCase):
...
@@ -730,7 +731,7 @@ class TestMuCumboClassifier(unittest.TestCase):
# e = MumboClassifier()
# e = MumboClassifier()
# e.fit(X_zero_features, y)
# e.fit(X_zero_features, y)
# print(e.predict(X_zero_features))
# print(e.predict(X_zero_features))
return
check_estimator
(
MumboClassifier
)
return
check_estimator
(
MumboClassifier
()
)
def
test_iris
(
self
):
def
test_iris
(
self
):
# Check consistency on dataset iris.
# Check consistency on dataset iris.
...
@@ -840,7 +841,7 @@ class TestMuCumboClassifier(unittest.TestCase):
...
@@ -840,7 +841,7 @@ class TestMuCumboClassifier(unittest.TestCase):
# Check that using a base estimator that doesn't support sample_weight
# Check that using a base estimator that doesn't support sample_weight
# raises an error.
# raises an error.
clf
=
MumboClassifier
(
Lasso
())
clf
=
MumboClassifier
(
NoSampleWeight
Lasso
())
self
.
assertRaises
(
ValueError
,
clf
.
fit
,
self
.
iris
.
data
,
self
.
iris
.
target
,
self
.
iris
.
views_ind
)
self
.
assertRaises
(
ValueError
,
clf
.
fit
,
self
.
iris
.
data
,
self
.
iris
.
target
,
self
.
iris
.
views_ind
)
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
299a5389
...
@@ -176,7 +176,7 @@ def setup_package():
...
@@ -176,7 +176,7 @@ def setup_package():
keywords
=
(
'
machine learning, supervised learning, classification,
'
keywords
=
(
'
machine learning, supervised learning, classification,
'
'
ensemble methods, boosting, kernel
'
)
'
ensemble methods, boosting, kernel
'
)
packages
=
find_packages
(
exclude
=
[
'
*.tests
'
])
packages
=
find_packages
(
exclude
=
[
'
*.tests
'
])
install_requires
=
[
'
scikit-learn>=0.2
2
'
,
'
numpy
'
,
'
scipy
'
,
'
cvxopt
'
]
install_requires
=
[
'
scikit-learn>=0.2
4
'
,
'
numpy
'
,
'
scipy
'
,
'
cvxopt
'
]
python_requires
=
'
>=3.5
'
python_requires
=
'
>=3.5
'
extras_require
=
{
extras_require
=
{
'
dev
'
:
[
'
pytest
'
,
'
pytest-cov
'
],
'
dev
'
:
[
'
pytest
'
,
'
pytest-cov
'
],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment