I am new in ML and I am trying to train classifier. I have a tiny dataset, just 90 examples, I divided it 70/30 train/test set and started to train.

As I know MLP must outperform Logistic Regression, but I have an opposite situation in my case, firstly I thought that I give bad hyperparameters, so I tried to use GridSearchCV for finding best hyperparameters, but after it, again Logistic Regression was better, I am wondering maybe is it because of the small number of dataset or I missed something?

  • 4
    $\begingroup$ There is no reason to think that a MLPClassifier will outperform logistic regression always. This is especially true considering you have 90 examples. Neural networks require a lot of training data to perform well because you are estimating way more parameters than a logistic regression. This results in a way larger model variance and a high likelihood of overfitting. If you have 90 training examples I would avoid neural networks entirely if I am being honest. Maybe look into something like Bayesian methods to incorporate prior knowledge or regularization. $\endgroup$
    – aranglol
    Commented Feb 9, 2020 at 22:23
  • $\begingroup$ Thank you very much for you answer, you can write it as answer if you want, then I can check it as correct one :) $\endgroup$ Commented Feb 10, 2020 at 8:55
  • $\begingroup$ Is logistic regression outperforming on in-sample or out-of-sample data? $\endgroup$
    – Dave
    Commented Feb 15, 2020 at 10:54

1 Answer 1


In ML, all algorithms are useful depending on the dataset. Its naive to generalize an algorithm to be always better than the other.

In your case since you have only 90 examples, mlpclassifier couldn’t have trained proper as compared to logreg.

A general suggestion: if you post like rows of your dataset along with accuracy of the two algorithms, it would have been a bit easier to discuss why there were differences.


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.