Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Supervised MultiModal Integration Tool
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
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
Baptiste Bauvin
Supervised MultiModal Integration Tool
Commits
c91f1192
Commit
c91f1192
authored
4 years ago
by
Baptiste Bauvin
Browse files
Options
Downloads
Patches
Plain Diff
Update mucombo
parent
89287be0
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
summit/multiview_platform/multiview_classifiers/mucombo.py
+5
-5
5 additions, 5 deletions
summit/multiview_platform/multiview_classifiers/mucombo.py
with
5 additions
and
5 deletions
summit/multiview_platform/multiview_classifiers/mucombo.py
+
5
−
5
View file @
c91f1192
from
sklearn.tree
import
DecisionTreeClassifier
from
sklearn.tree
import
DecisionTreeClassifier
from
multimodal.boosting.c
u
mbo
import
MuC
u
mboClassifier
from
multimodal.boosting.c
o
mbo
import
MuC
o
mboClassifier
from
..multiview.multiview_utils
import
BaseMultiviewClassifier
from
..multiview.multiview_utils
import
BaseMultiviewClassifier
from
..utils.hyper_parameter_search
import
CustomRandint
from
..utils.hyper_parameter_search
import
CustomRandint
from
..utils.dataset
import
get_samples_views_indices
from
..utils.dataset
import
get_samples_views_indices
...
@@ -10,14 +10,14 @@ from ..utils.base import base_boosting_estimators
...
@@ -10,14 +10,14 @@ from ..utils.base import base_boosting_estimators
classifier_class_name
=
"
MuCumbo
"
classifier_class_name
=
"
MuCumbo
"
class
MuCumbo
(
BaseMultiviewClassifier
,
MuC
u
mboClassifier
):
class
MuCumbo
(
BaseMultiviewClassifier
,
MuC
o
mboClassifier
):
def
__init__
(
self
,
base_estimator
=
None
,
def
__init__
(
self
,
base_estimator
=
None
,
n_estimators
=
50
,
n_estimators
=
50
,
random_state
=
None
,
**
kwargs
):
random_state
=
None
,
**
kwargs
):
BaseMultiviewClassifier
.
__init__
(
self
,
random_state
)
BaseMultiviewClassifier
.
__init__
(
self
,
random_state
)
base_estimator
=
self
.
set_base_estim_from_dict
(
base_estimator
,
**
kwargs
)
base_estimator
=
self
.
set_base_estim_from_dict
(
base_estimator
,
**
kwargs
)
MuC
u
mboClassifier
.
__init__
(
self
,
base_estimator
=
base_estimator
,
MuC
o
mboClassifier
.
__init__
(
self
,
base_estimator
=
base_estimator
,
n_estimators
=
n_estimators
,
n_estimators
=
n_estimators
,
random_state
=
random_state
,)
random_state
=
random_state
,)
self
.
param_names
=
[
"
base_estimator
"
,
"
n_estimators
"
,
"
random_state
"
,]
self
.
param_names
=
[
"
base_estimator
"
,
"
n_estimators
"
,
"
random_state
"
,]
...
@@ -31,7 +31,7 @@ class MuCumbo(BaseMultiviewClassifier, MuCumboClassifier):
...
@@ -31,7 +31,7 @@ class MuCumbo(BaseMultiviewClassifier, MuCumboClassifier):
self
.
used_views
=
view_indices
self
.
used_views
=
view_indices
numpy_X
,
view_limits
=
X
.
to_numpy_array
(
sample_indices
=
train_indices
,
numpy_X
,
view_limits
=
X
.
to_numpy_array
(
sample_indices
=
train_indices
,
view_indices
=
view_indices
)
view_indices
=
view_indices
)
return
MuC
u
mboClassifier
.
fit
(
self
,
numpy_X
,
y
[
train_indices
],
return
MuC
o
mboClassifier
.
fit
(
self
,
numpy_X
,
y
[
train_indices
],
view_limits
)
view_limits
)
def
predict
(
self
,
X
,
sample_indices
=
None
,
view_indices
=
None
):
def
predict
(
self
,
X
,
sample_indices
=
None
,
view_indices
=
None
):
...
@@ -41,7 +41,7 @@ class MuCumbo(BaseMultiviewClassifier, MuCumboClassifier):
...
@@ -41,7 +41,7 @@ class MuCumbo(BaseMultiviewClassifier, MuCumboClassifier):
self
.
_check_views
(
view_indices
)
self
.
_check_views
(
view_indices
)
numpy_X
,
view_limits
=
X
.
to_numpy_array
(
sample_indices
=
sample_indices
,
numpy_X
,
view_limits
=
X
.
to_numpy_array
(
sample_indices
=
sample_indices
,
view_indices
=
view_indices
)
view_indices
=
view_indices
)
return
MuC
u
mboClassifier
.
predict
(
self
,
numpy_X
)
return
MuC
o
mboClassifier
.
predict
(
self
,
numpy_X
)
def
get_interpretation
(
self
,
directory
,
base_file_name
,
labels
,
def
get_interpretation
(
self
,
directory
,
base_file_name
,
labels
,
multiclass
=
False
):
multiclass
=
False
):
...
...
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