Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cobra/preprocessing/preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ def fit(self, train_data: pd.DataFrame, continuous_vars: list,
log.info("Starting to fit pipeline")
start = time.time()

# Ensure to operate on separate copy of data
train_data = train_data.copy()

# Fit discretizer, categorical preprocessor & target encoder
# Note that in order to fit target_encoder, we first have to transform
# the data using the fitted discretizer & categorical_data_processor
Expand Down