-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MRG] Temporal weighting #31
Conversation
Somewhat forgot about this PR. @romainbrette, what do you think? |
It runs, but does it apply also to refine? |
There seems to be some incompatibility with latest scikit-optimize
# Conflicts: # brian2modelfitting/fitter.py
Oops, good catch! No it didn't, but now it does :) |
What does the error correspond to now? mean(t_weight*error)? |
Yes. I now realize that we should maybe make this clearer in the documentation. Weighting the first part of the trace as 0 or using We could renormalize things by considering the total weight (so only the relative weights would matter)? |
for example with something like |
En tout cas ça marche! |
Ah non ça ne doit pas être exactement ça |
(la normalisation je veux dire) |
I guess
would work? |
yes that seems rights (ie |
I implemented the normalization of the weights. This makes sure that using |
Discussed with @romainbrette and decided that applying the weighting to the squared error is ok. After all, users will chose this value somewhat arbitrarily anyway. Going ahead with the merge. |
This adds a simple temporal weighting factor to
MSEMetric
. Instead oft_start
you can providet_weights
, a vector of values of the same size as the trace that gets multiplied with the error (i.e. scales the squared error in the case ofMSEMetric
). For simplicity, it cannot be combined witht_start
.Closes #22