-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for ExtraTreeClassification
- Loading branch information
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
tests/test_decision_trees/extra_tree/extra_tree_classification.py
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,14 @@ | ||
from sklearn.tree import ExtraTreeClassifier | ||
|
||
from pymilo.utils.test_pymilo import pymilo_classification_test | ||
from pymilo.utils.data_exporter import prepare_simple_classification_datasets | ||
|
||
MODEL_NAME = "Extra Tree Classifier" | ||
|
||
def extra_tree_classification(): | ||
x_train, y_train, x_test, y_test = prepare_simple_classification_datasets() | ||
# Create Decision Tree Regressor | ||
extra_tree_classifier = ExtraTreeClassifier(random_state=1) | ||
extra_tree_classifier = extra_tree_classifier.fit(x_train, y_train) | ||
assert pymilo_classification_test( | ||
extra_tree_classifier, MODEL_NAME, (x_test, y_test)) == True |