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
5
votes
1answer
148 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
2answers
27 views

Why does class_weight usually outperform SMOTE?

I'm trying to figure out what exactly class_weight from sklearn does. When working with imbalanced datasets, I'm always using ...
0
votes
2answers
13 views

Rough ideas of expected performance boost from over-sampling techniques?

I am trying to train a classifier for a multi class classification task. However, the dataset is very imbalanced. About half of the around 160 unique labels are such that there are only 10 or less ...
2
votes
1answer
282 views

How to weigh imbalanced softlabels?

The target is a probability between N classes, I don't want it to predict the class with the highest probability but the 'actual' probability per class. For example: ...
1
vote
1answer
53 views

Imbalanced data set with Sample weighting - How to interpret the performance metrics?

Consider a binary classification scenario whereby the True class (5%) is severely outbalanced to the False class (95%). My data set contains numeric data. I am using SKLearn and trying some different ...
1
vote
1answer
2k views

focal loss function help

I am working on a relation extraction and classification problem. The data is in the form of text files. The data is imbalanced. I want to use focal loss function to address class imbalance problem in ...
1
vote
1answer
45 views

Labels as features in anomaly detection

I have a dataset born to solve a classification problem. Due to the imbalances of the Y, i choose to move to an anomaly detection task. Should I use the Y i have inside the anomaly detection model as ...
0
votes
2answers
19 views

How to tell if downsampling helped model performance

Fitting a logistic classifier to imbalanced data. My target variable is 5% 1, 95% 0. As such, I think it's probably best to use the PR-AUC to evaluate the model rather than ROC-AUC. I get a PR-AUC of ...
1
vote
2answers
110 views

How to interpret PR and ROC Curve for an unbalanced test set

I have trained a neural network on a dataset, the test set is very unbalanced, ratio between positive examples and negatives is 1:25000. All positive examples are correctly predicted, instead ...
0
votes
1answer
35 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 ...
1
vote
0answers
44 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
0answers
13 views

How can I improve calibration curves?

I am training a binary xgboost classifer with an imbalance of : 85% = 0 class and 14 % = class 1. This was achieved after i took a random sample fromaround 11m to 1M. When i calibrate i get the ...
1
vote
2answers
354 views

Should augmentation also be performed on the validation set when the dataset is imbalanced?

I am training a CNN on images (2 classes) and I have an imbalanced dataset (1:7 ratio). I am trying to tackle this by performing offline image augmentation. Should I perform augmentation also on the ...
0
votes
1answer
51 views

Which metric should I use for classifying an imbalace data with fewer labels for the negative class?

From reading, I understand that when we have fewer positive class labels, it is better to use precision or recall as the evaluation metric. Which metric should I use when we have fewer negative ...
0
votes
1answer
37 views

Improving Performance of Machine Learning for A Small Imbalanced Dataset

I am a researcher in Machine Learning. In my project, I have been applying ML to a small imbalanced data consisting of 8 features and 297 instances with 44 positive instances and 253 negative ones. ...
1
vote
3answers
85 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: ...
0
votes
1answer
13 views

Explaining the logic behind the pipe_line method for cross-validation of imbalance datasets

Reading the following article: https://kiwidamien.github.io/how-to-do-cross-validation-when-upsampling-data.html There is an explanation of how to use ...
2
votes
1answer
867 views

Generate a balanced batch with ImageDataGenerator() and flow_from_directory()

Hi I am new to python and deep learning. I am doing a multiclass classification. My 3-classes dataset is imbalanced, the classes take about 50%, 40%, and 20%. I am trying to generate mini batches with ...
1
vote
0answers
14 views

Handling imbalanced Feature (X) not lavbel (Y) in machine learning

I am very new to this field and have done a decent amount of research on this, but every time, I stumble upon handling the imbalanced label by using f1 score, recall, precision as metrics, and using ...
2
votes
1answer
49 views

What's the best way to validate a rare event detection model during training?

When training a deep model for rare event detection (e.g. sound of an alarm in a home device audio stream), is it best to use a balanced validation set (50% alarm, 50% normal) to determine early ...
3
votes
1answer
61 views

Restrictions on my skewed validation data

I have a severely skewed data sets consisting of 20 something classes where the smallest class contains on the order of 1000 samples and the largest several millions. Regarding the validation data, ...
4
votes
1answer
155 views

Why SMOTE is not used in prize-winning Kaggle solutions?

Synthetic Minority Over-sampling Technique SMOTE, is a well known method to tackle imbalanced datasets. There are many papers with a lot of citations out-there claiming that it is used to boost ...
0
votes
1answer
70 views

Handling Imbalanced Datasets in Orange

I work in the medical domain, so class imbalance is the rule and not the exception. While I know Python has packages for class imbalance, I don't see an option in Orange for e.g. a SMOTE widget. I ...
3
votes
3answers
134 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
1answer
338 views

How F1 score is good with unbalanced dataset

I have read around on this site that it's recommended to use F1 score if the dataset is imbalanced and if you want to seek a balance between recall and precession. Could you please explain how F1 can ...
3
votes
1answer
146 views

Unbalanced data set - how to optimize hyperparams via grid search?

I would like to optimize the hyperparameters C and Gamma of an SVC by using grid search for an unbalanced data set. So far I have used class_weights='balanced' and selected the best hyperparameters ...
1
vote
0answers
10 views

Feature Scaling + Selection when target is imbalanced

If my target is imbalanced, when should I do target balancing in preparation for modeling? Before feature scaling and selection? After feature scaling and selection? If I am doing backward elimination,...
0
votes
0answers
36 views

Steps for balancing data using SMOTE

