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
"These constraints puts constraints on the parameter values. You will need to write a separate constraint function for each equality in each particular hypothesis to implement these constraints. This constraint function will be passed on to the optimizer."
Since each s_i is itself a function of N and S_i, which is itself a function of theta, how would we go about writing a log likelihood function that enforces a given constraint?
The text was updated successfully, but these errors were encountered:
Hi @richard-archer . I wouldn't so much write a log-likelihood function that enforces the constraint (though you could do that) as write a separate constraint to feed into the optimizer.
When you say, write a log-likelihood function that enforces the constraint, I think you mean substituting the constraint into the log-likelihood function. This seems difficult in this case. Instead, you can write a function for s_n and then write function that represents s_n - s_{n+1}. The function for s_n - s_{n+1} should be equal to zero if the constraint holds. Feed this into the optimizer: https://docs.scipy.org/doc/scipy/reference/tutorial/optimize.html#constrained-minimization-of-multivariate-scalar-functions-minimize
jmbejara
added
HW7
Discussions related to Homework #7
HW6
Discussions related to Homework #6
and removed
HW7
Discussions related to Homework #7
labels
May 28, 2019
The solutions for Q7 mentioned that:
"These constraints puts constraints on the parameter values. You will need to write a separate constraint function for each equality in each particular hypothesis to implement these constraints. This constraint function will be passed on to the optimizer."
Since each s_i is itself a function of N and S_i, which is itself a function of theta, how would we go about writing a log likelihood function that enforces a given constraint?
The text was updated successfully, but these errors were encountered: