Questions tagged [random-forest]

Random forest is a machine learning ensemble method based on choosing random subsets of observations and variables for each of many decision trees.

Filter by
Sorted by
Tagged with
0 votes
2 answers
25 views

Is probabilities mean of predicted class (RandomForest) a consistent estimator of class recall?

I'm working on a classification problem in order to predict among 50 different classes. I'm using a Random Forest classifier and I'm using the predict_proba method ...
Jerome X.'s user avatar
0 votes
0 answers
52 views

Prediction in multiclass classification

Context: I need to make an multiclass classification to predict what type of sentence(law) the case will have in the end. Data: I Have several columns to predict the case:client, cause of action, ...
ThiagoM's user avatar
0 votes
0 answers
21 views

accuracy on test set is always close to the distribution of label

here is a time series, at each time $i,$ we have several features $(a_1, a_2, ... a_k)$ and a binary label $y.$ Now I use a window $$(a_1[i], a_1[i-1],..., a_1[i-s],..., a_k[i], a_k[i-1],..., a_k[i-s])...
user6703592's user avatar
0 votes
0 answers
7 views

Test accuracy plateaus when increasing max_depth -> inf

I've built a Random Forest model that classifies into four categories based on around 10 input features. To test the accuracy, I performed 5-fold stratified cross validation using the ...
okjdlsksjdwi's user avatar
1 vote
1 answer
31 views

How to know the confidence of a classification on unlabeled data generated after model training?

I have created (in python) the code for a Random Forest classification model for a labeled dataset using sklearn. The model works very well. ...
Daniel Vieira's user avatar
1 vote
0 answers
7 views

Huge variance for RandomForestRegressor models

The experiment is the following: train a RFR with a 15k train rows get predictions on 8k test rows, save predictions as y_hat0 remove 1 random row from the training set and retrain the RFR save ...
Oleg's user avatar
  • 11
0 votes
2 answers
22 views

Can you obtain classification thresholds for specific features in a Random Forest?

Say I've created a random forest model for binary-classification prediction target of either "Pass" or "Fail" for a group of students based upon numerical features "Hours ...
Petunia's user avatar
0 votes
1 answer
39 views

Dataset I am working with seems to have been artificially created and the target variable has the same average value no matter the split

I am trying to run a Random Forest on a dataset that has 4 synthetic features, with distributions ranging from approximately -5 to 5. It is not possible to say what those features mean. The dataset ...
Little L's user avatar
0 votes
1 answer
28 views

Overfitting in the trained model

For my project on the classification problem of predicting churn customers, I trained various base models using k-fold validation on the training dataset and out of which random forest gave the best ...
Yuvika Yadav's user avatar
0 votes
1 answer
48 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
25 views

Do prediction intervals for Random Forest predictions are average of prediction intervals of trees being Random Forest estimators?

I am working on adding prediction intervals for each prediction value of new input samples. Do prediction intervals for Random Forest predictions are average of prediction intervals of trees being ...
Paulina's user avatar
0 votes
1 answer
31 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
0 votes
1 answer
85 views

Time Series: ARIMA vs Random Forest Regressor

I have two model prediction results: Using ARIMA model Using Machine learning model where I used Random Forest Regressor How do we compare these two? Is conventional time series modelling better or,...
Athos's user avatar
  • 1
0 votes
0 answers
20 views

Stacking realization problems

I have two dataframes: x_train with features got from base models and y_train with ground true labels of these features using cross_validation. ...
XEX's user avatar
  • 3
0 votes
1 answer
28 views

Struggling with understanding RandomForest model with SMOTE

From what I understand my code is telling me that my base model is performing at 96% on it's training data, 55% on it's test data. And my SMOTE model is performing at ~96% on both. From my ...
GroupTheory14's user avatar
1 vote
1 answer
39 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
1 vote
0 answers
31 views

Can you do a power analysis to determine the sample size for a virtual species simulation which is modeled using random forests?

I am simulating virtual species on a 100x100 grid (the size for now). Each grid layer represents one environmental variable. The "suitability function" defines the probability of a presence ...
Kyle's user avatar
  • 111
2 votes
2 answers
91 views

Random Forest Classification model performing much better with 70:30 TEST:TRAIN rather than the opposite

I'm working on a Classification problem as a side project and I'm receiving results contrary to what I'd expect. With 100,000 records, each with 7 components for X, the model is performing much better ...
GroupTheory14's user avatar
0 votes
1 answer
19 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
13 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
11 views

R Random Forrest - Use tthe mean of a input variable of all values as varibales

I have a theoretical question. I have a dataframe with a categorical response with levels: 1,2,3,4 And I have one feature with lists for for each response row. So the rows looks like this: ...
user149240's user avatar
0 votes
0 answers
9 views

Value[] attribute in my decision tree is not consistent with number of samples

I read that value[] attribute in a decision tree shows the distribution of the samples across class 1 and class 2. However, my value[] is not adding up. In the root node for example, there are 14 ...
Dharmini's user avatar
0 votes
0 answers
15 views

Appropriate sample size for prediction algorithm

Our study aims to develop a Random Forest algorithm to predict the incidence of suicidal thoughts, after one year, based on the responses given to four surveys at baseline (time-1). Each survey ...
Andre's user avatar
  • 1
0 votes
0 answers
8 views

Calculating the importance metric in random forest: Why don't we remove the variable instead of permutating its values?

The importance metric in random forests is a way to determine the significance of a predictor variable in a model. It does this by randomly permutating the values of one predictor variable at a time ...
Asterion's user avatar
  • 111
1 vote
1 answer
31 views

how each tree in random forest structured/built?

I'm new to machine learning and I want to use random forest for the problem I have. What I have done so far is I did the 80/20 split of the original data set. I need to understand what will happen ...
abs8090's user avatar
  • 13
1 vote
1 answer
45 views

Random Forest on high correlated data

I am relatively new on data science sector. I started tampering with random forest models and some strange occasions aroused. To be precise, I have data from sensors that record pollutants and a ...
Sirick's user avatar
  • 13
0 votes
0 answers
163 views

Sklearn predicts different results depending on the input length

Here is the problem: I fitted a Random Forest Classifier and saved it to a pickle file. However, when I predict with the entire dataset I get one result, and when run predict line by line (loop) I get ...
Juarez's user avatar
  • 1
0 votes
1 answer
35 views

How a Random forest "learns" or How loss (objective function value) is propagated back so that a random forest can "Improve"?

Every Blog and Youtube video talks about the same steps: Choose that you have to build N number of tree and do the task 2-5 ...
Deshwal's user avatar
  • 323
0 votes
1 answer
34 views

How can I be more certain that I have not accidentally made my ML model predict on training data?

I have this random forest model setup as shown below in python. It's performing unexpectedly well with a ~70% classification success rate (to the extent where I really doubt it is genuine) and I am ...
weggegon's user avatar
0 votes
1 answer
268 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
  • 335
0 votes
0 answers
26 views

Random Forest - Partial dependence plot/marginal effects

I used the ranger package to train my RF in R. Now I need some more information on the marginal effect and a partial dependence plot but I can't seem to find a good ...
noels's user avatar
  • 11
2 votes
1 answer
86 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
6 votes
1 answer
145 views

How to choose between different models with similar results? RF, GLM and XGBoost

I am a medical doctor trying to make prediction models based on a database of approximately 1500 patients with 60+ parameters each. I am dealing with a classification problem (mortality at 1, 3, 6 and ...
user145725's user avatar
0 votes
1 answer
30 views

Can I use macro recall to check if my RF model is overfitting?

I have a dataset with 837377 observations (51% to train, 25% to validation and 24% to test) and 19 features. I calculated the recall score using average macro for train, validation and test and ...
Just_4n0th3r_Pr0gr4mm3r's user avatar
1 vote
1 answer
25 views

Random forest - estimate range instead of exact value

I was wondering whether one could adjust a random forest to estimate a range of values instead of receiving one exact estimate. What I mean by that: my current rf predicts a value of e.g. 5 based on ...
noels's user avatar
  • 11
0 votes
1 answer
206 views

TensorFlow random forest get label as prediction output

I'm using TensorFlow decision forest to predict the suitable crop based on few parameters. How do i get the predict() method to return the label ? Im using this dataset for training My code ...
Nishuthan S's user avatar
0 votes
1 answer
41 views

Do I need to use always the same "Test" dataset to compare between different models?

I have two datasources A and B, and I want to check how several methods can affect the accuracy of my multi class models: If I use cross-validation with validate dataset to obtain the best hyper ...
Just_4n0th3r_Pr0gr4mm3r's user avatar
1 vote
2 answers
19 views

Random Forest with less samples & variation in test_scores

I'm building a RandomForestRegressor with 75 samples. The distribution of y (After train_test_split) is as below. (Blue-Train and Red-Test) Keeping test_size=0.3 (...
Salih's user avatar
  • 133
1 vote
2 answers
28 views

Should value of equation outcome be treated as variable for Random Forest model training?

For example, I got 5 variables, A to E, for prediction of a value. A B C = A - B D E the output of random forest rank C, B and A are variables with the most importance in descending order, my question ...
Stephen C's user avatar
0 votes
0 answers
20 views

Multi-class classification model unable to return desired outcome

I have a scenario of multi-class dataset with around 10 distinct classes of target. There are 3 categorical features each with multiple labels. If we check the data, each unique combination of feature ...
soumalya saha's user avatar
1 vote
1 answer
218 views

Random Forest Classifier is giving me an array of zeroes

I used VGG16 as feature extractor on a dataset with 9 classes and trained the Random Forest Classifier on the feature vector. I tried to make prediction on the test feature vector but the prediction ...
gray's user avatar
  • 23
1 vote
1 answer
35 views

Can the product of tree regressions be represented by a single tree?

Assume that we have two separate tree regressions. I'm interested in understanding whether the product of tree regressions can be represented by a single tree. Would this be possible?
TFT's user avatar
  • 35
0 votes
1 answer
75 views

I get 100% on my test set using random forest. What is wrong?

I am getting 100% accuracy on my test set when trained using random forest. Is there something wrong with my model? Code: ...
hre0's user avatar
  • 3
0 votes
1 answer
67 views

HalvingGridSearchCV

Is there a way to get Feature importance from sklearn`s HalvingGridSearchCV? For example: Is there any way to access the feature importance? Please help me up. Thanks!
Sanket's user avatar
  • 1
0 votes
0 answers
400 views

Problems with implementing LIME

Hope you are holding on tight, Christmas soon! **Updates: I'm only able to get the results in probability but I want it in pure binary (0 or 1). I tried using .predict instead of predict_proba(x_test) ...
Ostlimpa's user avatar
1 vote
2 answers
111 views

Is there a point in hyperparameter tuning for Random Forests?

I have a binary classification task with substantial class imbalance (99% negative - 1% positive). I want to developed a Random Forest model to make prediction, and after establishing a baseline (with ...
BoS_88's user avatar
  • 11
0 votes
0 answers
49 views

Metric for binary imbalanced classification - Case of penalized classification (class_weight = 'balanced')

I have a binary classification task with substantial class imbalance (99% negative - 1% positive). My task is to maximise the TP rate, while keeping the FN as low as possible. I have opted to use a ...
BoS_88's user avatar
  • 11
0 votes
0 answers
10 views

Understanding model behavior

I am checking the accuracy of a new model (Kmeans with Iterative RF) over SICE (Single Imputation Of Chained Equation) for missing data imputation. For 5-10% SICE is performing well thereafter our ...
Vishnu's user avatar
  • 1
0 votes
2 answers
52 views

Which random_state to use in test_train_split when deploying final model?

I have developed a Random Forest that gives varying results depending on the random state of the test train split. This is normal, because a lot of the values in the data are extreme, without being ...
Nemo_the_scientist's user avatar
1 vote
2 answers
148 views

How to remove test set so that model uses all data as training data?

I have developed a RandomForest classification model and I am pretty satisfied with the results on the test set. Now, my next step is to deploy the model. Before ...
Nemo_the_scientist's user avatar

1
2 3 4 5
17