I have recently implemented a machine learning algorithm as a part of a new credit risk scoring system. I would now like to evaluate the accuracy/performance of the algorithm when used in a "real world setting".

In order to do the evaluation, there is a need for manual data gathering, since this is labor intensive I would like to keep evaluation sample as small as possible, while still keeping it large enough so that it can yield significant results.

I have not been able to find much information online regarding how to formally evaluate the performance of a machine learning algorithm when it is used in practice.

Are there any guidelines/suggestion regarding the minimum sample size needed to evaluate the performance of an ML algorithm?

I understand that the sample I draw would need to be random and undergo a significance test to ensure the sample conforms with the trends of the total population, but outside of that what other consideration need to be made?


I do not have a definitive answer for your scenario, however I may suggest the following, considering documentation resources, accuracy confidence interval and synthetic data generation.

1. Resources



2. Accuracy confidence interval

Based on R caret package ConfusionMatrix.R source code:


line 218: binom.test(sum(diag(x)), sum(x))$conf.int

where x is confusion matrix, we can read how the accuracy confidence interval is computed. The lower test size is, the wider such interval is. Examples:


[1] 0.8010559 0.8622856


[1] 0.7147807 0.9170712

Hence, one more criteria is to ensure you have test data size large enough to ensure required accuracy confidence interval size. However, that is not the only criteria for your purpose (see point 4).

3. Synthetic data generation

If your training/validation set gathers "real data", based on it there is chance of generating synthetic data by using the R synthpop package


4. Understanding spatial distribution of your covariates

Generally speaking, you have to make sure your test data exhaustively exploits the statistical distribution of your covariates.


Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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