← Back to all experiments
ClassificationIntermediateDecision Tree
Decision Tree Classification
Builds a decision tree to classify breast cancer samples.
Key highlights
- Trains/test split with accuracy
- Exports human-readable tree rules
- Predicts a new sample
Metrics
AccuracyTree rules
Outputs
Rules snapshot for classification
Code snapshot
Key lines that anchor the experiment workflow.
dt_classifier = DecisionTreeClassifier(random_state=42)
dt_classifier.fit(X_train, y_train)
print(export_text(dt_classifier))Next steps
Want to explore further? Try the full gallery or open the raw script to tweak parameters.