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.

2224 questions
0
votes
1 answer

What is the meaning of the value of the boosted tree?

I plotted a tree and in the end of the trees (in the leaves) there are shown some values. What do they mean? # model parameters colsample_bytree = 0.4 objective = 'binary:logistic' learning_rate = 0.05 eval_metric = 'auc' max_depth =…
Alex Ivanov
  • 461
  • 1
  • 10
0
votes
1 answer

Decision Tree and Feature Importance: Why does the decision tree not show the importance of all variables?

I have run a decsision tree with 62 idependent variables to predict stock prices. However, when extracting the feature importance with classifier_DT_tuned$variable.importance, I only see the importance of 55 and not 62 variables. I would have…
0
votes
0 answers

Decision tree support both category and numeric features at the same time, in Python, is there any?

There are decision trees of each: from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor But are there any decision tree support both category and numeric features at the same time? Or one-hot is the only standard solution?
0
votes
1 answer

Decision Tree binary variable node interpretation

I've built a decision tree in python using sklearn library and I've got a question how to interpret split in a node for binary variable. See a screenshot here So I have a variable if_successful which is binary, where 1 indicates successful…
0
votes
1 answer

How to manually select the features of the decision tree

I need to be able to change the features (with the machine learning meaning) that are used to build the decision tree. Given the example of the Iris Dataset, I want to be able to select the Sepallength as the feature used in the root node and the…
0
votes
1 answer

k-fold cross validation to tune regressive tree model using pyspark

I'm trying to use k-fold cross-validation to tune a regressive tree generated in pyspark. However, from what I've seen so far, it is not possible to combine pyspark's CrossValidator with pyspark's DecisionTree.trainRegressor. Here is the relevant…
0
votes
1 answer

Confidence on the predictions of DecisionTreeClassifier

I'm trying to understand how classification algorithms work to create a kind of generic pipeline, so I just started with a LinearSVC model. Generally speaking, I'm doing: model = LinearSVC(loss='squared_hinge', penalty='l2', dual=False,…
0
votes
2 answers

What object types can be used for fetures in decision trees? Do I need to convert my "object" type to another type?

I imported a table using pandas and I was able to set independent variables (features) and my dependent variable (target). Two of my independent variables are "object type" and my others are int64 and float64. Do I need to convert my "object" type…
hko
  • 1
  • 1
0
votes
1 answer

How does decision tree recognize the features from a given text dataset?

I have a binary classification text data in which there are 10 text features. I use various techniques like Bag of words, TFIDF etc. to convert them to numerical. I use hstack() to stack all those features together again after processing…
0
votes
1 answer

Complicated decision tree using js promises

I'm trying to think of the best way to format the code of a complicated decision tree while using javascript promises. I've read the following questions but couldn't find what I'm looking for: How to create a tree of promises? How do I catch ES6…
A-S
  • 1,378
  • 1
  • 17
  • 26
0
votes
5 answers

converting pandas string data to numeric for decision tree

I am trying to convert several columns of string data into numeric to feed into a classification model. An example dataset with one modification column would be: input: data = [['tom', 10], ['nick', 15], ['juli', 14], ['nick', '12']] data =…
0
votes
1 answer

Different methods for handling nominal variables in Python

So I am fairly new to Python and I'm trying to use the DecisionTreeClassifier() function from the sklearn package. The issue is, that I have (majority of) nominal variables, which DecisionTreeClassifier() cannot handle. In R (which I know well),…
PK1998
  • 45
  • 5
0
votes
2 answers

Error in importing export_text from sklearn.tree.export

I have a decision tree classifier and while importing export_text from sklearn.tree.export I am getting error as below , ImportError: cannot import name 'export_text' from 'sklearn.tree.export'…
Ayyasamy
  • 101
  • 1
  • 12
0
votes
1 answer

How multi label classification works in scikit-learn decision tree?

I had a problem to classify inputs which have more than one label. So problem is multi-label classification. I used scikit-learn Decision Tree classifiers to do this and it gives pretty good results at initial stages. But, I am wondering how is it…
0
votes
2 answers

How is the Gini-Index minimized in CART Algorithm for Decision Trees?

For neural networks for example I minimize the cost function by using the backpropagation algorithm. Is there something equivalent for the Gini Index in decision trees? CART Algorithm always states "choose partition of set A, that minimizes…
1 2 3
99
100