Skip to content

Commit

Permalink
fix #37 set copy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Beníšek committed Jul 8, 2021
1 parent 2b5a107 commit b1ccf74
Showing 1 changed file with 3 additions and 0 deletions.
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

0 comments on commit b1ccf74

Please sign in to comment.