e15190.neutron_wall.pulse_shape_discrimination.FastTotalRansacEstimatorNeutron¶
- class e15190.neutron_wall.pulse_shape_discrimination.FastTotalRansacEstimatorNeutron(*args, **kwargs)¶
Functions
__init__(*args, **kwargs)fit(X, y, **kwargs)get_params([deep])model(x, a0, a1, a2)The fast-total relation for neutrons.
predict(X)score(X, y)Coefficient of determination.
set_params(**params)Properties
x_switch- __init__(*args, **kwargs)¶
- model(x, a0, a1, a2)¶
The fast-total relation for neutrons.
Unlike gammas, whose fast-total relation is mostly linear, the observed fast-total relation of neutrons has non-linearity at low TOTAL light region. Hence, we fit the fast-total relation using piecewise function. When
TOTAL >= x_switch, we use linear function; whenTOTAL < x_switch, we quadratic function. AtTOTAL = x_switch, the two functions are continuous and smooth. This removes the freedom of choosing the intercept and slope of the linear function, hence there are only three parameters,a0,a1anda2.- Parameters
x (array_like) – The TOTAL values.
a0 (float) – The intercept.
a1 (float) – The slope.
a2 (float) – The coefficient of the quadratic term.
- Returns
y – The predicted FAST values.
- Return type
array_like
- score(X, y)¶
Coefficient of determination.
- Parameters
X (array-like, shape (n_samples, n_features)) – Input data.
y (array-like, shape (n_samples,)) – Target values, or ground truth.
- Returns
score – The coefficient of determination. For model that perfectly predicts all true values, the score is 1. For model that always predicts the mean of all true values, the score is 0. Models with worse performance will have negative scores.
- Return type
float