Questions tagged [class-imbalance]
Questions referring to classifiers or classifying problems where some of the classes in the data are under-represented.
547
questions
1
vote
1
answer
37
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 ...
0
votes
1
answer
56
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
0
answers
9
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 ...
0
votes
0
answers
21
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 ...
0
votes
0
answers
10
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 ...
0
votes
0
answers
20
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 ...
0
votes
0
answers
28
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
...
0
votes
0
answers
9
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 ...
0
votes
0
answers
22
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 ...
0
votes
0
answers
10
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 ...
0
votes
1
answer
39
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 ...
0
votes
2
answers
92
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 ...
0
votes
3
answers
73
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 ...
0
votes
2
answers
73
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 ...
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 ...
0
votes
0
answers
18
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 ...
5
votes
2
answers
724
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 ...
0
votes
2
answers
105
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, ...
0
votes
0
answers
33
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 ...
0
votes
0
answers
24
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:
...
0
votes
0
answers
35
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-...
2
votes
2
answers
541
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?
...
0
votes
0
answers
21
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 ...
4
votes
1
answer
147
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 ...
4
votes
3
answers
196
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 ...
0
votes
2
answers
170
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% ...
0
votes
0
answers
43
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 ...
1
vote
1
answer
390
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.
...
1
vote
2
answers
136
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 ...
0
votes
0
answers
19
views
Classification problem with a numerical variable that uses a special (high) value to indicate a qualitatively different status
I have a classification problem where I need to predict an outcome based on 20+ variables, some categorical, some numerical. One of the numerical variables is 'dlast' - which is the number of days ...
0
votes
1
answer
124
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 ...
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 ...
0
votes
1
answer
29
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 ...
0
votes
1
answer
33
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 ...
0
votes
0
answers
14
views
What are the reasons that can lead to increase Micro F1-score but decrease the Macro F1-score
I have an imbalaced multi-label classification dataset
I tried these 2 models
First I used Bernoulli Naive Bayes algorithm that nativelly supports multi-label classification I got Micro F1-score of 45%...
0
votes
1
answer
89
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 ...
0
votes
0
answers
29
views
Handling Unbalanced dataset
I have a Tabulur dataset which is binary classification problem, where the dataset having 110000 samples of class A and class B ...
0
votes
0
answers
54
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 ...
3
votes
2
answers
240
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 ...
0
votes
0
answers
37
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 (...
1
vote
2
answers
99
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 ...
1
vote
1
answer
58
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 ...
1
vote
1
answer
26
views
4/96 imbalanced but all metrics above .95
I'm working with some severely imbalanced dataset where my 1 class represents 4% of the data in a binary classification problem.
I have about 10M rows and developed a model that outputs +.95 in ...
1
vote
0
answers
185
views
Grouped stratified train-val-test split for a multilabel dataset
So this is indeed nontrivial. I was wondering if there is a fast heuristic algorithm for performing grouped stratified dataset split on a multilabel dataset.
Stratification is usually performed to ...
0
votes
1
answer
80
views
Need my xgboost model to be more liberal with classifications
I have an xgboost model that predicts the likelihood of a sales lead to close (actually to turn into an "opportunity" which is one step before the close but that's beside the point). The ...
0
votes
0
answers
49
views
Metric for binary imbalanced classification - Case of penalized classification (class_weight = 'balanced')
I have a binary classification task with substantial class imbalance (99% negative - 1% positive). My task is to maximise the TP rate, while keeping the FN as low as possible.
I have opted to use a ...
0
votes
1
answer
107
views
Difference between class_weight and loss_weights arguments in TensorFlow/Keras
I am creating a neural network using TensorFlow (v2.9.2) for an imbalanced image dataset. While doing so, I noticed that model.compile() method has an argument <...
0
votes
0
answers
46
views
Prior probability shift vs oversampling/undersampling imbalanced datasets
I'm trying to understand what prior probability shift (label drift) in data means.
If I understand it correctly then it means that distribution of labels in training dataset differs compared to ...
0
votes
1
answer
43
views
Determining the information loss due to undersampling
I have an image dataset that I need to segment into directories (train, validation and test) using ImageDataGenerator in TensorFlow/Keras. The dataset is highly imbalanced:
For this I have decided to ...
1
vote
1
answer
325
views
Do Sampling before or after TFIDF step?
This is a multiclass text classification problem. The dataset has a class imbalance and I'm planning to use a sampling technique before modeling.
Should the sampling be done before/after the ...