Right now I'm doing sentiment analysis (classification) with TF-IDF and SVM linear. My data is not balanced and I want to make data balance using SMOTE from ...
1
vote
2answers
762 views

Using keras with sklearn: apply class_weight with cross_val_score

I have a highly imbalanced dataset (± 5% positive instances), for which I am training binary classifiers. I am using nested 5-fold cross-validation with grid search for hyperparameter tuning. I want ...
1
vote
2answers
22 views

Handling missing data for the majority class

I'm working with an unbalanced (10:1) dataset for classification. I also have a bunch of missing data on certain columns. If I discard them all, I still have a 5:1 ratio, so I guess I can afford to ...
0
votes
1answer
55 views

Should I resample my dataset?

The dataset that I have is some text data consisting of path names. I am using TF-IDF vectorizer and decision trees. The classes in my dataset are severely imbalanced. There are a few big classes with ...
0
votes
1answer
47 views

Evaluation metric for imbalanced data

Hi I'm a CS graduate student I have a question for AI or data experts. I'm writing a paper My dataset is time-series sensor data and anomaly (positive class) ratio is between 5% and 6% you can see the ...
0
votes
0answers
51 views

Applying SMOTE on time series data

I have a dataset that consist of student grades and it's based on a time series. I used LSTM to predict the student future grade. Can I apply SMOTE on this dataset to ensure that the model will not be ...
16
votes
4answers
17k views

Train/Test Split after performing SMOTE

I am dealing with a highly unbalanced dataset so I used SMOTE to resample it. After SMOTE resampling, I split the resampled dataset into training/test sets using the training set to build a model and ...
2
votes
1answer
11 views

How do you train a semantic segmentation model to optimize for IoU rather than accuracy?

I am currently building a U-NET semantic segmentation model on Tensorflow Keras to classify pixels as belonging to or not belonging to a class. For this problem, I've isolated the masks for only one ...
1
vote
2answers
50 views

Determining threshold in an area with very few samples of positive label

I have a binary classification task where I want to either keep or discard samples. I have about a million samples, and about 1% should be kept. I want to discard as much as possible, but discarding ...
1
vote
1answer
313 views

setting class weights for imbalanced dataset, how using EarlyStopping?

I want to train a CNN with Early Stopping (Keras). The data set is imbalanced, so I have set class_weights to 'balanced' like follows: ...
0
votes
1answer
711 views

bad regression performance on imbalanced dataset

My current dataset has a shape of 5300 rows by 160 columns with a numeric target variable range=[641, 3001]. That’s no big dataset, but should in general be enough for decent regression quality. The ...
2
votes
1answer
32 views

Some questions about supervised learning, model evaluation and preprocessing [closed]

I've been trying to employ some basic techniques of supervised learning on a dataset that I have and I have several questions about the overall procedure (i.e. data preprocessing, model evaluation etc)...
1
vote
1answer
24 views

How to split unbalanced data for supervised learning?

Suppose I have data I want to use for supervised learning, but there is a pretty bad target/class/labels imbalance. Should I: Limit the size of the training set to make sure there is a flat target/...
1
vote
1answer
57 views

How to deal with imbalanced data with train and test data

I am working with the Loan problem whether Loan Status: Defaulter or Non-Defaulters.In this problem, my classes are unbalanced 90% of classes are Defaulter, and 10% of them Non-Defaulter. Then I tried ...
0
votes
1answer
2k views

Class weights for imbalanced data in multilabel problems

I am trying to train a CNN for a multiclass - multilabel classification task (20 classes, each sample can belong to 1+ labels) and the dataset is highly imbalanced. In single-label cases I would use ...
2
votes
2answers
2k views

Solving multi-class imbalance classification using smote and OSS

I am trying to solve a multi-class imbalance classification problem. For that, I am using SMOTE for oversampling and OSS for under-sampling. But I have a doubt as I am working on multi-class so I have ...
0
votes
1answer
60 views

Any pythonic way to auto determine imbalance class problem, specially in multiclass scenario?

A data is imbalanced if a target class proportions are unequal and typically, heavily biased. But, what is the exact measurement of this heavy bias? Before applying imbalance techniques (SMOTE, ADASYN,...
1
vote
1answer
163 views

Cross validation schema for imbalanced dataset

Based on a previous post, I understand the need to ensure that the validation folds during the CV process have the same imbalanced distribution as the original dataset when training a binary ...
0
votes
2answers
2k views

What does the classification report interpret? Class 1 indicates abnormal data

How to interpret the report and How is precision, recall values are calculated for individual class labels. What is the significance of macro avg ? Does this report signify a good predictions by the ...
0
votes
0answers
26 views

Imbalanced NLP text classification

I'm trying to solve a multi-class text classification task with 3 classes. I have an initial pretty balanced but small dataset. When I start to mine additional data I can't always find a lot of new ...
1
vote
0answers
11 views

What are some strategies to deal with label sparsity when training a protein function prediction model?

The protein function prediction task requires you to take a sequence of amino acids (think words in a sentence, but if there are only 20 words), and output the functions that protein can take. There ...
4
votes
2answers
384 views

Imbalanced Dataset: Train/test split before and after SMOTE

This question is similar but different from my previous one. I have a binary classification task related to customer churn for a bank. The dataset contains 10,000 instances and 11 features. The target ...
1
vote
1answer
52 views

Imbalanced classification task – Discrepancy between learning curves and test set evaluation

I have a binary classification task related to customer churn for a bank. The dataset contains 10,000 instances and 11 features. The target variable is imbalanced (80% remained as customers (0), 20% ...

1
2 3 4 5
10