# Reducing MAE or RMSE of linear regression

I am trying to guess a home price and at the end I intend to figure out a formula by using linear regression. As you can see here, I have 1480 samples with 45 features in which price(fiyat) is the target variable.

Do higher values for $$RMSE$$ and $$MAE$$ mean that the dataset cannot be trained in a good manner?

Is there a way to reduce these values? As you can see $$R2$$ seems well.

How can we say that how much percentage of error occurs for the guesses on average? If we can how much could you say?

There is really substantial difference between the prices and guesses as being seen below:

• This might be a related post: datascience.stackexchange.com/q/52398/71442 May 26 '19 at 10:37
• @Peter are you sure that adding polynomial variables to "m2" reduces substantially the erroneousness? It even may increase. May 26 '19 at 11:38
• It is a matter of try and error. However, beyond data augmentation, there is little room to improve OLS estimates. Mayber you can also try to "shrink" coefficients by L1/L2 norm (Lasso or Ridge). But I think in your case, this will not help too much. May 26 '19 at 16:25

You can try things like outlier removal, reducing data skewness, or stacking different models. For an advanced regression guide, checkout this kernel from Kaggle.

Use the below steps to get better results:

1. Using describe function you will get know the values of each column if it contains numbers. find the outliers and replace those with Mean or Median or Mode values.
2. Identify the columns to know the impact on data set ex: heat maps, we will get know the columns which are key once.
3. Use multiple models (Linear Regression, Random forest, SVM, etc.) with multiple parameters (change the parameter values in each model) for better results.
4. Check the error with multiple models with multiple parameters and analyze the results.

Before removing outliers or to "treat" the data long enough to suit your model, please have a look at the following article and check if a linear model is the best choice for your data set.

Please keep in mind that all those statistical models make assumptions about the data you give as an input. You will only get reliable results if those assumptions are met.

Root Mean Square Error (RMSE) and Root Absolute Error (RAE) has same unit as the target value (home price in your case). It gives the mean error made by the model when doing the predictions of the given dataset. Depending on scale of your home price in training data it may not be that high. If scale of home price are in millions then the errors in thousands may not be that bad. Every dataset has some noise which causes inherent error on every model.

Still, if it is high according to scale of home price in your dataset you may try some of following:

• Remove outliers in the data
• Do feature selection, some of features may not be as informative.
• Try to combine some features to make it more meaningful e.g. ratio of some feature may be more meaningful than individual features to predict price.
• Maybe the linear regression is under fitting or over fitting the data you can check ROC curve and try to use more complex model like polynomial regression or regularization respectively