All Questions
Tagged with class-imbalance random-forest
34 questions
-1
votes
2
answers
32
views
Imbalanced class in my dataset
I’m working with an imbalanced dataset to predict strokes, where the positive class (stroke occurrence) is significantly underrepresented. Initially, I used logistic regression, but due to the class ...
0
votes
1
answer
129
views
Machine Learning Binary Classification Model on a Small Tabular Imbalanced Dataset - Improving Performance
I have a dataset that is fairly small (15,000 rows), with 10 features for a model to learn from. It is not possible to increase the size of this dataset. I am using machine learning for binary ...
0
votes
0
answers
77
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 ...
0
votes
1
answer
455
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 ~...
0
votes
1
answer
47
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 ...
1
vote
1
answer
982
views
Why is gradient boosting better than random forest for unbalanced data?
I've searched everywhere and still couldn't figure this one out.
This post mentioned that Gradient Boosting is better than Random Forest for unbalanced data. Why is that? Is Random Forest worse ...
0
votes
1
answer
2k
views
Improving precision and recall for imbalanced large data set
I have a data set of 1 million points and 30 features. The output variable has multiple classes (1 to $n$) but the problem I'm interested in is only concerned whether the output belongs to class 1 or ...
7
votes
1
answer
3k
views
Random Forest significantly outperforms XGBoost - problem or possible?
I have dataset of around 180k observations of 13 variables (mix of numerical and categorical features). It is binary classification problem, but classes are imbalanced (25:1 for negative ones). I ...
1
vote
1
answer
2k
views
What does the oob decision function mean in random forest, how get class predictions from it, and calculating oob for unbalanced samples
I am interested in finding the OOB score for random forest using sklearn, when it is used for a binary classification task, and there are unbalanced samples. What does the oob decision function mean ...
1
vote
3
answers
635
views
In which situation should we consider a dataset as imbalanced?
I'm facing a problem about making a classification on a dataset. The target variable is binary (with 2 classes, 0 and 1). I have 8,161 samples in the training dataset. And for each class, I have:
...
1
vote
1
answer
349
views
Follow up question regarding Upsampling for Imbalanced Data and the use of ADASYN instead of SMOTE
I have a follow-up question regarding this topic.
I have been working on a project predicting success(1) or failure(0) for organizations by using the Decision Tree and Random Forest algorithms.
My ...
0
votes
1
answer
1k
views
How to set a class_weight Dictionary for Random Forest?
I'm dealing with an unbalanced dataset, so I decided to use a weight dictionary for classification.
Documentation says that a weight dict must be defined as shown below:
https://imbalanced-learn.org/...
-1
votes
1
answer
160
views
How to identify Overfitting in RandomForestClassifier?
Im building a sentiment classification model using RandomForestClassifier. I got the training accuracy of 99.65 & cross-validation( RepeatedStratifiedKFold-5 folds) accuracy of 97.29. I used f1 ...
1
vote
1
answer
31
views
is there any rule to apply pca to the imbalance data? [closed]
Is there any rule to apply PCA to imbalanced data? (randomforest, xgboost)
I used multiclass imbalance data to pca
but the log-loss accuracy getting decrease
any theoritical background of this?
1
vote
1
answer
112
views
imbalanced target dataset(multi class)
I have a multi-class prediction problem
but the 300classes is imbalanced
should I make it balance all 300 class will predict the better result?
is there an easier method to do this job?
if I'm using ...
7
votes
3
answers
2k
views
Why did sampling boost the performance of my model?
I have an imbalanced dataset with 88 positive samples and 128575 negative samples. I was reluctant to over/undersample the data since it's a biological dataset and I didn't want to introduce synthetic ...
3
votes
2
answers
188
views
Which classifier performs better when using 'class_weight'?
I have used the 'class_weight' method to balance my multi-class classification problem, using Logistic Regression, Random Forest, and XGBoost classifiers. Among these three methods, logistic ...
2
votes
1
answer
3k
views
Choosing weights on random forest for imbalanced data with the aim to minimize false positives
I am currently dealing with a binary classification task on imbalanced data with the following distribution:
...
0
votes
1
answer
773
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 ...
5
votes
2
answers
4k
views
convert predict_proba results using class_weight in training
As my dataset is unbalanced(class 1: 5%, class 0: 95%) I have used class_weight="balanced" parameter to train a random forest classification model. In this way I penalize the misclassification of a ...
5
votes
5
answers
12k
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: ...
1
vote
0
answers
136
views
Kappa Goes up as Accuracy Goes Down
I have recently been trying to train a randomForest model on a binary outcome with a very uneven class split.
282 control ~82%
63 case ~18%
There are a total of 147 predictors that I'm testing for ...
1
vote
0
answers
344
views
Relation between using stratify and class weights for imbalanced classes
I'm working on a multi-class classification problem where the classes are imbalanced (70:25:5).
Train-Test Split
...
6
votes
3
answers
5k
views
using sklearn class weight to increase number of positive guesses in extremely unbalanced data set?
Hi I have a poorly correlated and unbalanced data set I have to work with. The set is 2 classes, 0 has 96,000 values and 1 has about 200. When I run random forest or other methods I get an output like:...
2
votes
1
answer
788
views
Poor Precision-Recall curve for binary classifier trained on balanced data, with imbalanced test data
I have an very imbalanced dataset (9:1), for which I have performed under-sampling and achieved a balanced training set (~130k samples total post balancing).
I am performing classification using ...
3
votes
3
answers
193
views
Overfitted model produces similar AUC on test set, so which model do I go with?
I was trying to compare the effect of running GridSearchCV on a dataset which was oversampled prior and oversampled after the training folds are selected. The oversampling approach I used was random ...
3
votes
3
answers
1k
views
Random Forest Classifier - KFold CV Tunes Very Deep Trees --> Overfitting?
I'm tuning a random forest in python and am wondering if/why my model is overfit. The dataset is described below:
1700 Positive Cases / 54000 total cases ~ 3.2% (unbalanced)
50 Numerical Features,~...
2
votes
2
answers
5k
views
Random Forest Classifier Probabilities
My dataset has 140k rows with 5 attributes and 1 Attrition as target variable (value can either be 0 (Customer churn) or 1 (Customer Does not churn)). I divided my dataset in 80% training and 20% ...
0
votes
1
answer
298
views
Right ML mode and metric to minimize FN and FP on imbalanced dataset
So I have a dataset in which I have to predict class binary label (1 or 0), the problem, out of 120k data points, only 200 have the label '1'.
the aim is to minimize FN and FP.
Which ML model should ...
1
vote
1
answer
588
views
Imbalanced Data how to use random forest to select important variables?
I am trying to use random forest to select important variables out of 15K features and fit them into logistic regression. My evaluation is based on F1 score. Dataset 2 classes ratio are around: 99.5:0....
7
votes
1
answer
6k
views
Overfitting for minority class after SMOTE w/ random forests
I used SMOTE to make a predictive model, with class 1 having 1800 samples and 35000+ of class 0 samples. Hence, as per SMOTE, synthetic samples were created and the random forest was trained.
However,...
2
votes
1
answer
2k
views
EasyEnsemble explaination
Could someone please explain how the EasyEnsemble algorithm works? Im using it for a prediction model for imbalanced minority class.
Please don't refer me to this paper, as it makes no sense to me.
...
10
votes
1
answer
47k
views
How does class_weights work in RandomForestClassifier
I'm facing a problem with unbalanced classes, and have tried out a couple of methods like over and under sampling. However, my cross validation mean comes out to be only 0.4 and my confusion matrix ...
13
votes
3
answers
24k
views
Unbalanced classes -- How to minimize false negatives?
I have a dataset that has a binary class attribute. There are 623 instances with class +1 (cancer positive) and 101,671 instances with class -1 (cancer negative).
I've tried various algorithms (Naive ...