3
$\begingroup$

I searched a method to determine the accuracy of a linear regression model. I found that I should calculate r-squared. Is this the only method or are there other methods?

$\endgroup$

2 Answers 2

7
$\begingroup$

The coefficient of determination, $R^2$, measures how well your model is fitting to the data, or the other way around. But if you want to make predictions with your model, then $R^2$ doesn't tell you much about the accuracy of the predictions.

Using (Cross) Validation is one way to measure the accuracy of such kinds of predictions. The idea is as follows: Randomly select one or more of your data points which you set aside and not use to fit the parameters of the model. Then, build your model and given the x-value of the data point(s) set aside, predict its y-value using the model. You can then calculate the prediction error and compare different models. Usually, you calculate the mean of the squared error. Cross Validation is an extension of this idea where you compute several models, say, 5, leaving out different 20% of the data points to build a model.

Other techniques to see if the model is behaving sensibly are related to the analysis of the residuals (difference between actual y-value and model's y-value) of the data points used to build the model; you can find an overview here.

$\endgroup$
1
  • $\begingroup$ cross-validation is a method of validation, I already used it in the validation(I use the weka multiple linear regression to build my model). Weka gives me as output correlation coefficient but I would like to calculate the accurucy $\endgroup$
    – user45533
    Commented May 14, 2014 at 13:14
1
$\begingroup$

@Roland is right. If you were looking for a more succinct answer, you have to compute the scores from your predictions using Weka, with many different cross-validation sets, average them, and compute the standard deviation. This will give you the accuracy and +/-.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.