Prediction of new data points with the Pearson kernel.
haziqj opened this issue · 2 comments
haziqj commented
Suppose we fit an I-prior model mod <- iprior(y~x, data)
, and we use the predict function to obtain the predicted value at x[1]
. Why doesn't this value match with fitted(mod)[1]
?
Suspect that there is a wrong implementation of the Pearson kernel code. The Pearson kernel is h(x_i, x_j) = I(x_i = x_j) / p_i - 1
. When a new data point x_k
is introduced which has the same value as x_i
, does p_i
change as well, or does it remain the same? p_i
is the proportion of the data which has the same value as x_i
.
Wicher2 commented
Hi haziq, probably the most logical is not to change the value of p_i.
Wicher
haziqj commented
Ah ok, then this needs fixing. At the moment the value of p_i
does change.