Okay to evaluate let's say linear regression our prediction model regression model. So we can use all those r square or those mean absolute error mean squared error. So to do that we have to employ SQL and domain trees and then import them in as absolute error and then that means square. So we can do something like this. So praying Okay, so I do the R square. It bras.
More the dogs score, x train and y train k I today in mean absolute error free slash mean to absolute error okay. So I will use mean absolute error mean absolute error and then put in our y test and then prediction prediction okay then I can print the mean square error means square error k means square has Why test inventor prediction. So I going to get some error because I need to convert them to str. So I need to convert them to string str the STL here STL here okay then I can run the code I should get asked raise arousal on a server. So the higher this value, meaning the higher the modest value is going to be one, then the model is more accurate a lot more better than mean absolute error means The mean of error, then our mean square error means we square the error and and get an average and then I will say the lesser the error the better the model.
So, this is how we evaluate a regression model those are prediction water. So, classification is for predicting all those variables if categories or groups are cross So, we use classification to predict all those categorical variables, we use a prediction model to predict all those numeric variables. So, for classification we use confusion matrix. So, for prediction or regression we use our square mean absolute error and the mean square error