Closed erineidschun closed 5 years ago
My writeup tries to follow the paper's notation as closely as possible. It's defined that way in the paper. It's a little confusing, though. When looking at the paper, it seems like W_L isn't included in W. So, yes, X should just be the Z variables.
The estimates that you should be getting should match the paper. The MLE estimates that I'm getting match the paper very closely. I get an optimal theta like this:
array([-0.53105114, 2.26253387, 0.34522307, 0.22698121, -0.48084866,
-0.03044045, 0.00350979, -0.02145047, 0.86303471, 0.03470013,
0.15057873, 0. , 0.08046184, 0.52817594, 0.75573093,
0.46457693, 0.59837449, 0.12016968, -0.73548591])
The notes provided in the homework imply that we should define X as X = np.c_[W, Z], however, when doing so, this creates compile errors with the matrix multiplication aspect of X and Beta when we define the V function. This is because when X = [W, Z] we have this misalignment: shapes (202,5) and (4,) not aligned: 5 (dim 1) != 4 (dim 0)
So for the purposes of this homework, it seems we might have to just do X = np.c_[Z] for the code to compile. If this is the case, can you hint at the value of the estimate we should be getting?