Skip to content
Snippets Groups Projects
Commit 2048aab6 authored by Manuel Günther's avatar Manuel Günther
Browse files

Added loss function query to boosting trainer.

parent ba649671
No related branches found
No related tags found
No related merge requests found
......@@ -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'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment