A CART decision tree maps out exactly how your data is categorized or predicted by following a series of simple 'if-then' rules. Use this when you need a transparent, visual model that explains the specific conditions leading to a result, rather than a black-box forecast.
Visualizing Your Decision Logic
The CART decision tree breaks down your dataset by splitting it into smaller, more homogeneous groups based on feature thresholds. Each step in the process acts as a filter, allowing you to trace exactly how the model arrives at a specific outcome.
Unlike complex models that obscure their decision process, this method produces a nested structure. You can view this as a clear sequence of nodes, where every split is defined by a specific variable and a threshold, making it easy to share with non-technical stakeholders.
Interpretation and Feature Importance
Beyond the visual tree, the tool provides a list of feature importances. This highlights which variables are the most effective at partitioning your data, allowing you to prioritize the factors that have the most significant impact on your target outcome.
For classification tasks, the tool reports class distribution at each node, while regression tasks provide the mean value. This allows you to evaluate how well your data is grouped and identify which paths lead to high-value or high-risk outcomes.
Ensuring Model Reliability
To maintain consistency, the CART decision tree uses a fixed random seed. It also includes validation metrics such as cross-validated accuracy for classification or R-squared for regression, helping you assess how well the rules hold up on data the model hasn't seen yet.
If the analysis detects a large number of leaves or potential complexity issues, the tool provides guidance on pruning. These guardrails help ensure that your decision tree remains a practical tool for interpretation rather than becoming overly complicated.
1 · Intent → method
An LLM picks tree_cart from a fixed catalog.
2 · Method → numbers
Deterministic Python engine runs the math. Same input → same output.
3 · Numbers → plain language
A second LLM translates the result into your domain’s vocabulary.
Why does the decision tree stop splitting after a certain depth?
To prevent overfitting, the CART decision tree tool defaults to a maximum depth of 5. This ensures the model captures general patterns rather than memorizing individual data points.
Can I use this for non-numeric data?
The CART decision tree requires all input features to be numeric. If you have categorical data, please convert it to numeric values using one-hot encoding before running the analysis.
Tool input schema
Schema for tree_cart not exported yet (run pnpm export:registry).