Skip to main content

All Questions

Filter by
Sorted by
Tagged with
-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 ...
Akingba Gladys's user avatar
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 ...
user167433's user avatar
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 ...
user155775's user avatar
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 ~...
Gupta's user avatar
  • 85
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 ...
Just_4n0th3r_Pr0gr4mm3r's user avatar
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 ...
Aldla E Aoepql's user avatar
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 ...
secondrate's user avatar
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 ...
Filip 's user avatar
  • 73
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 ...
Jonathan Ng's user avatar
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: ...
ouyqf's user avatar
  • 11
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 ...
Ammar Kamran's user avatar
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/...
fega_zero's user avatar
-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 ...
emily 's user avatar
  • 35
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?
slowmonk's user avatar
  • 513
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 ...
slowmonk's user avatar
  • 513
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 ...
Senthamizhan's user avatar
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 ...
Sarah's user avatar
  • 611
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: ...
Doflaminhgo's user avatar
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 ...
manuel mourato's user avatar
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 ...
srl's user avatar
  • 51
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: ...
ybbarc's user avatar
  • 51
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 ...
JTrain500's user avatar
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 ...
Van Peer's user avatar
  • 285
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:...
user3107977's user avatar
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 ...
Anakimi's user avatar
  • 131
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 ...
rayven1lk's user avatar
  • 371
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,~...
Nahyyz's user avatar
  • 31
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% ...
TigSh's user avatar
  • 243
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 ...
anant's user avatar
  • 13
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....
Alice's user avatar
  • 131
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,...
TdBm's user avatar
  • 423
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. ...
TdBm's user avatar
  • 423
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 ...
TdBm's user avatar
  • 423
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 ...
user798275's user avatar