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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dev
scikit-multimodallearn
Commits
7f11136c
Commit
7f11136c
authored
5 years ago
by
Dominique Benielli
Browse files
Options
Downloads
Patches
Plain Diff
call alpha
parent
7d3bb6f1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#4209
passed
5 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
multimodal/boosting/cumbo.py
+3
-3
3 additions, 3 deletions
multimodal/boosting/cumbo.py
multimodal/boosting/mumbo.py
+3
-3
3 additions, 3 deletions
multimodal/boosting/mumbo.py
with
6 additions
and
6 deletions
multimodal/boosting/cumbo.py
+
3
−
3
View file @
7f11136c
...
...
@@ -216,10 +216,10 @@ class MuCumboClassifier(BaseEnsemble, ClassifierMixin, UBoosting):
"""
Compute values of confidence rate alpha given edge values.
"""
np
.
where
(
edges
>
1.0
,
edges
,
1.0
)
alphas
=
0.5
*
np
.
log
((
1.
+
edges
)
/
(
1.
-
edges
))
if
np
.
any
(
np
.
isinf
(
alphas
))
or
np
.
any
(
np
.
isnan
(
alphas
)):
alphas
[
np
.
where
(
np
.
isnan
(
alphas
))[
0
]]
=
1.0
if
np
.
any
(
np
.
isinf
(
alphas
)):
alphas
[
np
.
where
(
np
.
isinf
(
alphas
))[
0
]]
=
1.0
if
np
.
any
(
np
.
isnan
(
alphas
)):
alphas
[
np
.
where
(
np
.
isnan
(
alphas
))[
0
]]
=
1.0
return
alphas
def
_compute_cost
(
self
,
label_score
,
predicted_classes
,
y
,
alphas
,
betas
,
...
...
This diff is collapsed.
Click to expand it.
multimodal/boosting/mumbo.py
+
3
−
3
View file @
7f11136c
...
...
@@ -223,10 +223,10 @@ class MumboClassifier(BaseEnsemble, ClassifierMixin, UBoosting):
"""
Compute values of confidence rate alpha given edge values.
"""
np
.
where
(
edges
>
1.0
,
edges
,
1.0
)
alphas
=
0.5
*
np
.
log
((
1.
+
edges
)
/
(
1.
-
edges
))
if
np
.
any
(
np
.
isinf
(
alphas
))
or
np
.
any
(
np
.
isnan
(
alphas
)):
alphas
[
np
.
where
(
np
.
isnan
(
alphas
))[
0
]]
=
1.0
if
np
.
any
(
np
.
isinf
(
alphas
)):
alphas
[
np
.
where
(
np
.
isinf
(
alphas
))[
0
]]
=
1.0
if
np
.
any
(
np
.
isnan
(
alphas
)):
alphas
[
np
.
where
(
np
.
isnan
(
alphas
))[
0
]]
=
1.0
return
alphas
def
_compute_cost_global
(
self
,
label_score_global
,
best_predicted_classes
,
...
...
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