Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.learn.boosting
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
bob
bob.learn.boosting
Commits
2048aab6
Commit
2048aab6
authored
11 years ago
by
Manuel Günther
Browse files
Options
Downloads
Patches
Plain Diff
Added loss function query to boosting trainer.
parent
ba649671
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xbob/boosting/core/boosting.py
+4
-3
4 additions, 3 deletions
xbob/boosting/core/boosting.py
with
4 additions
and
3 deletions
xbob/boosting/core/boosting.py
+
4
−
3
View file @
2048aab6
...
...
@@ -141,7 +141,9 @@ class Boost:
self
.
weak_trainer_type
=
trainer_type
def
get_loss_function
(
self
):
"""
Returns the loss function this trainer will use.
"""
return
losses
.
LOSS_FUNCTIONS
[
self
.
loss_type
]()
def
train
(
self
,
fset
,
targets
,
boosted_machine
=
None
):
...
...
@@ -188,8 +190,7 @@ class Boost:
else
:
machine
=
BoostedMachine
()
loss_class
=
losses
.
LOSS_FUNCTIONS
[
self
.
loss_type
]
loss_func
=
loss_class
()
loss_func
=
self
.
get_loss_function
()
# For lut trainer the features should be integers
#if(self.weak_trainer_type == 'LutTrainer'):
...
...
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