Description
This function remove duplicate entries from your dataset. A duplicate can be searched for in a single column or in a combination of multiple columns.Application
Depending on your train-test split, duplicate data points could mean that a data point is used for model training and testing which means your test metric becomes corrupted as the data should be unknown to the model. This should be avoided under all circumstances. Duplicate data points could also mean that the model sees the same point several times in training. This could be intentional in some cases to focus the model on certain parts of the design space which are of higher importance (in these cases make sure to manually split the data to avoid the situation described above!). But in most cases this is presumably not the case. Each data point should have the same weight in training which means the model should see each data point the same number of times. In both cases Remove Duplicates will help you to clean your dataset so that it contains no duplicates.How to use
- Create the step and assign a tabular dataset to it in the field Data.
- Select all Columns which should be considered for the check.
- You can choose if you want to overwrite the existing dataset by the result of this step or save it under a new name by dis-/enabling the option Save output under new name.
- Click Apply to execute the step.
Examples
Consider the following example dataset:
If you selected only column
A that would result in the following dataset:
Select columns
A and B would not change the dataset as the combination of A and B is distinct in all rows. There are no rows with the same combination of A and B.
If instead you selected A and C the result would be this dataset:
This can be extended to any number of columns.
A and C and get the average value for B along the duplicates you can use Group By to achieve that