feature(decisiontree): add digits example with decision tree

This commit is contained in:
2026-04-30 19:16:06 +02:00
parent dbc2b765a7
commit aa374a7f53
3 changed files with 45 additions and 1 deletions
@@ -19,7 +19,7 @@ print(iris.target.size)
print(iris.feature_names)
print(iris.target_names)
# use a decition tree classifier
# use a decision tree classifier
classifier = DecisionTreeClassifier()
# use all but the last sample for training
classifier.fit(iris.data[:-1], iris.target[:-1])