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
0 votes
0 answers
16 views

Multiclass Classification for Multiple Minority Classes

I've been working on a multiclass problem (5 classes) and having some challenges on Feature Selection and Class Imbalance. I have around 1,000 rows and 2,000 features (which I also generated ...
MAA's user avatar
  • 11
0 votes
0 answers
7 views

What are the drawbacks of utilizing sample weights in classification tasks?

In classification tasks, especially when dealing with unbalanced data, using sample weights can be beneficial. However, it's not always the default choice in ML libraries like AutoGluon ...
jsn's user avatar
  • 1
-1 votes
1 answer
25 views

How to deal with a heavily imbalanced test dataset?

Both my train data and test data were imbalanced. So I tried SMOTE for training. Before Smote: ...
GrGr11's user avatar
  • 1
1 vote
0 answers
19 views

How to solve imbalanced dataset oversampling problem in multi labels-classes instance segmentation task?

I want to use models YOLOv7-seg for instance segmentation of tree species in images. There are 26 species of trees, and each image may contain multiple species. There is a distinction between dominant ...
yuga555's user avatar
  • 11
0 votes
0 answers
4 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
1 vote
0 answers
38 views

Scaling imbalanced binary features

I am interested in a discussion in encoding and scaling categorical features, notably imbalanced categorical features. The context is neural networks (gbdts should handle this easily). It is known ...
Lucas Morin's user avatar
  • 2,123
1 vote
0 answers
45 views

Bad metrics results by strong class imbalance in Credit card classification

Hi i'm currently in the process of writing my bachelor's thesis and stuck at a some steps. I've developed a few ML-Model (XGBoost, (Balanced) Random Forest, ElasticNet,...) on an extreme imbalanced ...
user159373's user avatar
0 votes
0 answers
25 views

CNN segmentation models: class weights specification on IoU metric

I am building a MANet model using pytorch lightning. For getting the model I use the library segmentation models. As my objective is to do binary semantic segmentation, during the test phase I ...
Alessandro Pistola's user avatar
13 votes
2 answers
573 views

Why does data science see class imbalance as a problem for supervised learning when statistics does not?

Why does data science see class imbalance as a problem in supervised learning when statistics says it is not? Data science seems to seem class imbalance as problematic and needing special techniques ...
Dave's user avatar
  • 3,738
1 vote
1 answer
55 views

How to balance labeled datas and then carry out execution with a certain ratio?

I'm building a binary classification model using a neural network, with python and the libraries tensorflow and keras. For that I have an unequal amount of labeled data: Around 2'000'000 labeled with <...
user155518's user avatar
0 votes
0 answers
18 views

How should I design the CNN for classifying the relation between 2 texts (multiple classes)

So I have a task to classify the relation between 2 texts (4 classes possible) and one of the requirements is to preprocess them with TfidfVectorizer or CountVectorizer. Since every sample has 2 ...
giza2001s's user avatar
1 vote
1 answer
45 views

How does oversampling or undersampling approch is going to help during the testing on real time data?

We have a dataset with class A as 10% only and Class B as 90% . Let say we did undersampling or oversampling on training data and we made 50% of class A and 50% of class B. But in reality the data ...
XGB's user avatar
  • 15
0 votes
1 answer
94 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
  • 75
0 votes
0 answers
14 views

Why is my Histogram Gradient Boosting Classifier model still producing type II error? How can I reduce the type II error?

Type 2 error and how to hypertune or feature engineer a solution for it I trial and tested different techniques and kept the structure which made the most sense to me. But still my model confusion ...
bitebytebit's user avatar
0 votes
0 answers
24 views

What was used before data augmentation (e.g. SMOTE) to train ML models on imbalanced data? Please provide citations

I am seriously curious on how imbalance data was treated in machine learning and statistical learning before modern time data augmentation solutions such as SMOTE appeared. Please provide citations ...
Full Array's user avatar
0 votes
0 answers
12 views

Highly unbalnced text data giving very low matrics

I have an unbalanced multi-class banking text data with around 76 classes. Classes are badly distributed such as one class which is combination of 240 other different categories, represents 50% of ...
Remrem's user avatar
  • 1
0 votes
0 answers
25 views

What can I do when validation data and test data has different distribution in imbalance classification?

I am building classification model for bio (scRNA) data. Datasets in this field, for example, dataset A has 1, 2 classes, dataset B has 2, 3 classes kind of that. So I integrated datasets for training ...
containletters's user avatar
0 votes
0 answers
57 views

