Questions tagged [decision-trees]

A decision tree is a decision support tool that uses a tree-like graph or model of decisions and their possible consequences, including chance event outcomes, resource costs, and utility. It is one way to display an algorithm.

Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

Decision Tree prediction for the fail reason

In my experiment, I used Decision Trees to predict whether participants will pass or fail, and I will provide feedback to them based on the reason for their failure. The Decision Tree includes three ...
Leila Moradi Avargani's user avatar
0 votes
0 answers
19 views

How to visualize a decision tree classifier?

I'm using ID3 algorithm to build a classifier and was wondering if there is any way to visualize the decision tree that the algorithm builds. This is my code for a decision tree in Python: ...
Xx_22's user avatar
  • 11
2 votes
0 answers
26 views

What are the analogies between decision trees and neural trees?

How can I draw analogies between decision trees and neural trees? For example, how are splitting thresholds analogous between these models, and how can paths in a neural tree be represented in a ...
Mir's user avatar
  • 71
1 vote
1 answer
28 views

Neural Network Weights - How do they know their position?

I am a copyright scholar so please forgive my ignorance. When weights are stored external to a model what is the mechanism by which the weight knows which neuron or node in a decision tree it is ...
Benjamin White's user avatar
2 votes
1 answer
183 views

How exactly do decision trees split the input region?

This is more of a stupid question! Let's assume I have a rectangular input region with 3 points belonging to class 0 on the left and 1 point belonging to class 1 on the right. Let's assume these ...
Stella's user avatar
  • 23
0 votes
0 answers
32 views

How to determine the optimal number of trees in Random Forest?

Here I list possible answers for mine: Do you use the graph for OOB? Do you use any other kind of graph? Do you take a fixed number in default? Do you take in consideration any research paper ...
Anisa's user avatar
  • 1
1 vote
1 answer
46 views

How does a Decision Tree split when two features are tied?

Decision Trees split based on which feature and which cut-off value creates the largest mean decrease in impurity (assuming hyperparameter split="best", criterion="gini"). Now take ...
AvanishM's user avatar
0 votes
0 answers
21 views

How to find optimized combinations of values in input columns that produces the values in output column

I have multiple input columns that produce an output column. I want to find optimized combinations of the values in the input columns that produce the values in the output column. For eg: So, the ...
BitastaB's user avatar
0 votes
0 answers
25 views

Is there a way to construct the domain hierarchy of a dataset?

Could regression trees help defining the domain value hierarchies for the target variable: for example if we perform a DT regression task over a target variable, could we easily derive the hiearchy ...
SSSOF's user avatar
  • 17
0 votes
1 answer
51 views

Why is it called *Information Gain* and not *Information Loss*?

I came across the concept of Information Gain in decision trees. Where $I(D_p)$ is the information of the parent node and $I(D_{\text{left}})$ & $I(D_{\text{right}})$ the information for the ...
Caj's user avatar
  • 11
0 votes
1 answer
28 views

Is there a derichlet-tree learning algorithm written in Python

I want to learn a decision-tree based on dirichlet distribution (namely a derichlet-tree). Which Python (or possibly other) libraries/packages enables such algorithm?
SSSOF's user avatar
  • 17
0 votes
0 answers
33 views

Finding Accuracy, Recall, Precision, and F1 from Matlab Confusion Matrix

I'm working on a project to find the highest accuracy between KNN and a Decision Tree for Classification using Matlab. How to calculate the Accuracy, Recall, Precision, and F1 from the output below? ...
willow's user avatar
  • 1
0 votes
0 answers
15 views

Oblique Decision Tree HHCART algorithm explaination

I am now studying a paper about implementing oblique decision tree algorithm https://arxiv.org/abs/1504.03415 I was wondering if any code implementation and alternative explaination, as a support ...
PwNzDust's user avatar
  • 149
4 votes
1 answer
817 views

Decision Tree only splits to the left

I can’t really understand, why my decision tree only splits to the left. I originally have 2 categorical features (further named feature 0 and 1), which I concat to one feature since feature 1 is ...
Taitex's user avatar
  • 41
0 votes
0 answers
22 views

Do outlier data in target variable cause a problem for GBM's?

I wonder if I should exclude outlier (legit data, not wrong readings) data from my dataset using gradient boosting. Let's say we try to predict water damage for regular houses and 99% of data is in 0-...
morqueatsz's user avatar
0 votes
0 answers
24 views

decision tree limitation VS deep learning

I wonder if decision trees (and their derivatives like Random Forest and Gradient Boosting) have interpolation power as deep learning based model. Most of my experience is with deep learning model. ...
user3197748's user avatar
0 votes
1 answer
538 views

