Skip to content

Commit

Permalink
add test for ExtraTreeClassification
Browse files Browse the repository at this point in the history
  • Loading branch information
AHReccese committed Sep 20, 2023
1 parent fb49684 commit c90c1f3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_decision_trees/extra_tree/extra_tree_classification.py
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

0 comments on commit c90c1f3

Please sign in to comment.