def _setup_metrics(self): self.metric_functions = {} # needed to shadow class variable self.metric_functions[LOSS] = BWCEWLMetric( positive_class_weight=self.loss['positive_class_weight'], robust_lambda=self.loss['robust_lambda'], confidence_penalty=self.loss['confidence_penalty'], name='eval_loss') self.metric_functions[ACCURACY] = BinaryAccuracy( name='metric_accuracy')
def _setup_loss(self): self.train_loss_function = BWCEWLoss( positive_class_weight=self.loss['positive_class_weight'], robust_lambda=self.loss['robust_lambda'], confidence_penalty=self.loss['confidence_penalty']) self.eval_loss_function = BWCEWLMetric( positive_class_weight=self.loss['positive_class_weight'], robust_lambda=self.loss['robust_lambda'], confidence_penalty=self.loss['confidence_penalty'], name='eval_loss')
def _setup_metrics(self): self.metric_functions = {} # needed to shadow class variable self.metric_functions[LOSS] = BWCEWLMetric( positive_class_weight=self.loss["positive_class_weight"], robust_lambda=self.loss["robust_lambda"], confidence_penalty=self.loss["confidence_penalty"], name="eval_loss", ) self.metric_functions[ACCURACY] = BinaryAccuracy( name="metric_accuracy") self.metric_functions[ROC_AUC] = ROCAUCMetric(name="metric_auc")