ValueError: X has 54 features, but DecisionTreeClassifier is expecting 53 features as input

I am analysing and prediction 2023 Cricket World Cup based on previous given dataset. This is Exploratary analysis: Feature selection and Training model: Applying Random forest classifier algorithm: ...
Mithlesh Upadhyay's user avatar
0 votes
1 answer
93 views

Optimizing decision tree

I have a question regarding the technique/technology which could be applied for the issue: Suppose I have a rule-based tree or decision tree which predicts a variable Y based on variables A,B,C. This ...
DannyV's user avatar
  • 1
1 vote
1 answer
634 views

How to calculate the training accuracy of a decision tree?

The hint given was to construct a confusion matrix.
Praveent Thamil Mani's user avatar
1 vote
0 answers
29 views

How to know which rules were applied to predict one sample in trained decision tree model?

I have trained Random Forest Regressor from sklearn. I am able to return text representation from each Decision Tree rule using tree.export_text (sklearn documentation here). But it shows rules for ...
Paulina's user avatar
  • 15
0 votes
0 answers
10 views

decision tree and prediction

A decision tree regression model produces at most as many possible predictions as it has terminal nodes/leaves. A well fit decision tree will have been limited in the number of terminal nodes/leaves, ...
user392987's user avatar
0 votes
0 answers
43 views

p value and decision tree

let's say you create a GLM with y~x1+x2+x3. The p-value for x1 is 1% and x2 is 5% and x3 is 10%. Then, you know that beta for x1 and x2 are reliable, but not with x3. So, you can disregard x3's ...
user392987's user avatar
0 votes
0 answers
47 views

Training Biased/Uneven Categorical Data with CatBoost, Unbalanced/Unseen Categories Handling

Summary: I am training a discount eligibility model where the dataset represents historical data for products where people availed discounts based on simple features like product category, discount ...
glory9211's user avatar
  • 101
0 votes
0 answers
43 views

One-Hot encoded variables dominates importance among other variables

I am currently training some machine learning models to predict the 28-day compressive strength of cement, a continuous real-valued variable. The available dataset comprises samples from three ...
Felipe's user avatar
  • 11
-1 votes
2 answers
92 views

Recall and Precision ML models

I use decision trees for a binary classification. To evaluate the model, I use K-fold cross-validation, where k = 10. When I run the model n times, I get a relatively constant accuracy across all ...
Jan Jansen's user avatar
1 vote
1 answer
24 views

Regression models that conform to functional groupings of features

For example, suppose we want to predict y with features x1, x2, x3, x4. If I specify ...
olives's user avatar
  • 11
0 votes
0 answers
66 views

How to predict an xgboost model outcome directly from the trained trees?

I want to train by Xgboost algorithm and predict directly using the trees while testing. Precisely, speaking I don't want to keep the model weights in any file like "joblib" and load it ...
Subhajit Saha's user avatar
0 votes
1 answer
128 views

How does LGBM make a prediction?

We are currently trying to figure out how LGBM creates its trees and how predictions are made afterwards. In my current understanding, it works as follows: Multiple "weak learners" are ...
Julian's user avatar
  • 121
0 votes
1 answer
138 views

Does Random Forest Regressor use subset of trees to predict value from given data sample?

I will try to draw a little context to my question from title. I build a Random Forest Regressor from 1000 trees using sklearn. Then I exported all the decision paths along with predicted values for ...
Paulina's user avatar
  • 15
0 votes
2 answers
61 views

how to deal if input feature are all categorical but target feature is discrete numerical, it is giving exact numerical for known data

the following data is to detect malnutrition among children under age 5 and the value_r is the percentage estimate of wasting among the population. should I apply the decision tree as an entirely ...
alex's user avatar
  • 1
0 votes
1 answer
12 views

Decision tree classification code for categorical data

how can I apply decision tree classification to get malnutrition status(target variables are wasting, stunting,overweight,underweight)
alex's user avatar
  • 1
0 votes
2 answers
110 views

Decision Tree : why do unused features impact predictions?

I am currently building a tree, with 10 features but setting max_depth = 2 in sklearn.tree.DecisionTreeClassifier. Since only ...
user1627466's user avatar
2 votes
1 answer
284 views

Difference among ID3, C4.5, C5.0

The C4.5 algorithm uses information gain ratio instead of information gain like ID3, and it also adds pruning. What does C5.0 add more? Is there any example of code? I looked on the web but there is ...
Iya Lee's user avatar
  • 152
