Open yzjing opened 5 years ago
Update: after some more checking I think the problem comes from the code:
i = 0
XX = gam_kudos.generate_X_grid(term=i,n=100)
plt.plot(gam_kudos.partial_dependence(term=i, X=XX))
print(XX[:,0])
array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])
For some reason it doesn't pick up the range of my _i_th feature.
could you quickly check which term is your intercept? (Just in case it is an easy fix)
I'm finding this a little unclear. Are the n samples chosen randomly? What is their meaning?
Example:
The above code generates the following plot.
I know that my _i_th feature is bound between [0,1], and the response variable is bound between [-6, 10]. This leaves me confused with this plot - what is the meaning of the
x
andy
axis?Am I missing something here? I sincerely appreciate any help.