mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-07-21 19:18:58 +00:00
Use y_scale in coefficient utility
This commit is contained in:
parent
a519043f1b
commit
2049217471
1 changed files with 1 additions and 2 deletions
|
|
@ -52,12 +52,11 @@ def regressor_coefficients(m):
|
|||
Only to different to `coef` if `mcmc_samples > 0`.
|
||||
"""
|
||||
assert len(m.extra_regressors) > 0, 'No extra regressors found.'
|
||||
y_max = m.history['y'].max()
|
||||
coefs = []
|
||||
for regressor, params in m.extra_regressors.items():
|
||||
beta = m.params['beta'][:, regressor_index(m, regressor)]
|
||||
if params['mode'] == 'additive':
|
||||
coef = beta * y_max / params['std']
|
||||
coef = beta * m.y_scale / params['std']
|
||||
else:
|
||||
coef = beta / params['std']
|
||||
percentiles = [
|
||||
|
|
|
|||
Loading…
Reference in a new issue