-1
$\begingroup$

I'm using R tool to make machine learning algorithms. I made algorithm and now I have to evaluate model accuracy. So I used train(), trainControl() function. In trainControl() function, I used cv & repeatcv parameters to evaluate.

I am wondering that how to calculate model accuracy in cv & repeatcv. Is it calculated mean of produced algorithms?? or Is the model with the highest accuracy selected?

Have a nice day!

$\endgroup$

1 Answer 1

2
$\begingroup$

In order to evaluate performance of a model, you split your data into train and test datasets, use cross-validation to test the model on the train data. In the regression setting, the most commonly-used measure of accuracy of the model is the mean squared error (MSE): $$ MSE=1/n∑(y−f(xi))^2 $$ where $f(xi)$ is the prediction that you've got for $i$th observation.

For classification setting we compute error rate: $$ 1/n ∑I(yi \neq f(xi)) $$

There are other methods of accuracy measuring, you can easily google them.

$\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.