Questions tagged [random-forest]

Random forest is a machine-learning classifier based on choosing random subsets of variables for each tree and using the most frequent tree output as the overall classification.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

Hyperopt Model runs with 0 seconds duration

I use Hyperopt for Random Forest Regression hyperparameter tuning. my parameterspace is : ...
1
vote
0answers
22 views

I have tried 5 different types of model but all returns really low training accuracy (~64%) and low testing accuracy (~14%). What should I do?

I am working with a typical regressor problem. There are $6$ features in the dataset that I am concerned with. There are about $800$ data points in my dataset. The features and the predicted values ...
-3
votes
0answers
17 views

Problem statement suggestions for “Analysis of Flipkart Data”, an online shopping site problem

We are performing the analysis of data of an online shopping site. Please refer to the dataset mentioned in this link The fields of the dataset are: We have been asked to do the following: Perform ...
0
votes
1answer
18 views

Random forest with zero precision for unbalanced test data

Apologies if this is a basic question. I have a very unbalanced dataset in which the records are labelled by one of two classes, class1 (negative class) and class2 (positive class): class 1: 1.5 ...
1
vote
0answers
17 views

Feature Importance Scores from Gradient Boosting vs Random Forest

In sklearn, the feature_importances_ attribute exists for both RandomForestClassifier and GradientBoostingClassifier. Would like to know what are the fundamental differences in how this attribute is ...
0
votes
1answer
11 views

How to create model for selecting a set of categories with a set of attributes?

I have a couple of hundred categories where each of these categories has a specific set of attributes having different values (historical). The problem I need to solve is to select the best set of ...
1
vote
1answer
29 views

Inputs required for Random Forest Regressor and ways to improve performance

I am using Random Forest Regressor to predict inventory needs. The data I am using to train the model lists the total quantity picked for each product per date, but does not include rows where total ...
0
votes
0answers
10 views

ValueError: Found array with 0 sample(s) while using RandomForestRegressor in sklearn [closed]

If the answer should be obvious, please be patient, I am a newbie. I am working with tipd2 which has the following format: ...
1
vote
2answers
19 views

How to transform time series data to apply supervised learning algorithms to it?

Apologies in advance for what may be a very basic question. I have a dataset consisting of marketing calls to different clients, which include the timestamp for the call. My goal is to train a model ...
0
votes
2answers
49 views

RandomForest surprisingly high accuracy

I've been experimenting with Random Forests on Python after trying Naive Bayes which gave me lower accuracy than I expected, 62%. My csv file has around 14,000 records, I use 80% for the training set ...
1
vote
1answer
32 views

convert predict_proba results using class_weight in training

As my dataset is unbalanced(class 1: 5%, class 0: 0%) I have used class_weight="balanced" parameter to train a random forest classification model. In this way I penalize the misclassification of a ...
0
votes
0answers
6 views

Custom Imputation relative to targets in TRAIN and TEST sets

I have a methodology question for dealing with heaps of missing data in my project. My dataset is composed of parts A (~200 columns) and B (another ~200 columns). Together they are to be used for ...
1
vote
2answers
38 views

When to use Random Forest

I understand Random Forest models can be used both for classification and regression situations. Is there a more specific criteria to determine where a random forest model would perform better than ...
1
vote
1answer
36 views

Random forest classifier is predicting only one class even when the dataset is not imbalanced

This is a binary classification task, I have 15K 1's and 11K 0's (target) I have tried the following: ...
1
vote
0answers
11 views

Prediction that a Employee can take a leave or not based on his previous track record

which prediction algorithm should I use to find the probability that an employee takes leave and come back on the specified period(i.e.does does not extend his leave). Thank You.
0
votes
0answers
12 views

Machine Learning Algorithm for 'Performance Rating' to Employees

Which Machine Learning Algorithm should i use for Assigning 'Performance Rating' to each Employee based on his LeaveDaysCount and LeaveExtensionPeriod(If Extended).
0
votes
0answers
22 views

Using bagging and random forests together

I was looking at a kernel implementation (for text classification) and the following piece of code got me a little bit confused (I removed part of the features - in order to keep it light - as most of ...
0
votes
1answer
8 views

Product Prediction to group of customers

I have multiple groups of customer, say for segment 1 as shown in the pictures, I have a list of products that I can choose the cross-sell to that group. Consider ...
0
votes
1answer
32 views

How to apply a trained Random Forest model to a new data set in R?

So I have a data set that is essentially football players statistics in 2017 and 2018. I have trained my model to use the 2017 data to predict the 2018 number of touchdowns. My code is below: ...
1
vote
0answers
14 views

Reducing the dimensions of data who's predominant categorical feature, its layer, has depths that overlaps with other samples layer values

I am working with a data set of soil types with multiple layers of varying depths and sizes with multiple features. There are $1-9$ layers each with differing dimensions, for example, a soil type ...
1
vote
1answer
30 views

approach for predicting machine failure using maintenance history

I have been struggling with this problem for a while now and I finally decided to post a question here to get some help. The problem i'm trying to solve is about predictive maintenance. Specifically, ...
1
vote
4answers
59 views

Large no of categorical variables with large no of categories

I'm working on a binary classification problem where the dataset is slightly imbalanced (30% class 0 | 70% class 1). Most of my features are categorical with large number of categories. For example: ...
0
votes
1answer
28 views

Random forest Classfication

I am a beginner in KNIME and I need to predict attribute I have some questions : 1- How can I choose the most related attribute to predict the target attribute? 2- can I choose the attributes ...
0
votes
1answer
37 views

Why does the same algorithm give very different metrics on similar datasets?

I used Random Forest and hypertuned the parameters for a binary classification problem on a dataset (dataset A). I got a F1 score of 0.78. I then used a second dataset (dataset B). It was very similar ...
1
vote
1answer
23 views

How to store a trained Random Forest model in python or matlab as a matrix

Is it possible to store a random forest model in python (or matlab). Then use that trained model in a C program? I am trying to do this because I am making a myoelectric prosthetic, and you can only ...
2
votes
1answer
43 views

How are Decision Trees averaged in Random Forest?

We all know that a Random Forest is an ensemble of Decision Trees, whose results are averaged. Every source I find simply talks about "averaging trees", but how does this "averaging of trees" happens?...
0
votes
1answer
38 views

How to find optimal number of trees in random forest using Grid search in R?

From below code, I am getting optimal number of mtry. What is this mtry ? and How should I find the optimal number of tree that to be assigned to Random forest algorithm so that it will give High ...
1
vote
1answer
37 views

correct ML approach

I wanted to get your thoughts on a problem I have been facing. I have daily level product sales information (about 4 years). The sales are affected by the typical factors such as seasonality, day of ...
1
vote
2answers
40 views

Is it a good idea to tune the number of folds for cross validation when tuning hyperparameters of RF

I'm new to data science. I'm trying to get the best model for Random Forest. Unfortunately, I'm not sure if my idea can produce a good generalized model. 1) I have split data to TrainingSet (70%) and ...
3
votes
1answer
51 views

Hyperopt vs Default Values

When I use the hyperopt library to tune my Random Forest classifier, I get the following results: Hyperopt estimated optimum {'max_depth': 10.0, 'n_estimators': 300.0} However, when I train the ...
0
votes
2answers
43 views

Reducing MAE or RMSE of linear regression

I'm trying to guess a home price, at final I intend to figure out a formula by using linear regression. As you can see over the url, I have 1480 data with 45 features in which ...
0
votes
0answers
26 views

Random Forest Classifier: Find the decision path for a single data point

I am working with RandomForestClassifier and I would like to be able to analyse the decision path which each decision tree takes for a single data point. What I understand is that the final prediction ...
0
votes
0answers
37 views

Why is the random forest confusion matrix for my test dataset 100% accuracy, when training data matrix isn't?

I am using the software Orange to undertake a random forest classification of geo-chemical data. I am trying to classify points as 0 or 1 based on whether it is a mineral occurrence or not. My ...
0
votes
0answers
25 views

Predict vs. Impute: Filling missing data using Random Forest

I am using R package randomForest to build a Random Forest model for classification. Ultimately, I need to choose one of five programs for a group of individuals ...
0
votes
0answers
28 views

Effect Size in comparison of overall accuracy from Random Forest

I would like to compare two overall accuracy statistics (of a Random Forest classifier). My Data: two samples with each containing 25 features and one categorical class variables (9 different ...
0
votes
1answer
28 views

Random Forest application with 40+ Predictor Variables

I am using R package randomForest to build a Random Forest model for classification. Ultimately, I need to choose one of five programs for a group of individuals ...
0
votes
1answer
28 views

For binary classification, which is best Random Forest or Neural networks?

I had to perform a binary classification, and from the beginning I started thinking about using the Random Forest classifier. But now I'm thinking, if using a neural network would've not been better. ...
0
votes
0answers
16 views

Changing the performance metric used to optimize with random-forest

I'm looking to change the performance metric used to optimize the training for my data set because it is highly unbalance. Because it's highly unbalanced, I don't feel like accuracy is the appropriate ...
0
votes
1answer
31 views

How to Interpret the ROC Curve?

i plotted the ROC curve for RandomForest Classifier and this is what i get : The shape looks weird to me , can somebody help me to make sense of it , and is this shape 'common' to not say normal? ...
2
votes
2answers
89 views

Interpretation of ROC AUC score

i tried to evaluate 6 models and after plotting , this what i get : So i'm wondering , if those results are "Right" ? Thank's in advance.
1
vote
2answers
62 views

Large negative R2 or accuracy scores for random forest with GridSearchCV but not train_test_split

I'm trying to use GridSearchCV from scikit-learn and look at the difference between train/test metrics. When I do a normal test/train split with RandomForestRegressor, the metrics are comparable. ...
0
votes
1answer
57 views

Why is Random Forest feature importance biased towards high cadinality features?

I understand how a random forest algorithm works but could someone tell me the rationale behind Random Forest feature selection being biased towards high cardinality features?
1
vote
0answers
35 views

Random forest multivariate forecast in Python

I am working with a multivariate time-series dataset and have put together a Random Forest code (see below) to forecast the variable TM at a future time (by training the model using data pertaining to ...
0
votes
0answers
34 views

additional of features decrease the accuracy of the model

I am using sklearn's random forests module to predict a binary target variable based on 166 features. When I increase the number of dimensions to 175 the accuracy of the model decreases (from accuracy ...
0
votes
0answers
8 views

Correct use of model interpretability

I am working on a spam classifier with ~26 features where most of these features are of categorical type and only few of them numerical. I have built 3 models with random forest, gradient boosting and ...
2
votes
2answers
205 views

Why is random forest an improvement of decision tree?

Let's assume that we have a binary classification problem, and we built a decision tree on our data set. Assuming that we have 5 features, then the decision tree, in the first step, will choose the ...
-1
votes
1answer
52 views

How to get the data from gender dataset

May I know how to modify my Python programming thus it will be get the same result as refer to the image file? ...
4
votes
1answer
71 views

How does the meta Random Forest Classifier determine the final classification?

I am trying to understand exactly how the meta random forest classifier determines the final prediction, I understand that there is a voting system and an aggregation from the decision trees is used ...
3
votes
1answer
38 views

What happens to the left over unpicked data in Random Forest

I believe in Random forest we pick random samples of training data with replacement. My question is there still is a possibility that we might leave some data out. What happens to that. Does it not ...
1
vote
2answers
56 views

Selection of Features and Data in Random Forest

First, I am confused whether at each node in all the trees, do we randomly pick features from the lot to be pitted for best split or does each tree get a random subset of feature and then all the ...