0 votes
1 answer
376 views

Calculating feature importance with Scikit-Learn's Decision Tree Classifier

I am attempting to determine the most useful bands of a multiband image classification (i.e. Red, Green, Blue, Near Infrared, etc. used for classifying pixels) and wrote the following function to ...
camdenmcgath's user avatar
0 votes
1 answer
21 views

How to represent varying reliability of ratios calculations in a dataset?

I want to predict whether the client will renew his/her subscription based on groceries consumption patterns. Suppose an order contain only one type of grocery. I have a DataFrame containing ratios of ...
a_long_road_ahead's user avatar
1 vote
1 answer
73 views

Distilling a Random Forest to a single DecisionTree, does it make sense?

I stumbled into this blog which shows how a decision tree trained to overfit the predictions of a properly trained random forest model is able to generalize in pretty much the same way as the original ...
amiando's user avatar
  • 35
0 votes
1 answer
20 views

How do I use a column with data of different layers for AI?

I am working with real estate data for an ML/DL project. In the csv file there is a column in which each cell contains data like the examples below: ...
Muhammad Usman's user avatar
0 votes
0 answers
30 views

Feature scales and feature importance

Tree-based algorithms do not require feature scaling before fitting, and I am working on gradient boosted tree models (and random forest) without scaling features. I'm curious if feature scaling ...
Matthew Son's user avatar
0 votes
0 answers
37 views

Overlapping values of a variable in decision tree

Is it okay to have a variable, this variable has values which are subsets of others in the same variable when building a decision tree? To be specific, I am working with a dataset that have a variable ...
MINH NHỰT NGUYỄN TRẦN's user avatar
1 vote
2 answers
1k views

Can decision trees handle Nominal Categorical variables?

I have read that decision trees can handle categorical columns without encoding them. However, as decision trees make splits on the data, how does it handle Nominal Categorical variables? Surely a ...
Connor's user avatar
  • 631
1 vote
1 answer
104 views

DART algorithm implementation. Converting mathematical notation to pseudocode

I am learning how DART algorithm (https://arxiv.org/abs/1505.01866) works and I want to implement it in C# I have the algorithm's description in mathematical notation and I don't understand most of it....
omike's user avatar
  • 11
1 vote
1 answer
27 views

XGBoost prints trees beyond n_estimator

I have a XGBoost model with the following parameters ...
Itminan's user avatar
  • 11
0 votes
1 answer
157 views

Noisy Data Robustness - NN vs Decision Tree

We are working on a physiological marker predictor using hospital patient data. We use a boosted decision tree-type algorithm, which seems to be very sensitive to the noise in the training data. Would ...
machinelearner's user avatar
0 votes
1 answer
80 views

how do I test if overfitting exists when I use cross_val_score method?

I got the following code form a book on xgboost. I wonder whether this is a correct way of analyzing cross validation score for overfitting purposes. mean accuracy is 81 which can be okay. but what if ...
Mehmet Deniz's user avatar
0 votes
1 answer
1k views

How do the splits points in a decision tree within Random Forest are taken/selected? (Base on which criteria?)

I checked many posts to figure out how random forest (RF) learning algorithm (an ensemble of many decision trees (DT) constructed by Rain forest algorithm) within bagging select split points at each ...
Mario's user avatar
  • 400
2 votes
1 answer
254 views

Surrogate splits in Python

I want to use RandomForestClassifier from Sklearn to predict categorical variable (credit risk). But one of the predictors seems to have missing values: ...
Ars ML's user avatar
  • 61
2 votes
1 answer
183 views

help interpreting training/validation curves for classification tree

I'm developing a binary classification tree and having some touble interpreting my training/validation curves. I used the CART algorithm with information gain as my splitting criterion. The training ...
RyRy the Fly Guy's user avatar
0 votes
1 answer
111 views

DecisionTreeClassifier cannot take one-hot encoded classes?

I got ValueError: Found array with dim 3. None expected <= 2. I dont know which array has dim 3? DecisionTreeClassifier cannot take one-hot encoded classes? But ...
user900476's user avatar
2 votes
1 answer
154 views

DecisionTreeRegressor with criterion='poisson' not recognizing perfect separation

I created a minimal example of Poisson decision tree regression as such ...
Jason Hadinata's user avatar
1 vote
1 answer
29 views

How to use labels to fit several thresholds in a simple decision rule?

I have a binary labelled dataset with numeric features. I want to create a "business rule" of the type y = x1 > t1 and x2 > t2 and x3 > t3. ...
hipoglucido's user avatar
  • 1,170

1
2 3 4 5
16