Skip to content
Snippets Groups Projects
Commit a548e81e authored by Nikolai.Hartmann's avatar Nikolai.Hartmann
Browse files

Raise ValueError when w_train_tot requested, but data not loadad

parent 5e3ae025
No related branches found
No related tags found
No related merge requests found
......@@ -823,7 +823,7 @@ class ClassificationProject(object):
else:
class_weight = self.balanced_class_weight
if not self.data_loaded:
self._w_train_tot = None
raise ValueError("Data not loaded! can't calculate total weight")
if self._w_train_tot is None:
if self.apply_class_weight:
self._w_train_tot = self.w_train*np.array(class_weight)[self.y_train.astype(int)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment