From 1f121a6234dac55d89d22acdd81f97eb07229342 Mon Sep 17 00:00:00 2001 From: Felix Burkhardt Date: Mon, 30 Aug 2021 13:02:10 +0200 Subject: [PATCH] fixes --- src/dataset.py | 2 +- src/model.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dataset.py b/src/dataset.py index 628e2625..47f4e344 100644 --- a/src/dataset.py +++ b/src/dataset.py @@ -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 diff --git a/src/model.py b/src/model.py index aff23a46..19e31bc9 100644 --- a/src/model.py +++ b/src/model.py @@ -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)