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
0answers
14 views

Evaluating a model with different target class distributions between training and testing data

I'm having a bit of an argument about when class imbalances matter when training a classifier, so I was hoping to get some help on understanding a specific concept. Say I have a problem where I want ...
0
votes
0answers
24 views

XGBoost failing on highly imbalanced data!

I am working on a classification problem, where I am trying to predict a fraud login. The data is highly imbalanced i.e. 0 = non fraud logins , 1 = fraud logins 0 : 4538076 1 : 365 I have been trying ...
0
votes
0answers
12 views

How to optimize AUPRC for imbalanced data given a precision or recall bias?

My general understanding is that when optimizing a model in an imbalanced class case with a small preferred target class one should optimize first for a model with the best AUPRC (assuming one doesn't ...
0
votes
0answers
25 views

Train/ Test split on small dataset along with SMOTE

I have a binary classification imbalanced dataset with 1000 samples ( 15% of class 1, 85% of the rest). My main goal is to build a robust classifier using the following approach. Wanted to know if ...
2
votes
0answers
20 views

Imbalance classes in Named Entity Recognition

I am currently working on a NER problem which attempts to extract 2 entities - place-of-interest(POI) and street from an address string in the Indonesian language. I used IndoBert (available here) and ...
1
vote
1answer
28 views

Training is not stable with extreme class imbalance

I'm dealing with a multi-class classification problem with around 30 categories. This problem has a severe class imbalance: Around 300 examples for the least common class. Around 100k examples for ...
0
votes
0answers
13 views

Using class weight in decision trees with Information Gain

How are weights considered in a decision tree when we want to maximize Information Gain? In other words, what would the entropy calculation become when weights are involved? I can guess either $$ e_1 =...
0
votes
1answer
25 views

Data simulation using make_classification in Python

I have a question about data simulation in Python. I deal with the classification of imbalanced data and want to test the effectiveness of different methods on simulated data. I have seen in various ...
0
votes
0answers
11 views

Computing class_weights using native tf.Dataset

There are already some answers on DSE about computing class-weights here but they require you to already know the number of samples in each class and assume it is ...
0
votes
1answer
23 views

class weights formula for imbalanced dataset

I am trying to make some semantic segmentation. I have 7 imbalanced classes in my case. I found several methods for handling Class Imbalance in a dataset is to perform Undersampling for the Majority ...
2
votes
2answers
30 views

Doesn't over(/under)sampling an imbalanced dataset cause issues?

I'm reading a lot about how to use different metrics specifically for imbalanced datasets (e.g. two classes present, but 80% of the data is one class) and how to tackle the issue of imbalanced ...
0
votes
0answers
6 views

Imbalanced data identification with Shannon entropy

I was studying about the imbalanced data. Then I had a question , how would someone know that which data is imbalanced or not by looking at its percentage(20,30 or 40). Then I read an answer on stack ...
0
votes
1answer
22 views

CNN unbalanced and small dataset

I would like to use CNN to make classification with 5 classes, but 4 of these classes only have between 16 and 60 images, while the last one has more than 1300. I know 16 or 60 images are not enough, ...
0
votes
0answers
15 views

scikit-learn sample weight interpretation

I'm trying to use scikit-learn to plot a confusion matrix from raw data I have obtained (contains just predictions and ground truths). The data contains a total of 4 classes: ...
0
votes
1answer
49 views

Logistic regression with unbalanced data, scoring based only on rare class

I have a dataset off app. 600.000 data points in which 0.2% (1.200 samples) is labelled as signifying a rare event. I want to use logistic regression to help me predict this rare event, but even when ...
1
vote
1answer
39 views

Specifying class or sample weights in Keras for one-hot encoded labels in a TF Dataset

I am trying to train an image classifier on an unbalanced training set. In order to cope with the class imbalance, I want either to weight the classes or the individual samples. Weighting the classes ...
0
votes
0answers
25 views

Can one still train a classifier with an unbalanced data set?

I want to train a binary Naive Bayes classifier. The problem is, is that I have an unbalanced set at my disposal, where the ration between the two classes is roughly 2:1 (250 examples from the first ...
0
votes
1answer
15 views

Unbalanced training set from balanced data

I am looking to get an unbalanced training set with a given ratio of classA:classB from a dataset without regarding if it is balanced or not. The point is to analyze the influence of data imbalance on ...
0
votes
1answer
37 views

High Recall but too low Precision result in imbalanced data

I was training a model using XGBoost Classifier on heavy imbalanced data base with 232:1 of binary class. Because my training data contains 750k rows and 320 features (after doing many feature ...
0
votes
2answers
36 views

Do we have any method which handles the imbalanced classification with sample weighting instead of class weighting?

I am looking for methods that use sample weighting instead of class weighting for the imbalanced classification. I think sample weighting is more precise than weighting all the samples from one class ...
0
votes
0answers
12 views

Oversampling Using the Orange Data Sampler Widget

It was pointed out in the help section of the Data Sampler widget that it could be used for under or oversampling. I used the Attrition dataset where the class imbalance is 1233/237. I separated the ...
0
votes
0answers
9 views

LightGBM model improvement when the focus is on probability prediction

I am building a binary classifier using LightGBM. The goal is not to predict the outcome as such, but rather to predict the probability of the target even. To be more specific, it's more about ranking ...
0
votes
0answers
12 views

How to train a deep neural network with time-series images and unbalanced dataset?

I have images that represent a fixed-length time-window of different serials. Serials have time-series of different size, so e.g. serial1 has length 30, serial2 length 110 and so on. I have multiple ...
1
vote
1answer
49 views

How to deal with class imbalance problem in natural language processing?

I am doing a NLP binary classification task, using Bert + softmax layer on top of it. The network uses cross-entropy loss. When the ratio of positive class to negative class is 1:1 or 1:2, the model ...
0
votes
0answers
12 views

Handle unbalanced data by implementing Edited nearest neighbors, smote and Tomek links in r?

Imbalanced data is a big problem in classification problems. I have a binary classification problem with imbalanced data. I have researched and found that a possible method of dealing with this is ...
0
votes
0answers
18 views

How to tune the proportion of minority class after oversampling in imbalanced data with cross-validation? [duplicate]

I have an imbalanced data set and I want to balance them with SMOTENC with cross-validation. In order to determine the performance of the classifier on the original data, I will cross-validation as ...
2
votes
1answer
35 views

How do I combine predictions from classifiers for two different problem?

I am working on a classification problem for predicting whether the shipment is going to be late or not. I would say the classifier is mediocre at predicting the positive class at the moment. But the ...
0
votes
0answers
72 views

What ML techniques work on imbalanced datasets

I have some specific questions for which I could not find answers in textbooks/research articles. Shall be grateful for an answer. These are: Are there ML techniques that can be directly applied on ...
0
votes
1answer
49 views

How does class_weight work in Decision Tree?

I am interested in Cost-Sensitive learning. And I am trying to understand how class_weight in DecisionTree works in terms of math. I read a lot of articles that ...
0
votes
0answers
17 views

How to create training dataset based on sampled or original data?

I am trying to used SMOTE and Feature Selection by following this paper http://jad.shahroodut.ac.ir/article_825_679b8f128dec2874a8fbc314fc922127.pdf In this paper, the authors have mentioned about 4 ...
1
vote
1answer
52 views

Why does an imbalanced data set badly effect distance measures like Mahalanobis?

I'm relatively new to data science and I am struggling to understand why the Mahalanobis distance (or any other distance measure) applied to an imbalanced data-set becomes inaccurate. I have a data ...
0
votes
1answer
24 views

Resampling : My dataset is categorical or numerical?

I have a dataset with 203 variables. Like age>40 (0 -yes, 1-no), gender(0 or 1), used or not 200 types of drugs (one hot encoded into 200 variables), and one target variable (0 or 1). This is an ...
1
vote
1answer
28 views

Adjusting imbalance in classification problem reduce precision, accuracy but increase recall

I've learned that adjusting imbalanced data when training a CNN affects model performance which got me thinking "what about in ML?" so I've done some testing on my own, you can check it out ...
1
vote
1answer
30 views

How much imbalance in a training set is a problem?

In a simple binary classification problem, at what point does majority class to minority class become significant become significant? Intuitively, I would expect a 3:1 ratio to not be an issue, maybe ...
1
vote
0answers
22 views

cost sensitive loss function in lightbm with individual cost

i am looking for a cost sensitive function that will have weights according to individual row feature (like amount) this way i can penalize more FN which has large amount vs. low dollar amount. took ...
1
vote
2answers
50 views

Label distribution over training, validation and test

I am wondering over whether the number of classes distributed over my training, validation, and test label affects the model.
0
votes
0answers
39 views

Does resampling imbalanced data decrease the precision of a model?

I have a model with an imbalanced dataset, lets say 5% of the rows are from the positive class. If I resample my data using something like SMOTE, or removing rows from the larger class (downsampling), ...
2
votes
1answer
65 views

Deep learning with Imbalanced classes [duplicate]

I am trying to model a packet data with 1 dimensional CNN but I have a very imbalanced classes in my target. I have 3 classes as class 0 has 53000 cases, class 1 has 300 cases and class 2 has 150 ...
0
votes
1answer
22 views

Looking for binary class datasets with high class imbalance, that also have intra-class imbalance in the minority class

Newbie question alert... For a college project I want to compare a few variants of SMOTE in terms of how much they improve classification of the minority class, over using random oversampling. I have ...
0
votes
1answer
30 views

Hypertune xgboost to dealing with imbalanced dataset

My training data has extremely class imbalanced {0:872525,1:3335} with 100 features. I use xgboost to build classification model with bayessian optimisation to hypertune the model in range ...
5
votes
3answers
177 views

Metric for label imbalance

I'm looking for a metric that can be used to quantify how imbalanced the labels are in a dataset. I'm not looking for a strategy to solve the imbalance problem, I just want to present how imbalanced ...
0
votes
1answer
44 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,...
0
votes
1answer
42 views

Handling Imbalanced Datasets

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 ...
0
votes
1answer
22 views

Class imbalance and statistics

I have a dataset with 5000 observations with class 0 and 300 observations with class 1. I would like to run some statistical analysis, for example on the average length of strings, the number of words,...
0
votes
0answers
20 views

Cost Function Binary Classification

I have imbalance dataset for binary classification problem. I want to create a custom cost function that takes into account not only the actual class and probability, but another variable "...
2
votes
2answers
87 views

Undersampling for credit card fraud detection before or after Train/Test Split

I have a credit card dataset with 98% transactions are Non-Fraud and 2% are fraud. I have been trying to undersample the majotrity class before train and test split and get very good recall and ...
3
votes
1answer
189 views

Features selection in imbalanced dataset

I have some doubts regarding an analysis. I have a dataset with class imbalance. I am trying to investigate some information from that data, e.g., how many urls contain http or https protocols. My ...
1
vote
1answer
98 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 ...
1
vote
1answer
20 views

Which metric to use for evaluating a rating system

I have a system which gives a star rating of the quality of work(on scale of 1-5, 1 being extremely poor and 5 being exceptionally good). An expert labelled a test set with their ratings of quality of ...
4
votes
1answer
101 views

Why removing rows with NA values from the majority class improves model performance

I have an imbalanced dataset like so: df['y'].value_counts(normalize=True) * 100 ...

1
2 3 4 5
9