Question: Write a function called exponentialRegressionNegLogLikelihood that takes as arguments a vector y, a design matrix X of features, and a vector of parameters. The function

 Write a function called exponentialRegressionNegLogLikelihood that takes as arguments a vector

Write a function called exponentialRegressionNegLogLikelihood that takes as arguments a vector y, a design matrix X of features, and a vector of parameters. The function should return the negative log likelihood of this dataset, assuming that each element of y is independent, and exponentially distributed with 1 = exp(-XB). Test your function by calling it with b = np.array([1, 3]) X = np.array([[1.4, 2.1, 3], [2.2, 3, 1.5]]).T y = np.array([0, 2.5, 10]) U def exponentialRegressionNegLogLikelihood (b, x, y): lamb = neg_log_lik - return # Test your function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!