Skip to content

Commit

Permalink
FeatureMetric default combine fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alTeska committed Sep 15, 2019
1 parent f87099f commit 8ad2e35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions brian2modelfitting/modelfitting/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def __init__(self, traces_times, feat_list, weights=None, combine=None):

if combine is None:
def combine(x, y):
return x - y
return abs(x - y)
self.combine = combine

if weights is None:
Expand Down Expand Up @@ -258,7 +258,7 @@ def feat_to_err(self, d1, d2):
x = d1[key]
y = d2[key]
d[key] = self.combine(x, y) * self.weights[key]

for k, v in d.items():
err += sum(v)

Expand Down

0 comments on commit 8ad2e35

Please sign in to comment.