Skip to content

Commit

Permalink
Transposed the features dataframe
Browse files Browse the repository at this point in the history
  • Loading branch information
Habush committed Apr 14, 2019
1 parent 1c5c3f6 commit 2bcd4f9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crossval/moses_cross_val.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ def run_folds(self):
ensemble_df.to_csv("ensemble.csv", index=False)
feature_count_df = pd.DataFrame.from_dict(self.tree_transformer.fcount)

feature_count_df.to_csv("feature_count.csv")
feature_count_df = feature_count_df.T
feature_count_df.reset_index(level=0, inplace=True)
feature_count_df = feature_count_df.rename(columns={"index": "feature"})
feature_count_df.to_csv("feature_count.csv", index=False)

def split_dataset(self):
"""
Expand Down

0 comments on commit 2bcd4f9

Please sign in to comment.