Questions tagged [class-imbalance]

Questions referring to classifiers or classifying problems where some of the classes in the data are under-represented.

Filter by
Sorted by
Tagged with
2
votes
1answer
110 views

Oversampling possible improvement

I am currently solving a classification problem for an imbalanced data set (approximately 17% of the minority class). I split the data using a stratified k-fold split from sklearn (Stratified shuffle ...
1
vote
2answers
196 views

Training model on a Balanced vs Imbalanced dataset?

Let's say that I have a 2-class classification problem where classes A & B have 10*N and ...
0
votes
0answers
81 views

Why does a class weight fraction improve precision compared to under-sampling approach where precision drops?

I have an imbalanced data where the ratio between positive to negative samples is 1:3 (positive samples are 3 times higher than negative). For my case it is is important to have a higher precision (...
3
votes
2answers
89 views

What is the definition of imbalanced data set

I have thousands of data sources generating data from similar type of hardware. The different sources create different dynamics in the datasets though! Even though the features are the same the data ...
1
vote
1answer
45 views

Sequence to carry out data analysis?

I have a dataset with 4700 records and it's a classification problem. Proportion of classes is 33 and 67% few questions 1) does this proportion qualify dataset as imbalanced ? 2) should I do ...
1
vote
1answer
270 views

What are the standard parameters values for SMOTE technique?

I'm working on an imbalanced class data set (200 samples) with 2 classes, first class has 50 sample and second has 150 sample. My questions: When I use SMOTE technique on my data set my total ...
2
votes
1answer
114 views

On which step should use SMOTE technique for over sampling?

I want to use SMOTE technique for over sampling but I don't know on which step on pre-processing I should use it. My preprocessing steps are: Missing values Removing Outliers Smoothing Data Should ...
1
vote
0answers
141 views

How to deal with time-series imbalance classification data?

I want to predict the user to buy or not a product in next month in the e-comercial site. I mainly using the past 1-year data to predict it. But I found the training data is imbalanced, and the buy(1)...
0
votes
1answer
54 views

How much is the Class Imbalance Problem rates?

I'm working on a data set and wanted to know is there a standard rate about Class Imbalance problem or not? I have 47 samples in Class A and 150 Sample in class B , should I use Class Imbalance ...
3
votes
2answers
146 views

Does Sampling size matters in Multi classification Model

I am working on a multi class classification model where few of the class are with less data compare to other classes. I used random sampling technique to create a sample from the population keeping ...
0
votes
4answers
409 views

What do you call the ratio of positive to negative samples?

I am working with a binary classifier and I want to express the "balance" or "skewness" of the training data using a metric. I want to reflect this ratio in a report, like this: ...
1
vote
1answer
29 views

On assiging weights for unbalanced classes

Consider a dataset that will be split into train and test. The model will be learned using the train set and evaluated using the unseen test set. Now the dataset is unbalanced -- it contains more ...
1
vote
1answer
139 views

What are advantages of oversampling over changing threshold for unbalanced classes?

Let's say that I have unbalanced data set that has two classes, and I am using Random Forest to make my predictions. Random forest will be biased towards the majority class, which will cause low ...
1
vote
1answer
335 views

Adjust predicted probability after smote

i have an imbalance data set and I used smote to oversample the minority class and undersample the majority class. now, I want to check the test AUC using predict_proba of the model. I have two ...
0
votes
1answer
191 views

Variation in output of Logistic Regression when using SMOTE

I am working on a logistic regression case with an imbalance in the target variable. To fix this I am using SMOTE (Synthetic Minority Oversampling Technique), but each time I run my regression model, ...
2
votes
0answers
813 views

Data Augmentation techniques for classification of imbalanced time series datasets

Now I have a task to classify the imbalanced time series datasets using ML classifiers, such as Logistic Regression, Decision Tree, SVM, and KNN. I am not allowed to use the Deep Learning tools, such ...
1
vote
2answers
2k views

How do I run SMOTE on image data using the packages available?

I need to balance some image datasets, how do I use SMOTE variants or the imblearn SMOTE method with images? I can't figure out how to, since they seem to be working only with numerical datasets.
1
vote
1answer
47 views

Balancing data-sets for regression problems

Unbalanced data-sets are a well described problem for classification-problems. However, for regression similar problems can arise. An example is the data-set where target variable has a very ...
2
votes
2answers
50 views

model predicting probability close to 50 for positive classes in imbalanced training dataset

I have a binary classification model where I am predicting the positive class which is only 10% of whole training data set. The issue with this imbalanced data set is my model is predicting ...
0
votes
2answers
78 views

Imbalanced dataset - Undersampling & multiple classifiers [duplicate]

Let's suppose that my dataset in a classification problem looks like that: class A: 50000 observations class B: 2000 observations class C: 800 observations class D: 200 observations These are some ...
1
vote
2answers
2k views

Which scoring for GridSearchCV is best, when imbalanced multiclass dataset?

I have an unbalanced multiclass dataset (GTSRB) and want to optimize the hyperparameters of an SVM through GridSearchCV. I know that accuracy is not suitable for scoring in this case. Which evaluation ...
1
vote
2answers
2k views

Class Imbalance and Cost-Sensitive Learning XGBoost

I'm fairly new to data science and machine learning and have been trying to read a bit more on methods like boosting for one of the projects I am working on. The investigator on this project is ...
0
votes
4answers
4k views

How to find whether a dataset is blanced or imbalanced?

I have few dataset to experiment classification(Multi-class). These datasets are about 400GB. I wanted to know whether the dataset is balanced or imbalanced. How to know that dataset is balance or ...
2
votes
3answers
5k views

How to Split And Resample Imbalanced Dataset Into Train, Validation and Test

I want to understand how to split the imbalanced data set with a binary target variable where 87% of the samples are negative and 13% of the samples are positive. Now, I know that you should always ...
2
votes
2answers
1k views

class_weight on sklearn's DecisionTreeClassifier

Can class_weight='balanced' on scikit-learn's DecisionTreeClassifier be interpreted as having identical duplicate data points for the minority classes? I know that doesn't work that way, class_weight ...
1
vote
1answer
31 views

How to control the amount of positives in classification?

I have a basic, yet quite complex problem to solve right now. Let's say we have a training set of 20,000 samples in my training set, out of which 3 to 4% is flagged as "True", the rest is flagged as "...
2
votes
3answers
407 views

Highly Imbalanced dataset fro classes more than 200

I have a text dataset where I need to train a classifier to classify the titles into categories. The dataset shape is more than 575000. There are 256 target classes here. The problem is the dataset is ...
4
votes
3answers
915 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
1answer
3k views

SMOTE vs SMOTE-NC for binary classifier with categorical and numeric data

I am using Xgboost for classification. My y is 0 or 1 (true or false). I have categorical and numeric features, so theoretically, I need to use SMOTE-NC instead of ...
3
votes
2answers
49 views

Predicting positive/negative experience with very few labels and labels from only one class

I have video viewing data (length of session, nb of videos, etc), as well as if the user clicked on the like button. We can use the like button as a confirmation that the user had a positive viewing ...
0
votes
1answer
70 views

Why does downsampling leads classification to only predict one class?

I have a multi-class classification problem. It performs quite well but on the least represented classes it doesn't. Indeed, here is the distribution : And here are the classification results of my ...
1
vote
0answers
368 views

Ensure class balanced batches while hyperparameter tuning keras models with grid search

Ensuring class balanced batches while training keras models is possible using fit_generator method. I used imblearn.keras.BalancedBatchGenerator for that and it works fine! But i wanted to do that ...
7
votes
3answers
10k views

Weighted Binary Cross Entropy Loss -- Keras Implementation

I have a binary segmentation problem with highly imbalanced data such that there are almost 60 class zero samples for every class one sample. To address this issue, I coded a simple weighted binary ...
0
votes
1answer
54 views

Evaluate imbalanced classification model on balanced testing sample

Why it would be too optimistic to compute presicion, recall and f1-score to evaluate a model trained for imbalanced classification on a balanced testing sample ?
5
votes
2answers
2k views

Is There a Way to Re-Calibrate Predicted Probabilities After Using Class Weights?

I have classification data with far more negative instances than positive instances. I have used class weights in my models and have achieved the discrimination I want but the predicted probabilities ...
3
votes
2answers
116 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 ...
4
votes
1answer
282 views

Combining 'class_weight' with SMOTE

This might sound a weird question, but I could not find enough details in sklearn documentation about 'class_weight'. Can we first oversample the dataset using SMOTE and then call the classifier with ...
2
votes
1answer
193 views

How to evaluate model with imbalanced data binary classification?

I have a binary classification problem. I am using Area under precision recall curve as the evaluation metric. The dimensions of my data are (211, 1361). The data is imbalanced so I have used various ...
3
votes
0answers
646 views

Target mean encoding worse than ordinal encoding with GBDT ( XGBoost, CatBoost )

I have a dataset of 23k rows of an unbalanced dataset 85/15 ratio, 10 variables ( 9 of which are categorical ) , i'm using CatBoost and XGBoost for a binary classification. I applied cv (5 iteration ...
0
votes
1answer
413 views

Choice of f1 score for highly imbalanced dataset?

I am confused whether to use f1 score with 'micro' average or 'macro' average for better evaluation. Given my dataset is highly imbalanced(600:100000)
5
votes
1answer
2k views

Difference between sklearn make_pipeline and imblearn make_pipeline

Can anybody please explain the difference between sklearn.pipeline.make_pipline and imblearn.pipeline.make_pipline.
1
vote
1answer
137 views

What is the purpose of 'oversampling' when the test set is still unbalanced?

I understand that both training and testing sets should have the same distribution and also understand that we should not touch the test set (in terms of oversampling). But we know that oversampling ...
2
votes
1answer
1k views

Oversampling only balances the training set, what about the testing set?

In a case of imbalanced data classification, I know that we only oversample the training set (to prevent data leakage from training to testing subsets), but what if there are no positive data points ...
4
votes
2answers
2k views

Resampling for imbalaced datasets: should testing set also be resampled?

Apologies for what is probably a basic question but I have not been able to find a definitive answer either in the literature or in the Internet. When dealing with an imbalanced dataset one possible ...
6
votes
2answers
162 views

Can we specify the number of data generated(minority class) using SMOTE?

I am trying to improve classification of imbalanced dataset creditcard fraud using SMOTE imbalanced_learn. But, in this it generates the data to 50%, can we give a specific number for the data to be ...
1
vote
1answer
21 views

SMOTE for multi-instance learning i.e num_rows(x_train) > num_rows(y_train)

I have an imbalanced dataset and I wish to predict classes(0 or 1). Sample x_train: ...
1
vote
1answer
552 views

ROC AUC score is better if test data is imbalanced

I have an imbalanced dataset and I'm using XGBoost to do binary classification. I used down sampling together with target and one hot encoding for train data. For ...
0
votes
1answer
1k views

SMOTE-NC does not help to oversample my mixed continuous/categorical dataset

When I use SMOTE-NC to oversample three classes of a 4-class classification problem, the Prec, Recall, and F1 metrics for minority classes are still VERY low (~3%). I have 32 categorical and 30 ...
2
votes
1answer
1k 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: ...
3
votes
1answer
1k views

Poor performance of regression model for imbalanced data

I am trying to train a neural network model to solve a regression problem. The specificity of my dataset is that it has something like an exponential distribution of target values (imbalanced). ...

1
3 4
5
6 7
10