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
b1789ccc
Commit
b1789ccc
authored
6 years ago
by
Baptiste Bauvin
Browse files
Options
Downloads
Patches
Plain Diff
cvxopt_unforced
parent
9d3a3e6d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
multiview_platform/MonoMultiViewClassifiers/Monoview/Additions/CQBoostUtils.py
+25
-25
25 additions, 25 deletions
...noMultiViewClassifiers/Monoview/Additions/CQBoostUtils.py
with
25 additions
and
25 deletions
multiview_platform/MonoMultiViewClassifiers/Monoview/Additions/CQBoostUtils.py
+
25
−
25
View file @
b1789ccc
...
@@ -186,7 +186,7 @@ class ColumnGenerationClassifier(BaseEstimator, ClassifierMixin, BaseBoost):
...
@@ -186,7 +186,7 @@ class ColumnGenerationClassifier(BaseEstimator, ClassifierMixin, BaseBoost):
if
previous_w
is
not
None
:
if
previous_w
is
not
None
:
qp
.
initial_values
=
np
.
append
(
previous_w
,
[
0
])
qp
.
initial_values
=
np
.
append
(
previous_w
,
[
0
])
#
try:
try
:
solver_result
=
qp
.
solve
(
abstol
=
1e-10
,
reltol
=
1e-10
,
feastol
=
1e-10
,
return_all_information
=
True
)
solver_result
=
qp
.
solve
(
abstol
=
1e-10
,
reltol
=
1e-10
,
feastol
=
1e-10
,
return_all_information
=
True
)
w
=
np
.
asarray
(
np
.
array
(
solver_result
[
'
x
'
]).
T
[
0
])[:
n_hypotheses
]
w
=
np
.
asarray
(
np
.
array
(
solver_result
[
'
x
'
]).
T
[
0
])[:
n_hypotheses
]
...
@@ -200,17 +200,17 @@ class ColumnGenerationClassifier(BaseEstimator, ClassifierMixin, BaseBoost):
...
@@ -200,17 +200,17 @@ class ColumnGenerationClassifier(BaseEstimator, ClassifierMixin, BaseBoost):
self
.
dual_constraint_rhs
=
dual_variables
[
-
1
]
self
.
dual_constraint_rhs
=
dual_variables
[
-
1
]
# logging.info('Updating dual constraint rhs: {}'.format(self.dual_constraint_rhs))
# logging.info('Updating dual constraint rhs: {}'.format(self.dual_constraint_rhs))
#
except:
except
:
#
logging.warning('QP Solving failed at iteration {}.'.format(n_hypotheses))
logging
.
warning
(
'
QP Solving failed at iteration {}.
'
.
format
(
n_hypotheses
))
#
if previous_w is not None:
if
previous_w
is
not
None
:
#
w = np.append(previous_w, [0])
w
=
np
.
append
(
previous_w
,
[
0
])
#
else:
else
:
#
w = np.array([1.0 / n_hypotheses] * n_hypotheses)
w
=
np
.
array
([
1.0
/
n_hypotheses
]
*
n_hypotheses
)
#
#
if previous_alpha is not None:
if
previous_alpha
is
not
None
:
#
alpha = previous_alpha
alpha
=
previous_alpha
#
else:
else
:
#
alpha = self._initialize_alphas(n_examples)
alpha
=
self
.
_initialize_alphas
(
n_examples
)
return
w
,
alpha
return
w
,
alpha
...
...
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