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 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
Get step-by-step solutions from verified subject matter experts
