Skip to content

Commit

Permalink
Create test_default_tabular.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-rinchin authored Oct 15, 2021
1 parent 33ac86e commit ad6a5c6
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/integration/test_default_tabular.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import pytest

from sklearn.metrics import roc_auc_score

from lightautoml.automl.presets.tabular_presets import TabularAutoML


@pytest.mark.integtest
def test_default_tabular(sampled_app_train_test, sampled_app_roles, binary_task):
# load and prepare data
train, test = sampled_app_train_test

# run automl
automl = TabularAutoML(task=binary_task)
oof_predictions = automl.fit_predict(train, roles=sampled_app_roles)
te_pred = automl.predict(test)

# calculate scores
print(f"Score for out-of-fold predictions: {roc_auc_score(train['TARGET'].values, oof_predictions.data[:, 0])}")
print(f"Score for hold-out: {roc_auc_score(test['TARGET'].values, te_pred.data[:, 0])}")
# add check

0 comments on commit ad6a5c6

Please sign in to comment.