SMOTE-NC not working, Error: Pandas output does not support sparse data

I want to get my SMOTENC to work, but i've been failing successfully ...
user155410's user avatar
0 votes
0 answers
11 views

What is the prior mu in Heterogeneous Graph Transformer?

I am reading https://arxiv.org/pdf/2003.01332.pdf and do not understand what the prior (\mu) is supposed to be. I also found their implementation on github, but it is still not clear to me. For ...
Servus's user avatar
  • 101
0 votes
0 answers
24 views

Binary classification using xgboost

Why when adding new features in my ADS for a binary classification using XGBOOST my score and uplift has decreased ? What is the best way to treate categorical features or other features in order that ...
Warda_IDRIS's user avatar
0 votes
0 answers
16 views

Balancing imbalanced classes for TF2 object detection

I have a large set of images with 6 classes where the class distribution is imbalanced. Looked into balancing it by adding weight for each class but as I read in tensorflow docs the weight property is ...
Gautam's user avatar
  • 101
0 votes
1 answer
55 views

Is there a way to focus mainly on high precision when fitting a tree model?

I have a dataset with 95% false and 5% true labels, some 200000 samples overall, I'm fitting a LightGBM model. I mainly need to focus on high precision and have low number of false positives, I don't ...
Fireant's user avatar
0 votes
2 answers
158 views

How to improve accuracy on a single class out of 3 classes in model

I am training a classification model with 3 classes using a deep neural network. The classes have been resampled and balanced. I have around 600000 samples... equally distributed. The dataset is also ...
Fr_nkenstien's user avatar
0 votes
3 answers
88 views

Reduce false positives having imbalanced data

I'm using a DNN-48 having the following scenario: Features: 8 (48 at the end because I generate conditional sequences of 6 elements each) Classes: Y=0 (90%), Y=1 (10%) Precision and recall are good ...
Gabriel's user avatar
0 votes
2 answers
114 views

what is a random prediction for class imbalanced data? How can I check if my model is predicting randomly?

Say if you have a balanced dataset, with two classes, if the classification model that we’re training doesn’t learn anything ( suppose the data is random ), the model’s output would be 50% first class ...
ZEINab Sadeghian's user avatar
0 votes
0 answers
20 views

Is there a way to artificially manipulate a dataset in order to replace it for one that gives good results?

I'm trying to artificially create a dataset for pure educative reasons but I want it to be based in one particular dataset, the problem is that this original dataset don't make good predictions even ...
Stefanni Germanotta's user avatar
0 votes
0 answers
20 views

How would you treat imbalanced training data, and you don't know how test data distribution looks like in deep learning?

I posted this question on another place, but I want to get many tips, so I post here too. I am building deep learning classification model in bioinformatics. I made training dataset by merging 12 ...
containletters's user avatar
5 votes
2 answers
1k views

Determining whether a dataset is imbalanced or not

Is there a practical threshold to determine whether a dataset is imbalanced or not? i.e. we should packages like imbalanced-learn to do some kind of adjustment like ...
Yandle's user avatar
  • 221
0 votes
2 answers
170 views

Is there any rationale for performing SMOTE-ENN before train-test-split?

I have created a classification model for predicting data, and the problem is that the two classes are highly imbalanced I have a problem. I have created a classification model for predicting data, ...
Hello is me's user avatar
0 votes
0 answers
35 views

I have created a classification model for predicting data, and the problem is that the two classes are highly imbalanced [duplicate]

I have a problem. I have created a classification model for predicting data, and the problem is that the two classes are highly imbalanced. So, I dealt with it using the SMOTE+ENN technique. I applied ...
Hello is me's user avatar
0 votes
0 answers
32 views

Imbalanced classes

I am currently dealing with imbalanced classes in my case of binary classification, where one class represents only 4% of the other class. To address this issue, here is the approach I have taken: ...
d3dalo's user avatar
  • 1
0 votes
0 answers
38 views

Retraining gradient boosting classifier on its hits and misses

I have trained a gradient boosting model on historical data to predict whether person registers a business or not (binary classification problem). Right now the model is on the stage of online A/B-...
Fydorov Maxim's user avatar
2 votes
2 answers
841 views

Some simple questions about confusion matrix and metrics in general

I will first tell you about the context then ask my questions. The model detects hate speech and the training and testing datasets are imbalanced (NLP). My questions: Is this considered a good model? ...
Maxi's user avatar
  • 89
0 votes
0 answers
23 views

Model returns near perfect PR-AUC score but other metrics seem fine. Is my model overfitting?

