I have a a dataset that most of records and their corresponding labels are the same and only timestamp of each records is different from other record. If I ignore duplicate records in for training some algorithm like DQN, is this a correct approach?
1 Answer
$\begingroup$
$\endgroup$
4
This depends on:
- Whether the timestamp is additional information. I.e. is the temporal dimension relevant?
- Removing samples will shift the distribution of the data set. I.e. if you have 2 possible states, with 90 copies of 1 and 10 copies of the other, removing all duplicates means the model will not come into contact with the 90/10 ratio in the data, but will see a 1/1 ratio, this can bias your model towards the underrepresented class, reducing performance.
-
1$\begingroup$ Duplicate records will leak into test set. Isn't this important? Is there any workaround? $\endgroup$ Commented Aug 9, 2022 at 7:04
-
$\begingroup$ You're worried you'll have identical samples in both train and test? What are you using a test set for in the context of a DQN? $\endgroup$– KroshtanCommented Aug 9, 2022 at 7:55
-
$\begingroup$ Yes, I'm using sensors and a actuator statuses as train set inorder to learn what action to take for the actuator, then I want to test the algorithm with test set to see the accuracy. and timestamp is not important $\endgroup$ Commented Aug 9, 2022 at 8:01
-
$\begingroup$ You're training a classifier, disguised as an RL algorithm. A DQN algorithm trains on reward, not labels, and so the concept of accuracy makes little sense. Also, because a DQN network learns sequentially, multiple identical sample are still relevant, because after each update, the output of the model is different, and thus the update is, too. For classification, the duplicated data is very much a problem. For reference: On using test data in RL $\endgroup$– KroshtanCommented Aug 9, 2022 at 8:11