Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
1 vote
1 answer
23 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
37 views

Strange behaviour on Random Forest Classifier

I've build two identical rf_classifier and trained with two identical datasets but with 2 different target variable (the sell or not sell of two different specific products, one for each algorithm). ...
Federicofkt's user avatar
0 votes
0 answers
13 views

How to get Shap feature importance values for a random forest classifier at local level

I have a random forest classifier (binary) model that I'm using to run prediction on unseen test data. For each observation in the test data, I want to get the feature importance (which feature was ...
Tamanna Mostafa's user avatar
1 vote
1 answer
59 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
1 answer
18 views

Random forest regression model for stock price prediction output has a flat line in the predicted values during the initial values

I have a random forest regression model for predicting the close price for stock data. I am getting model accuracy as like this: /n Best Parameters: {'max_depth': 10, 'min_samples_leaf': 2, '...
ANA's user avatar
  • 1
0 votes
1 answer
22 views

X and y variable definition for RF split of multiclass classification rating

I have the following variables: text (text of the review), rating (rating of the review 1 to 5), resp_text (managerial response to a review), month_before (binary variable that indicates whether or ...
Dolphin Army's user avatar
0 votes
0 answers
17 views

Which method is better to understand key drivers/feature importance in prediction?

After applying two different classifiers (EBM Classifier and Random Forest Classifier) and getting similar scores, I used InterpretML functionality to identify the most relevant features in each model....
Guilherme Atihe de Oliveira's user avatar
0 votes
1 answer
14 views

Struggling with normalization/Standardisation for machine learning dataset

Sorry for what is probably a very obvious/rookie question. I'm currently doing a data science module for my degree and making very slow progress with the work. The case study i'm doing is around HR ...
Alex Ferry's user avatar
2 votes
1 answer
56 views

how can I fix my model to accurately assess zero values?

I'm building a random forest model that is designed to predict tree canopy cover. I'm using an R software environment and satellite remote sensing data as my predictors. I'm okay with under or over ...
Priya Patel's user avatar
0 votes
0 answers
10 views

How does hyperparameter tuning work for constructing/choosing a final model using Nested Cross validation?

I want to determine if XGBoost is better than random forest or logistic regression for building a binary classification model. The model will be a composite model, with a feature selection model to ...
reuben george's user avatar
0 votes
0 answers
7 views

Strange situation RF classification: perfect train, test predictions all in a single category

I am puzzled by an issue with a boolean classification task using RF on a large dimensional dataset (1680 obs x 110 dim) and moderate imbalance (431 vs 1249). train/test partition is random (0.8,0.2) ...
Antonello's user avatar
  • 101
0 votes
1 answer
22 views

Error while executing the adaptiverandomforest with river libraray

I have installed rivery library and write the adaptiverandomforestregression program to apply onlinelearning and I am getting errror that AttributeError: module 'river.ensemble' has no attribute '...
RAJESH KOYI's user avatar
0 votes
0 answers
20 views

How to apply online learnig to Random Forest?

I have developed a random forest model for wind veliocity prediction with hyperparameter tuning, but i am getting continuous data. So i want to apply online leearning for random forest model. could ...
RAJESH KOYI's user avatar
0 votes
0 answers
17 views

PR-AUC vs F1 vs Balanced Accuracy

I'm trying to create a Random Forest Classifier for selecting ~ 700 features. I have a highly imbalanced dataset to select features from. There are significantly fewer positive cases (1%) compared ...
user155775's user avatar
0 votes
0 answers
27 views

sklearn Random Forest classifier vs R’s Random Forest classifier

I’m trying to implement the R’s random forest classifier equivalent in python- ...
Mark W's user avatar
  • 1
0 votes
0 answers
36 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
0 answers
40 views

How do I know the appropriate number of iterations when using Miceforest for imputation?

I want to know how to avoid overfitting without having to increase the number of iterations excessively in Python with the Miceforest library. I know you can make a correlation map of data sets but I ...
Eduardo Dimas's user avatar
0 votes
0 answers
19 views

Random Forest Classifier Removing Features using Top-N Features Method

I am a new-comer to data science and machine learning techniques and processes. I'm working on a personal project that predicts the winner of an NBA game using a random forest classifier. I have ...
Vishnu Vennelakanti's user avatar
0 votes
2 answers
45 views

Is a Random Forest Capable of Learning and Predicting Numerical Trends in Panel Data?

In a panel data set consisting of exponential functions, each indexed by an integer i ranging from 0 to 100. The exponential function is defined as f(i, t) = A(i) * e^(-r(i) * t), where A(i) is the ...
Emad Ezzeldin's user avatar
0 votes
0 answers
12 views

Does it make sense to do hp tuning for a Random Forest for top k precision or recall?

I've trained an RF with a binary classification task that achieves mediocre performance. However, they way it is intended to be used would have end-users look only at predictions with high scores (...
ds_banter's user avatar
1 vote
0 answers
119 views

Feature importance using random forest vs. SHAP

I recently came across SHAP while looking for feature-importance methods. To use SHAP, first a model needs to be created, and then based on the predictions made by the model, SHAP values are ...
lsr729's user avatar
  • 183
0 votes
1 answer
32 views

I am a beginner in Knime and using Random Forest

Within Knime how am I able to identify which of the variables have the best predictive power within my model. I have successful ran the model and assessed model accuracy, recall and precision but can ...
skillzuko345's user avatar
0 votes
1 answer
92 views

Stock Price Prediction Using Random Forests (R-squared problem)

...
Kemit4's user avatar
  • 103
0 votes
1 answer
205 views

Why I'm getting a negative R2 score with Random Forest Regressor?

I'm trying to predict some variables for MOF's (from a scientific paper) using the Random Forest model in Phyton, but the value of R2 is negative (different from the paper, which was positive). I ...
Vinicius Maia's user avatar
0 votes
0 answers
30 views

Model can not fit to 8 datapoints

I have 10 groups of biological experiments, all of size 100. I want to estimate experimental performance (success rate) of each groups of experiments, but have only ran experiments in two groups. My ...
TheNumber23's user avatar
0 votes
0 answers
31 views

Target variable is discrete ranging from 1 to 14, with each value having same proportion in the dataset, ML models fail miserably

I have a dataset of shape (55314,23). The target variable is league_rank. There are exactly 3951 leagues in this dataset, with each club having a ranking from 1 to 14. The variable is discrete, and ...
Little L's user avatar
0 votes
1 answer
131 views

Random Forest overfitting to unbalanced data set

I am working on an unbalanced classification problem. I have have 2000 points which are positive, and 6000 points as -ve (chosen randomly from 100k universe of -ve points universe). Although I have ~...
Gupta's user avatar
  • 75
0 votes
1 answer
120 views

Can lag features be applied into test data without label?

can lag features be applied into test data without label? I've been wondering. I tried to build random forest model using dataset: training data (with label Y) and testing data (without label Y). The ...
thenoirlatte's user avatar
0 votes
1 answer
45 views

Validity of using raw time series data for training of xgboost/random forest classifier

I am currently working on a project aiming of classification of process states based on time series data. For this, we are looking at different models, such as XGBoost-based classifiers or ...
arc_lupus's user avatar
  • 103
1 vote
2 answers
209 views

Why do we need hyperparameter tuning in Scikit learn? Doesn't sk learn models by default give best model?

When I have the option to build a classifier like this directly clf = RandomForestClassifier() why do we perform tuning by restricting the parameters like this <...
Hola's user avatar
  • 13
0 votes
1 answer
703 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
0 answers
12 views

Comparing random forest vs step wise regression

We have a dataset that we would like to compare the performance between random forest vs regression. However, due to the limited total amount of data, we used 5-fold cross validation with 5 repeats on ...
Raine's user avatar
  • 1
1 vote
0 answers
29 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
22 views

How to Fix Dimension Issues of features and classes from a Multilabel Classification dataset in getting the Out-of-Bag Error of a Random Forest?

I have created a multilabel classification dataset using make_multilabel_classification from scikit learn: ...
Ralph Henry's user avatar
0 votes
0 answers
131 views

How to deal with "Could not broadcast input array from shape (1141,2) into shape (1141,)" to get Out-of-Bag error while using Random Forest

I have a dataset that consists of 171 features and 39 labels. I captured both features and labels of the dataset through slicing: ...
Ralph Henry's user avatar
0 votes
2 answers
39 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
68 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, ...
TM01's user avatar
  • 1
0 votes
0 answers
23 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
13 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
97 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
78 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
43 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
30 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
134 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
91 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
  • 15
0 votes
1 answer
142 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
1 answer
156 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
80 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
2 3 4 5
18