Skip to content

Commit

Permalink
adjust bounds of power transformer fit (#446)
Browse files Browse the repository at this point in the history
* adjust bounds of power transformer fit

* add comments
  • Loading branch information
veni-vidi-vici-dormivi committed May 16, 2024
1 parent eb1e20e commit c527d17
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mesmer/mesmer_m/power_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ def _neg_log_likelihood(coeffs):
]
local_yearly_T = local_yearly_T[~np.isnan(local_yearly_T)]

# choosing bracket -2, 2 like for boxcox
bounds = np.c_[[0, -0.1], [1, 0.1]]
# first coefficient only positive for logistic function
# second coefficient bounded to avoid very steep function
bounds = np.array([[0, np.inf], [-0.1, 0.1]])
# first guess is that data is already normal distributed
first_guess = np.array([1, 0])

Expand Down

0 comments on commit c527d17

Please sign in to comment.