In: Computer Science
In R programming
produce a scatter plot in which you plot the actual
used car prices (y axis) against the predicted used
car prices. Plot a dotted line showing where the
points would be if the predicted values equalled the
actual values. Give your plot an appropriate title.
# YOUR CODE HERE
##data is not given, using some dummy data
actual_price<-runif(15)
predicted_price<-actual_price+runif(15)
par(mfrow=c(1,2))
plot(predicted_price,actual_price,main="predicted price vs actual
price",xlab="predicted",ylab="actual")
predicted_price=actual_price
plot(predicted_price,actual_price,type="l", lty=3,main="when
predicted price = actual price",xlab="predicted",ylab="actual")