Questions tagged [decision-tree]

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.

Decision Tree could be just a graphical tool or the learning algorithm in a post.

2545 questions
9
votes
2 answers

How to visualize an sklearn GradientBoostingClassifier?

I've trained a gradient boost classifier, and I would like to visualize it using the graphviz_exporter tool shown here. When I try it I get: AttributeError: 'GradientBoostingClassifier' object has no attribute 'tree_' this is because the…
Carlos Pinzón
  • 1,286
  • 2
  • 15
  • 24
9
votes
2 answers

Decision tree using continuous variable

I have a question about Decision tree using continuous variable I heard that when output variable is continuous and input variable is categorical, split criteria is reducing variance or something. but I don't know how it work if input variable is…
BSKim
  • 91
  • 1
  • 1
  • 2
9
votes
2 answers

Tree sizes given by CP table in rpart

In the R package rpart, what determines the size of trees presented within the CP table for a decision tree? In the below example, the CP table defaults to presenting only trees with 1, 2, and 5 nodes (as nsplit = 0, 1 and 4…
alopex
  • 133
  • 1
  • 2
  • 7
9
votes
4 answers

ctree() - How to get the list of splitting conditions for each terminal node?

I have an output from ctree() (party package) that looks like the following. How do I get the list of splitting conditions for each terminal node, like like sns <= 0, dta <= 1; sns <= 0, dta > 1 and so on? 1) sns <= 0; criterion = 1, statistic =…
Sriram Murali
  • 91
  • 1
  • 3
9
votes
3 answers

How to plot/visualize a C50 decision tree in R?

I am using the C50 decision tree algorithm. I am able to build the tree and get the summaries, but cannot figure out how to plot or viz the tree. My C50 model is called credit_model In other decision tree packages, I usually use something like…
mpg
  • 3,679
  • 8
  • 36
  • 45
9
votes
1 answer

DecisionTreeClassifier vs ExtraTreeClassifier

I'm trying to figure out which decision tree method from scikit-learn package will better suit my needs for performing classification task. However, I found that there are two decision tree models available there: standard DecisionTreeClassifier…
dragoon
  • 5,601
  • 5
  • 37
  • 55
9
votes
2 answers

Are there any algorithms to categorize an array among certain patterns?

For a simple problem of array length 5 to start with ( in practice the array length might be 20.. ) I have got a predefined set of patterns, like AAAAB, AAABA, BAABC, BCAAA, .... Each pattern is of the same length of the input array. I would need a…
colinfang
  • 20,909
  • 19
  • 90
  • 173
9
votes
2 answers

Are decision trees (e.g. C4.5) considered nonparametric learning?

I am relatively new to machine learning and am trying to place decision tree induction into the grand scheme of things. Are decision trees (for example, those built with C4.5 or ID3) considered parametric or nonparametric? I would guess that they…
stackoverflowuser2010
  • 38,621
  • 48
  • 169
  • 217
9
votes
2 answers

Dictionary object to decision tree in Pydot

I have a dictionary object as such: menu = {'dinner':{'chicken':'good','beef':'average','vegetarian':{'tofu':'good','salad':{'caeser':'bad','italian':'average'}},'pork':'bad'}} I'm trying to create a graph (decision tree) using pydot with the…
ono
  • 2,984
  • 9
  • 43
  • 85
9
votes
1 answer

Why does the C4.5 algorithm use pruning in order to reduce the decision tree and how does pruning affect the predicion accuracy?

I have searched on google about this issue and I can't find something that explains this algorithm in a simple yet detailed way. For instance, I know the id3 algorithm doesn't use pruning at all, so if you have a continuous characteristic, the…
ksm001
  • 3,772
  • 10
  • 36
  • 57
9
votes
1 answer

Advantages of SVM over decion trees and AdaBoost algorithm

I am working on binary classification of data and I want to know the advantages and disadvantages of using Support vector machine over decision trees and Adaptive Boosting algorithms.
8
votes
10 answers

How should I store a sparse decision tree(move list) in a database?

I have been thinking of making an AI for a board game for a long time, and recently I've started to gather resources and algorithms. The game is non-random, and most of the time, there < 3 moves for a player, sometimes, there are >20 moves. I would…
8
votes
2 answers

Is there a method to do transfer learning with decision trees/random forest?

Is there a way to do transfer learning with a decision tree or a random forest model? Concretely, I was wondering if there is a good and easy way of doing so in Python with a model trained with Scikit-learn. All I can think of is training a random…
IGB
  • 117
  • 1
  • 8
8
votes
2 answers

Inference engines vs Decision trees

I am using an expert system with an inference engine (forward chaining) and I would like to explain why it is better than a decision tree using very simple concepts. (in one particular situation) I know there is a similar question on stackoverflow…
Ricky Bobby
  • 7,490
  • 7
  • 46
  • 63
8
votes
3 answers

shap.force_plot() raises Exeption: In v0.20 force_plot now requires the base value as the first parameter

I'm using Catboost and would like to visualize shap_values: from catboost import CatBoostClassifier model = CatBoostClassifier(iterations=300) model.fit(X, y,cat_features=cat_features) pool1 = Pool(data=X, label=y,…