I am currently working on a very imbalanced dataset: 24 million transactions (rows of data) 30,000 fraudulent transactions (0.1% of total transactions) The dataset is split via Year, into three sets ...
Hai Nguyen's user avatar
5 votes
1 answer
210 views

Are imbalanced data problems solvable? [closed]

I am working as a data scientist for the past 2 years where I have worked on problems related to binary classification, revenue prediction etc. In the past two years, I have had 2 problems that ...
The Great's user avatar
  • 2,565
5 votes
3 answers
213 views

Reproducible examples where balancing the training data demonstrably improves accuracy

I asked this question on the Statistics SE, but there were no answers, even when a modest bonus was available, so I am asking here to see if any examples can be given. I have been looking into the ...
Dikran Marsupial's user avatar
0 votes
2 answers
230 views

Interpretation of evaluation metrics for an imbalanced dataset

I am currently dealing with a classification problem for a massively imbalanced dataset. More specifically, it is a fraud detection dataset with around 290k rows of data, with distribution of 99.8% ...
Hai Nguyen's user avatar
0 votes
0 answers
62 views

Sampling strategies in multi-target classification

I am dealing with multi-target binary classifications (I have two targets). I need to use a sampling strategy. I have tried imblearn.pipeline but I'm getting the same error as this time when I'm ...
Hanna's user avatar
  • 101
1 vote
1 answer
594 views

I used SMOTE-ENN to balance my dataset and it improved the performance metrics, but how can I be sure it's not overfitting?

The models were evaluated using 10-fold cross validation. foldCount = StratifiedKFold(10, shuffle=True, random_state=1) The models in question are XGBoost. ...
Tariq's user avatar
  • 15
1 vote
2 answers
158 views

Class Imbalance in Dataset of Images

When dealing with an imbalanced dataset, I have been taught to oversample on only the train samples and not the entire dataset to avoid overfitting, however this was for structured text based data in ...
osmans's user avatar
  • 11
1 vote
1 answer
217 views

Stratifed time series split with the same imbalance ratio

I am recently working on an imbalanced binary classification problem where the data is time ordered. I would like to validate my model using training/validation splits that have the same imbalance ...
Moataz Chouchen's user avatar
1 vote
1 answer
23 views

Movement in cohorts

I am working on a user sales data which gets updated week over week. Based on the sales done in each week, the user is categorized in segment A, B or C. This means size of each segment could change ...
Sham's user avatar
  • 31
0 votes
1 answer
39 views

Question about collapsing variable and oversampling minority classes

i have imbalanced data consisting of nine classes, and i am planning to collapse them into two classes. i performed stratified (proportionate) sampling between test, validation, and training sets ...
RyRy the Fly Guy's user avatar
0 votes
1 answer
39 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
0 votes
1 answer
93 views

Fairness metrics in the test set when wrong distribution

I have a doubt that we have been discussing for weeks with my colleagues and I wanted your opinion. I have a model for diagnosis of a disease and I want to know if it is fair. I train the model with ...
Esmeralda Ruiz Pujadas's user avatar
0 votes
0 answers
63 views

How to handle imbalance in input variables?

Currently working on a finance dataset which has more than 20 input variables with high imbalance. [Apparently, the target variable is also imbalanced (for this I am currently considering to handle it ...
bh7781's user avatar
  • 1
3 votes
2 answers
306 views

Measure distance between teeth using Machine Learning

I'm a newbie in ML and I have a problem I am stuck on. I want to train a ML model to recognize dental diagnosis based on photos and x-rays of the patient. Specifically right now, I want to find a way ...
FrenchMajesty's user avatar
0 votes
0 answers
38 views

Binary Classification: My model classfies most data (95%+) as label 1

I am working with ECGs and trying to use a CNN model to perform binary classification. The goal is to classify 30s ECGs to detect a specific disease. I am using CNN and converting ECGs to images (...
makala's user avatar
  • 11
1 vote
2 answers
104 views

How to decide the most suitable technique to handle Class Imbalance

For handling an imbalanced dataset, we have a variety of techniques like adjusting class weights, oversampling, undersampling, SMOTE and its different variations (RCSMOTE, GSMOTE, DBSMOTE). My ...
tanmay's user avatar
  • 173
1 vote
1 answer
85 views

If I'm comparing performance between two different datasets should sample and class size be uniform?

If I'm comparing performance between classification models on two different datasets should the number of samples per class, the number of classes, and features per sample be the relatively the same ...
StrWrs_Nerd's user avatar

1
2 3 4 5
12