Use weights in fit
This commit is contained in:
parent
3e174f22e5
commit
69767da850
@ -125,4 +125,5 @@ def fit_scan(scan, model_dict):
|
||||
else:
|
||||
model += _model
|
||||
|
||||
scan["fit"] = model.fit(y_fit, x=x_fit)
|
||||
weights = [1 / np.sqrt(val) if val != 0 else 1 for val in y_fit]
|
||||
scan["fit"] = model.fit(y_fit, x=x_fit, weights=weights)
|
||||
|
Loading…
x
Reference in New Issue
Block a user