Skip to content

Commit

Permalink
Merge pull request #63 from PythonPredictions/fix/issue#37
Browse files Browse the repository at this point in the history
fix #37 set copy warning
  • Loading branch information
sandervh14 authored Jul 9, 2021
2 parents e6d1be7 + b1ccf74 commit 104d198
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 104d198

Please sign in to comment.