Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Burkhardt committed Aug 30, 2021
1 parent 23b0886 commit 1f121a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def prepare_labels(self):
pass

def check_continous_classification(self, df):
datatype = self.util.config_val('DATA', 'data_type', 'whatever')
datatype = self.util.config_val('DATA', 'data_type', 'dummy')
if self.util.exp_is_classification() and datatype == 'continous':
cat_vals = self.util.continuous_to_categorical(df[self.target])
df[self.target] = cat_vals
Expand Down
2 changes: 1 addition & 1 deletion src/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def train(self):
self.util.debug(f'tuning on {tuned_params}')
self.clf = GridSearchCV(self.clf, tuned_params, refit = True, verbose = 3, scoring=scoring)
try:
class_weight = glob_conf.config['MODEL']['class_weight']
class_weight = self.util.config_val('MODEL', 'class_weight', 0)
if class_weight:
self.util.debug('using class weight')
self.clf.fit(feats, self.df_train[target], sample_weight=self.classes_weights)
Expand Down

0 comments on commit 1f121a6

Please sign in to comment.