20
$\begingroup$

I'm a beginner trying to put together my first project. I had a song classification project in mind, but since I would be manually labeling, I could only reasonably put together about 1000 songs, or 60 hours of music.

I would be classifying with several classes, so it's possible that one class would have as few as 50-100 songs in the training set- this seems like too few! Is there a general rule of thumb for how much data is needed to train a neural network to give it a shot at working?

Edit: I was thinking of using a vanilla LSTM. The input features will have dimension 39, output dimension 6, my first attempt for hidden layer dimension would be 100.

$\endgroup$
3
  • 2
    $\begingroup$ This isn't really answerable because not all tasks are easy, and different network architectures and hyperparameter selections will improve/hurt different models in different ways. $\endgroup$
    – Sycorax
    Aug 1, 2016 at 13:27
  • $\begingroup$ At a minimum, you need to specify your network structure & how many links there will be to train. $\endgroup$ Aug 1, 2016 at 13:29
  • $\begingroup$ Minimum viable dataset might be what you wanted. $\endgroup$ Jan 16, 2021 at 12:08

1 Answer 1

22
$\begingroup$

It really depends on your dataset, and network architecture. One rule of thumb I have read (2) was a few thousand samples per class for the neural network to start to perform very well.

In practice, people try and see. It's not rare to find studies showing decent results with a training set smaller than 1000 samples.


A good way to roughly assess to what extent it could be beneficial to have more training samples is to plot the performance of the neural network based against the size of the training set, e.g. from (1):

enter image description here


$\endgroup$
2
  • $\begingroup$ Let me make a simple strongly related question. I have a (full) sample of 68 observations only, one target variable and 33 eligible predictors (trendless economic time series). Try to predict the target with neural networks, even in simple specifications, is a waste of time? Or can make sense? More in general maybe you can give me an opinion there stats.stackexchange.com/questions/491065/… it would be appreciated. $\endgroup$
    – markowitz
    Oct 9, 2020 at 8:35
  • $\begingroup$ I added more data to the dataset that was overfitting after 5 epochs and performance on the validation data is roughly the same with a significant bias towards one category or the other (binary image classification). The training data is close to balanced with 47% / 53% split. Would more data be helpful or is this a model problem? $\endgroup$
    – jth_92
    Feb 19, 2022 at 16:51

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.