Thanks for the tip. I actually had to learn a bit of matrix multiplication
and ended up calculating the RMSE this way.
scores_lr <- t(coeffs_alldata) %*% t(df_train)
rmseTrain <- (mean(((scores_lr)- trainY)^2))^0.5
full script and results here if you are interested.
http://ausdm09.freeforums.or
On 10/18/2009 11:26 PM, tdm wrote:
> I have build a model but want to then manipulate the coefficients in some
> way.
>
> I can extract the coefficients and do the changes I need, but how do I then
> put these new coefficients back in the model so I can use the predict
> function?
>
> my_model <
I have build a model but want to then manipulate the coefficients in some
way.
I can extract the coefficients and do the changes I need, but how do I then
put these new coefficients back in the model so I can use the predict
function?
my_model <- lm(x ~ . , data=my_data)
my_scores <- predict(my
3 matches
Mail list logo