Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/uw-cmg/MAST-ML
Browse files Browse the repository at this point in the history
  • Loading branch information
rjacobs914 committed Apr 17, 2024
2 parents 31e4084 + fbe73dc commit d0e2411
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mastml/feature_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ def fit(self, X, y=None):
return self

def transform(self, X):
new_features = self.SPF.get_feature_names()
new_features = self.SPF.get_feature_names_out()
return pd.DataFrame(self.SPF.transform(self.featurize_df), columns=new_features), self.y

class OneHotGroupGenerator(BaseGenerator):
Expand Down
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 d0e2411

Please sign in to comment.