You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that for InputDrivenObservations, there are parameters prior_mean and prior_sigma which governs strength of the prior on GLM weights. Does this act as an L2 regularization? Otherwise, if I were to add an L1 or L2 penalty or a custom regularizer on the GLM weights, should I add the regularization term only in the calculation of log_prior or also in the _objective, _gradient, and _hess functions?
The text was updated successfully, but these errors were encountered:
Looking at the code, it doesn't look like prior_mean actually gets used in the M step! It only gets used in the calculation of log_prior(), which is used for tracking convergence of EM. On the other hand, prior_sigma does get used, and it specifies the scale of the L2 regularization though. If you wanted to add L1 regularization you'd have to make the change in all of the functions you listed. However, there are better optimization methods for mixed L1/L2 regularization than the trust_ncg method used in this implementation. It could be a lot of work... it might be better to call into an off-the-shelf optimizer like cvxpy.
I see that for InputDrivenObservations, there are parameters
prior_mean
andprior_sigma
which governs strength of the prior on GLM weights. Does this act as an L2 regularization? Otherwise, if I were to add an L1 or L2 penalty or a custom regularizer on the GLM weights, should I add the regularization term only in the calculation oflog_prior
or also in the_objective
,_gradient
, and_hess
functions?The text was updated successfully, but these errors were encountered: