Skip to content

Commit

Permalink
Fix bug: MaxHingeTarget was inheriting loss='mse' from parent Target
Browse files Browse the repository at this point in the history
  • Loading branch information
felker committed Jan 9, 2020
1 parent 8a36a58 commit eb8f664
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plasma/models/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def threshold_range(T_warning):
# time sequence is punished. Also implements class weighting
class MaxHingeTarget(Target):
activation = 'linear'
loss = 'hinge'
fac = 1.0

@staticmethod
Expand Down Expand Up @@ -198,7 +199,7 @@ def threshold_range(T_warning):

class HingeTarget(Target):
activation = 'linear'
loss = 'hinge' # hinge
loss = 'hinge'

@staticmethod
def loss_np(y_true, y_pred):
Expand Down

0 comments on commit eb8f664

Please sign in to comment.