1
$\begingroup$

NOTE: This question was first posted on a different SO forum but I received suggestions to move it here


This is a follow-up question to a question I had previously posted on this forum We conducted an experiment on 100 subjects and obtained a dataset that was used to train a machine learning model that works almost perfectly (we get a 99.99% accuracy) using cross-validation but fails miserably when test to new unseen data (we get only 39.8% accuracy). In detail, here is how we are testing our model:

  1. Conduct an experiment (100 subjects) and recording physiological data (skin conductance and heart rate)
  2. For each subject, compute the feature from the raw data (thus, we obtain 100 datasets with 25 features)
  3. Reserve the whole data of one subject for model validation
  4. Combine the remaining 99 datasets into one large dataset (thus, we obtain a dataset with up to 1 million rows and 25 columns)
  5. The obtained large dataset is used to train a model and evaluate it using a 10-folds cross-validation.
  6. Use the reserved dataset (see step 3) to validate the model obtained in step 5 above The model performs very well (99.9% accuracy) when we used cross-validation (step 5) but fails to generalize (only 40% accuracy) when tested on new data from the unseen subject (step 3).

After reading the comments I received in my previous question, I decided to revise how I validate the model. Thus, instead of removing all the sample of one subject (as I did in step 3), I only remove all but a few samples (just 0.1% of the sample, i.e around 100 samples in my case). Surprising the model performs significantly better and achieves a 90% accuracy. This is puzzling and I would like to ask a few questions:

(1)How can one explain that a few samples (just 100 samples) are responsible for such an increase in performance (from 40% to 90% accuracy)(I will need to publish my result in a reputable conference)?

(2) Is there any published work that discusses this type of phenomena?

$\endgroup$
  • $\begingroup$ Try Hyperparameter tuning of the model. $\endgroup$ – SARTHAK Feb 2 '19 at 7:24
  • $\begingroup$ Really? As if that's supposed to produce State of the Art results? $\endgroup$ – Aditya Feb 2 '19 at 14:50
  • 1
    $\begingroup$ if I got the question correctly, then previously you separated completely a class and there were no instances of that in the training? In that case your model didn't really see it coming and you evaluated on that.... Instead in the second case, you sampled your data; that means you now have your model the capacity to learn for that particular class as well and hence the performance boost... A better validation set would be a sample from all the classes! I hope this helps :) $\endgroup$ – Aditya Feb 2 '19 at 14:54
  • 1
    $\begingroup$ You are overfitting plain and simple. Your first method of getting a test set is the correct way to measure expected performance in the real world. Don’t listen to the suggestions to add in some of your test subjects data to the train set. Will you get to do that when the model is deployed? No, you will not. $\endgroup$ – kbrose Feb 6 '19 at 14:13
  • 1
    $\begingroup$ It is overfitting. Showing the model data from the subject allows it to over fit to that subject. $\endgroup$ – kbrose Feb 8 '19 at 3:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.