2,512 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
6
votes
2
answers
105
views
Reproduce a particular tree from the random forest using DecisionTreeRegressor
I am trying to replicate a specific decision tree trained by a RandomForestRegressor class, using DecisionTreeRegressor.
However, I cannot get the exact results, even with using the exact same ...
1
vote
1
answer
111
views
HDBSCAN Interpretation and Logic
I have made a basic HDBSCAN model (picture output below) but I need to figure out names for the individual clusters. Is there a way I can get something like a decision tree or the parameters for each ...
1
vote
0
answers
92
views
Why is DecisionTree using same feature and same condition twice
When trying to fit scikit-learn DecisionTreeClassifier on my data, I am observing some weird behavior.
x[54] (a boolan feature) is used to break the 19 samples into 2 and 17 on top left node. Then ...
0
votes
1
answer
99
views
HalvingGridSearchCV cannot fit multi label DecisionTreeClassifier
I'm trying to use HalvingGridSearch to find the best DecisionTree model. My model performs a multi-label prediction on a single example, it is trained on a batch of data of size (n_samples x ...
0
votes
0
answers
72
views
Get rule interpretations in h2o rulefit model
Following the example for h2o rulefit model from the documentation (https://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/rulefit.html), I checked the variable importance of the rules or linear ...
3
votes
1
answer
97
views
Generate a simple decision tree program for finding minimums
A new code-generating tool is given only one input - n, the size of an input array. The tool should then generate a simple decision tree program that contains 2 kinds of nodes:
decision node with ...
0
votes
0
answers
52
views
Define a custom tree splitter from sklearn
I'm trying to define a custom splitter using sklearn Classification Trees classes, but I'm getting no results so far. I got no errors but the tree is not developed. How to achieve this?
My strategy is ...
0
votes
2
answers
84
views
How is each tree within DecisionTreeClassifier calculating probability of a class?
According to the sklearn docs, if you apply predict_proba to DecisionTreeClassifier:
The predicted class probability is the fraction of samples of the same
class in a leaf.
Let's say that the rows ...
1
vote
1
answer
59
views
Plotting one Decision Tree of a Random Forest in sklearn
I have come around a strange thing when plotting a decision tree in sklearn.
I just wanted to compare a Random Forest model consisting of one estimator using bootstrapping and one without ...
0
votes
0
answers
151
views
TypeError: 'int' object is not subscriptable, python, dtreeviz
I'm trying to use the dtreeviz library to visualize a decision tree, but I’m encountering an error:
TypeError: 'int' object is not subscriptable
Here’s the code I’m trying to run:
viz = dtreeviz(...
0
votes
0
answers
41
views
Draw a decision tree while hiding the values of the "value" row
I want to simplify the decision tree output and hide the values in the "value" field.Below is the code I am using
enter image description here
fig, ax = plt.subplots(figsize=(10, 10))
...
1
vote
0
answers
38
views
How does actions in DecisionTree works?
I'm currently working on a decision tree for an enemy character. I'm not sure how to use the actions for the decision tree.
Does the actions either:
1.
void AttackAction::ExecuteAction(EnemyBase& ...
0
votes
1
answer
51
views
sklearn plot_tree function does not show the class when the tree has only one node
I use the following code to plot a decisions trees:
plt.figure(figsize=(12, 12))
plot_tree(estimator,
feature_names=feature_names,
label= 'all',
...
0
votes
1
answer
50
views
Error predicting with REEMtree model: Number of observations in newdata does not match group identifiers
I am using the REEMtree package in R to build a tree with random effects, but when I attempt to make predictions on the test data, I encounter the following error:
Error in predict.REEMtree(...
0
votes
0
answers
56
views
Data structure for summing and taking the max of decision trees
I have a tree structure that I'm using to represent a set of decisions and the resulting payout:
Here there are two choices to be made: 0 can be either a, b or c, and 1 can be either d or e. The ...