Skip to content

Commit

Permalink
Update feature_selectors.py
Browse files Browse the repository at this point in the history
fix copy bug
  • Loading branch information
rjacobs914 authored Apr 17, 2024
1 parent a85a61a commit fbe73dc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mastml/feature_selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"""

import copy
import os
import warnings
import shap
Expand Down Expand Up @@ -555,8 +554,8 @@ def fit(self, X, y):

#### Print the removed features and the new smaller dataframe with features removed
# Deep copy the original dataframe
removed_features_df = copy.deepcopy(X)
new_df = copy.deepcopy(X)
removed_features_df = copy(X)
new_df = copy(X)

# Drop the features that can be removed
all_features = list(new_df.columns)
Expand Down Expand Up @@ -910,4 +909,4 @@ def selected_features_correlation(X, savepath, features_x_path, features_y_path)

with open(os.path.join(savepath, 'same_features.txt'), 'w') as f:
for feature in same_features:
f.write(str(feature) + '\n')
f.write(str(feature) + '\n')

0 comments on commit fbe73dc

Please sign in to comment.