Skip to main content

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
1 answer
20 views

In natural language processing, what is the name for the technique in which a sentence is modeled as a tree in order to generate simpler sentences?

In natural language processing, there are times when we model a complex and/or compound sentence as a tree (or hierarchy) of simpler sentences. The tree-model (hierarchical model) can help us ...
Samuel Muldoon's user avatar
0 votes
0 answers
13 views

Latest Tree-based models

What are the latest Tree-based models that are used in machine learning? Tell the new models except the old ones such as the Decision tree, Random Forest, Gradient Boosting, LightGBM, XGBoost, and ...
Madhes Monnish's user avatar
1 vote
1 answer
25 views

Average training instances sampled with bagging

The book Hands-On Machine Learning has a section on Out-of-Bag Evaluation related to Decision Trees, where it's stated that, By default a BaggingClassifier samples m training instances with ...
Sahil Gupta's user avatar
0 votes
0 answers
11 views

I want to create a system for classifying bone fractures What pre-processing steps can I use to process images?

I want to know where I should put the image preprocessing code in the decision tree code How to extract features from images and classify them
zxcvbnm zxcvbnm's user avatar
1 vote
1 answer
66 views

How do I interpret probability results in conjunction with my known precision/accuracy/recall scores?

I have a Random Forest Classifier (trained with sklearn) modeling a binary data set. Here's what the configuration looks like (I've tuned it for precision intentionally): ...
Colin's user avatar
  • 113
0 votes
0 answers
53 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
23 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
29 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
186 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
37 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
56 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
22 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
64 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
43 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
17 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
840 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
25 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
27 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
796 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
122 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
834 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
30 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
12 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
51 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
54 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
1 vote
0 answers
47 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
  • 21
-1 votes
2 answers
128 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
70 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
140 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
143 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
66 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
122 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
320 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
483 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
22 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
85 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
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
  • 661
1 vote
1 answer
113 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
31 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
173 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
81 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
277 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
3 votes
1 answer
198 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

1
2 3 4 5
16