doenut.data.modifiers.duplicate_averager
Module Contents
Classes
Parses a dataset and removes all but the first instance of any row that |
- class doenut.data.modifiers.duplicate_averager.DuplicateAverager(inputs: pandas.DataFrame, responses: pandas.DataFrame)[source]
Bases:
doenut.data.modifiers.duplicate_remover.DuplicateRemoverParses a dataset and removes all but the first instance of any row that has duplicate values for the inputs. Will also remove the corresponding row in the responses, replacing the remaining response with the averages of the duplicates’ values.
- Parameters:
inputs (pd.DataFrame) – The dataset’s inputs
responses (pd.DataFrame) – The dataset’s responses
- classmethod _apply(data: pandas.DataFrame, duplicate_dict: Dict[int, Iterable[int]], non_duplicate_rows: List[int]) pandas.DataFrame[source]