? Sat, 27 Jul 2024 11:00:34 +0000
akshay kulkarni <akshay_e4 at 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