def test_display_model_performance_2(self, mock_logging): report = ProjectReport( explainer=self.xpl, project_info_file=os.path.join(current_path, '../../data/metadata.yaml'), y_test=self.df['y'], config=dict(metrics=[{'path': 'sklearn.metrics.mean_squared_error'}]) ) report.display_model_performance() self.assertEqual(mock_logging.call_count, 0)
def test_display_model_performance_1(self, mock_logging): """ No y_test given """ report = ProjectReport( explainer=self.xpl, project_info_file=os.path.join(current_path, '../../data/metadata.yaml'), ) report.display_model_performance() mock_logging.info.assert_called_once()
def test_display_model_performance_4(self, mock_logging): """ Test use of proba values. """ report = ProjectReport( explainer=self.xpl, project_info_file=os.path.join(current_path, '../../data/metadata.yaml'), y_test=self.df['y'], config=dict(metrics=[{'path': 'sklearn.metrics.log_loss', 'use_proba_values': True}]) ) report.display_model_performance() self.assertEqual(mock_logging.call_count, 0)