-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
33ac86e
commit ad6a5c6
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |