Professional Documents
Culture Documents
Evaluation Metrics
are very important as they tell us, how accurate our model is.
Linear Regression
In the above image, we can see that we have plotted a linear curve,
but the curve is not perfect as some points are lying above the line
& some are lying below the line.
5. R-Squared
6. Adjusted R-Squared
Here, ‘y_true’ is the true target values & ‘y_pred’ is the predicted
target values.
I’m sure that after looking at the above mathematical function, you
will be thinking of the implementation. But, don’t worry, there is
an inbuilt function called ‘mean_squared_error’.
It squares the error & then it takes the square root of the total
average function. Below, is the mathematical function which will
make the things more clear.
In Example 1, we can see that the error is very large. The actual
value is 1 & the predicted value is 401.
Now, if we take the above case in the RMSLE, then, the RMSLE of
Ex 1 is greater than Ex 2. & therefore, RMSLE solves the problem
which occurred in RMSE (Root Mean Squared Error)
This method actually, scales down the values & thus, it avoids the
above error.
R — Squared
R — Squared
If x >1, this means that, the MSE of the numerator is greater than
the MSE of the baseline model which in turn means that, the new
model is worse than the baseline model.
Here, ‘y_true’ is the true target variable & ‘y_pred’ is the predicted
target variable
Adjusted R — Squared
Adjusted R — Squared
Well, the above are the 6 most commonly used evaluation metrics
for Regression Problems.
But, there are a lot of factors that are to be done before model
training like data cleaning, data visualization, data analysis,
missing value treatment, outlier treatment, etc.