I uses Caret to get a prediction for electricity usage per day. I am wondering if there is a way to plot both predicted data and the actual data to inspect the difference.
I check this post, but I didn't find the solution I want. how to plot actual and predicted values?
Assume two list of numbers.
actual <- [1,2,3,4]
predicted <- [1.3,2,3.1,4]
Is there a simply way to plot the two line to observe the difference? Thanks!
plot(actual, predicted)
? Also what you've provided is not valid R code. Literal arrays should look likeactual <- c(1,2,3,4)
– MrFlickplot(day, actual); points(day, predicted, col = "blue")
. It is better to explain the question clearly with an example, when possible. – Suren