1
$\begingroup$

In my data, the input size of random forest is 2052, and the data size is only 300. In my case, data size is lower than input size. But, random forest models make good accuracy over 90%. I divided training/test data as 80/20. And overfitting never happened.

Do you know even data size lower than input size, how the random forest model makes good result?


Yes, my data is balanced. F1 score is also over 90 %.

$\endgroup$
1
  • $\begingroup$ I can't understand the input size of random forest. Could you explain what mean by input size and data size? $\endgroup$
    – Miss.Alpha
    Oct 17, 2022 at 21:32

1 Answer 1

0
$\begingroup$

A couple things to check first:

  • Is your dataset balanced with respect to class proportions? If not, accuracy is not a good way to measure performance. It could mask the fact that the classifier mostly predicts the majority class. Over 90% accuracy might be very good... or not.
  • If the data happens to contain duplicate instances, the test set performance is biased.

I assume that you checked for overfitting by comparing the performance on the training set and test set, right? It is possible indeed that there is no overfitting, it completely depends on the data. If the data truly has very little diversity, the classifier can perform well with a small number of instances. Here "truly" means assuming that the dataset is a representative sample of the underlying population.

$\endgroup$
2
  • $\begingroup$ Yes, I checked overfitting by comparing the performance on the training set and test set. The accuracies of training and test set are the same. Also, for the balance of the dataset, I checked F1 score. F1 score is also same with that of training and test set. $\endgroup$ Sep 15, 2021 at 21:44
  • $\begingroup$ Plus what Erwan has mentioned, I would suggest checking for target leakage. $\endgroup$
    – Miss.Alpha
    Oct 17, 2022 at 21:30

Your Answer

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

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