В Sat, 27 Jul 2024 11:00:34 +0000
akshay kulkarni <akshay...@hotmail.com> пишет:

> My question is : how to plot the final model on the actual data
> points?

Have you been able to obtain the predictions? What happens if you call
predict() on the model object returned to you by train()?

Once you have both the data and the prediction, it should be as simple
as plot(traindata$predictor_column, traindata$regressor_column);
lines(traindata$predictor_column, previously_returned_predictions). (Or
an equivalent with your favourite plotting system for R.)

Try following the vignette from the 'caret' package:
https://cran.r-project.org/package=caret/vignettes/caret.html

If you do encounter an error on your way or get stuck not knowing how
exactly to continue, please ask a more specific question.

-- 
Best regards,
Ivan

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to