This is a basic question so bear my ignorance. I feel like they contribute collectively in no way to the target. This is for performance and accuracy. The target is polar (0,1).

  • $\begingroup$ Your intuition is correct, remove the ID column if it is clearly not correlated in any way with the label $\endgroup$
    – Gaius
    Jun 17, 2018 at 20:07
  • $\begingroup$ But how do we determine that relationship? Let's say the id cols are just integers from 1 to n but they add a huge boost the the score on a LB because the test set also has the same ids and your model feature Importance tell that's this is col matters a lot..(3x times the second imp feature let's say) $\endgroup$
    – Aditya
    Jun 18, 2018 at 7:29

1 Answer 1


It depends.

If your data samples are IID (independent and identically distributed) then you can remove the sample ID, given that all samples come from or refer to the same source/object and they don't somehow identify the sample class.

But, if your data is sequential, such as time series, it would be a big mistake to neglect the ID, as it identifies the time order between the samples. The time dependencies are a great source of information for problems such as time series forecasting, regression and classification. If you treat sequential data (time series) as IID (by removing the ID), you will have inferior performance, because you neglect one source of information, i.e. temporal dependencies. You should not include the ID as input to your model, but you should respect the order of the samples, which is shown by the ID.

  • 2
    $\begingroup$ Making sure it isn't a time-series is a good catch (as it wasn;t mentioned in the question). One could even do further pre-processing on the ID column to generate new columns such as a binary is_weekend, taking either 0 or 1. $\endgroup$
    – n1k31t4
    Jun 17, 2018 at 21:39

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