To remove Null values in price column, We can't fill in an arbitrary price, so we had to remove all rows with missing price value.
To run a ML model, we need to convert to numeric dtype
Comments: 'Make', 'Color' and 'Doors' column have been converted into a numerical data type for the machine to understand. The Odometer column hasn't been changed
--Metric Functions- R^2, MAE, MSE --Scoring parameters- accuracy, precision, recall, f1
R-squared compares the model predictions to the mean of the targets(Price) values can range from infinity(poor model) to 1. e.g if the model does predict the mean of the targets, its R^2 value would be 0, and if it perfectly predicts a range of numbers it's R^2 value would be 1.
MAE is the average of the absolute differences between predictions and actual values. It gives an idea of how wrong the model predictions are.
Let's try the MAE on the RandomForestRegression model
Let's use the mean-squared error to estimate
Comment:Result shows similar patterns with the R^2 estimator. Note that the values (differences) are not the same.
From the model test, the result of the predicted values does not show a close proximity to the actual value.
Make= loaded_model["Make"] colour=loaded_model["colour"] Doors=loaded_model["Doors"] Odometer= loaded_model["Odometer]