Skip to content

Commit

Permalink
识别任务类型
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoysport2022 committed Aug 9, 2021
1 parent 44755fa commit 373c58e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions autox/autox.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ def __init__(self, target, train_name, test_name, path, feature_type = {}, id =
self.dfs_['FE_all'] = None
self.sub = None

# 识别任务类型
if self.dfs_[self.info_['train_name']][self.info_['target']].nunique() == 2:
self.info_['task_type'] = 'binary'
else:
self.info_['task_type'] = 'regression'

def concat_train_test(self):
self.info_['shape_of_train'] = len(self.dfs_[self.info_['train_name']])
self.info_['shape_of_test'] = len(self.dfs_[self.info_['test_name']])
Expand Down

0 comments on commit 373c58e

Please sign in to comment.