Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [random-forest]

Random forest is a machine-learning method based on combining the outputs of many decision trees.

0
votes
0answers
11 views

Using UMAP or other non-linear dimension reduction techniques on response variables prior to learning?

Background Suppose you have a training set where the response measurements are some $N$-dimensional vectors of related measurements - in my specific case, they happen to be cell viability scores for ...
0
votes
0answers
9 views

Huge difference in accuracy when using two datasets (instead of one) for text classification in Python [on hold]

Recently I started reading more about NLP in order to learn more about the subject. The problem that I've encountered, now that I'm trying to make my own classification algorithm (the text sends a ...
0
votes
0answers
9 views

Is harmonic mean of feature importance index a statistically appropriate approach to obtaining most important features across different models?

I've trained 16 different models on similar biological datasets to predict the occurrence of a specific disease (the target) from ~18000 biological super-pathways (features). Each dataset has the same ...
0
votes
0answers
19 views

how to map leaves in random forest to thire original y_test (target ) in the train set?

in RandomForestClassifier of sklearn.ensemble i try to understand hoe to map the obkect return from fit , for example in this code how to get samaples in the leaves and how to connect them to it's ...
1
vote
1answer
41 views

Best model to predict if the client will buy our product or not

I would like to find a good model to predict which client will buy my product in 2018. I would like to have opinions on which method can fit my data to predict which client will the product A in 2018. ...
0
votes
0answers
14 views

Almost reverse feature importances by Extratrees vs RandomForest

I am using scikit-learn to find feature importances using ExtraTreesClassifier and RandomForestClassifier, both of which have feature_importances_ attribute. The ...
1
vote
0answers
24 views

Predictive models to predict sales with r

I would like to find a good model to predict which client will buy my product in 2018. I would like to have opinions on which method can fit my data to predict which client will the product A in 2018. ...
-1
votes
0answers
12 views

Model Based Random Forest [on hold]

I am using this packing MobForest in R, to implement Model-Based RandomForest and I am wondering if anyone knows how I can retrieve the coefficient of the covariates. Also, can it be used to make ...
1
vote
1answer
46 views

How to predict one variable depending upon two other variable in Random Forest?

Instead of modeling the function as an ARIMA process, I am trying to use random forests and gradient boosting as regression techniques. In the problem setup, the predictors are t_2, and t_1 and the ...
0
votes
1answer
13 views

How is it called when a MLR algorithm predicts a value beyond the range of the training data set and is there a way to avoid this for Neural Networks?

I use two Machine Learning Algorithms to learn how my target variable [0, 8] is affected by four features, each within a scale of [1, 10]. I am using scikit-learn to do this task for me. ...
1
vote
0answers
13 views

Adjustment for binary classification with differing proportions

My data had a different proportion of 1 (20%) and 0 (80%). I found here that we can use upsampling to get a good sensitivity. The caret package in ...
0
votes
0answers
19 views

Reason for higher AUC from a test set than a training set using a random forest

I made a 70:30 split of the data to build a random forest model for binary classification. Although the prevalence of $Y=1$ was about 25% in both training and test sets, the two sets became imbalanced ...
0
votes
0answers
14 views

randomForst plot gives 3 lines, black, green and red? [duplicate]

When I plot my randomForest I ger three different lines, one green, one red and one green. I've been reading that the black is OOB but what about the others? Also, I only want to plot the OOB (unless ...
0
votes
1answer
18 views

how to compare the performance of linear regression vs tree-based methods such as randomforest

When I have linear regression, negative binomial, ridge/lasso regression and randomforest, how can I compare their performances? I've read that between linear regression and ridge/lasso, one can ...
0
votes
0answers
12 views

How can we explain the fact that “Bagging reduces the variance while retaining the bias” mathematically?

I am able to understand the intution behind saying that "Bagging reduces the variance while retaining the bias". What is the mathematically principle behind this intution? I checked with few experts ...
0
votes
1answer
12 views

Does derived data (from original dataset) make sense in a RandomForest binary classification?

I am trying to implement a ML model, using the RandomForestClassifier. It is a binary classification problem. The timestamp is a very important feature for me. So I divided the timestamp-column to ...
0
votes
1answer
13 views

Random Forest and preprocessing in Data Mining

When applying the Random Forest classification technique, do we have to do preprocessing or is it true that it is not needed for Random Forest ?
0
votes
0answers
13 views
3
votes
1answer
24 views

Random Forest Regression - R^2 score or MSE for Comparison

I trained a Random Forest Model for Regression and till now I compared the R^2 Score between the different trained models, but as I have read a few articles that the R^2 Score might not be the best to ...
1
vote
1answer
34 views

During a regression task, I am getting low $R^2$ values, but elementwise difference between test set and prediction values is huge

I am doing a random forest regression on my dataset (which has abut 15 input features and 1 target feature). I am getting a decently low $R^2$ of <1 for both the train and test sets (please do let ...
0
votes
1answer
17 views

How does random forest calculates the importance of the features?

Trying to understand completely how does random forest work and playing with it a bit, I came across the importance() function here on sklearn. This function has ...
0
votes
1answer
28 views

How do I use a random forest regression once trained [closed]

Similar questions have been asked on these two posts: random forest how to use the results and How to use random forest for regression after it is trained but I feel like the replies didn't give ...
2
votes
2answers
36 views

How can I represent a randomForest object in a way that “unlocks the black box” in R? [duplicate]

I have a randomForest object in R, and am trying to extract prescriptive insights, as I would with a tree. This is for a binary classification problem. Given this setting, my main question is: How ...
1
vote
1answer
10 views

Getting feature importance for random forest through cross-validation

I'm working on building a random forest to classify samples based upon gene expression data. The data has ~11,000 samples, ~60,000 features and there are 37 classes. I have already determined the ...
0
votes
0answers
16 views

Effect of variable type in prediction

Let's say I have a set of independent variables: x1, x2, x3, etc. These are used to predict ...
0
votes
0answers
18 views

Maximize mtry in random forest to hone in on most important predictors?

I'm currently using random forest to determine how a set of temporal predictors, lagged and aggregated at many different timescales, influences a binary disease outcome. My main goal is to understand ...
1
vote
0answers
9 views

Why tuneRF does not have a good result for ctree in R

I tried to use tuneRF for selecting the minimal OOB value for best mtry value in ...
0
votes
0answers
4 views

Few Queries regarding CART and logistic algorithms and missing data

I have few queries regarding ML algorithms and data, It would be great if you can provide some feedback on that. Which is best package to impute the missing data (currently using MICE in R) and how ...
0
votes
1answer
22 views

How to compute the F1 score?

Here is my code: score = metrics.f1_score(y_test[0:], y_pred, pos_label=list(set(y_test))) And here are my dimensions/shapes, which I print before executing the ...
1
vote
1answer
46 views

Fitting sklearn GridSearchCV model

I am trying to solve a regression problem on Boston Dataset with help of random forest regressor.I was using GridSearchCV for selection of best hyperparameters. Problem 1 Should I fit the ...
0
votes
0answers
17 views

Different Feature Importance Random Forest K-Fold

i have a few questions about Random Forest Regression. I have a matrix with 300000rows x 170columns and i did a Cross Validation on my on with a simple for loop. I train and test with 80% / 20% and I ...
1
vote
0answers
9 views

Random forest regressor has a negative score [duplicate]

I am using a RandomForestRegressor. When I check the score for the model with the training data, it's Rregressor.score(X_train,y_train) 0.8357837327169805 but when I check the score using the test ...
0
votes
1answer
39 views

Is using a test set mandatory after a k-fold cross-validation?

I'm using 10-fold cross validation to make binary classifier. My dataset contains 3000 samples with only 150 in the minor class (low signal 4%) I've have around 100 features and use features ...
0
votes
0answers
44 views

Regression Algorithms (Random Forests, GBM, GLMNET) Evaluation

Currently, I am doing a Machine Learning Project. I am in the process of performing evaluation of my models. As the title states, my models that I implemented were Random Forests, Gradient Boosting ...
0
votes
0answers
17 views

strange result with RandomForest

I have trained about 50000(3500 races) rows of horse data with the following RF code : ...
11
votes
4answers
2k views

Random Forest and Decision Tree Algorithm

A random forest is a collection of decision trees following the bagging concept. When we move from one decision tree to the next decision tree then how does the information learned by last decision ...
0
votes
0answers
11 views

Interpreting MeanDecreaseGini graph in R

Using the randomForest package in R, I fitted a customer churn dataset to a random forest model. The first objective was to identify the most important variables in ...
2
votes
1answer
20 views

Why does adding a redundant predictor to randomForest improve prediction?

I write in hopes of understanding an odd behavior of the randomForest package. I am trying to predict a factor y with 9 levels using 8 binary factors X1-X8. I get good accuracy (0.8959), and the ...
0
votes
0answers
12 views

“Honest” Random Forest - one time subsampling + bootstrapping vs. repeated subsampling

I am wondering about the differences between the following two approaches when predicting with random forest: Approach 1: Divide your dataset into a training sample and a test sample (randomly) ...
1
vote
3answers
40 views

Collinearity of features and random forest

According to this blog post, inclusion of correlated features in a random forest may be an issue. Which methods do people use in R to detect correlated features and how does one decide which feature ...
0
votes
1answer
12 views

Using RF/GBM regressors when some observables are not real valued but just greater than a given value?

Say I can experimentally measure some number of $N$ data points which have an observable $y$ value I'm trying to model where $y=[0, 100)$ and is a continuously valued number. However, I also have $M$ ...
0
votes
0answers
21 views

Pro and cons on multivariate time series approaches

So I am working on a project where I want to forecast how a team will perform in their next match in a number of specific categories (goals scored, time spent in certain parts of the field, passes, ...
0
votes
0answers
12 views

How do you deal with MNAR in randomForests?

The problem is the following: In a survey, people are asked to note different qualities of a firm with a note between 0 and 10. For some questions, the interviewer knows that the interviewee can't ...
0
votes
1answer
45 views

Random Forest % Var explained OOB output differs from test dataset results

I am learning how to use Random Forest in R for regression based on the Boston dataset. I am unsure on which values I should concentrate to evaluate the obtained model, the OOB % Var explained and MSE ...
0
votes
0answers
12 views

Optimizing recursive loss functions with decision trees

For time series applications, it is often helpful to model things in a recursive fashion. For instance, let $f(x)$ be a model which predicts the next time step of some time series, so that $$ f(x^{n+...
2
votes
0answers
25 views

Residual-analysis by running KNN or Clustering on incorrect ANN or RF predictions? [on hold]

I've outputs of some neutral net models, which naturally gives some errors in the prediction. What I am interested in is determining whether there are any systemic patterns associated with these ...
3
votes
1answer
45 views

remove features that has zero feature importance in random forest

We have 10 features that is pre-selected from domain knowledge. We ran random forest with those features. one of the feature has zero feature importance. My question is: For those features that has ...
1
vote
1answer
126 views

Predicting spendings overall and spendings for subcategories

I have a Dataset containing information about spendings of customers in various shops. There are 10 spending variables related to some categories (like spendings on clothing, spendings on hardware, ...
0
votes
0answers
50 views

calculate Gini coefficient from mean Decrease Gini

I have a question. How I can calculate Gini coefficient (Ranges 0 to 1) from mean decrease Gini. when using R you get Mean Decrease Accuracy and Mean decrease Gini. I am interested in calculating Gini ...
0
votes
0answers
8 views

Data synthesis approach for sample sample prediction

I have to forecast sales of a temporal SKU which only sold one month in a year. I have sales figures for nearly 1000 different sales locations. Moreover, my data is limited for only 3 years. So I ...