Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [class-imbalance]

The tag has no usage guidance.

1
vote
2answers
31 views

Why class weight is outperforming oversampling?

I am applying both class_weight and oversampling (SMOTE) techniques on a multiclass classification problem and getting better results when using the class_weight technique. Could someone please ...
0
votes
0answers
14 views

Why does Logistic Regression perform better than Autoencoders when classifying imbalanced data?

The 'shuttle' data can be downloaded from the link here. It is imbalanced data and there are two classes in the target variable. The proportion of the two classes are seven percent. I used Logistic ...
0
votes
2answers
43 views

Dealing with the test set of imbalanced data

I am working on a problem dealing with unbalanced data that has a very specific request. I would like to know the following: When I have an imbalanced dataset and I do train test split, the test ...
0
votes
1answer
12 views

Forcing class imbalance to mirror the target data

I'm trying to do binary classification on some data, my source data has a class split of 40% A / 60% B while my target data has a split of 70% A / 30% B. Is it a worthwhile strategy to use SMOTE to ...
5
votes
1answer
103 views

Imbalanced classes (balance of train, validation, and test)

1) I am currently trying to set up a feedforward neural network with highly imbalanced classes (binary classification) in which the number of observations of class 1 is very low (and the class of ...
0
votes
0answers
27 views

Suggestion for model performance improvement for ML competition

I am working on highly imbalanced dataset and trying to increase accuracy(metric: roc_auc) of my model which is hovering around 82-83%. This is part of an internal ...
2
votes
0answers
32 views

How to explain a Calibration Plot for many models?

I have a heavy imbalanced dataset with a classification problem. I try to plot the Calibration Curve from the sklearn.calibration package. In specific, I try the ...
1
vote
0answers
9 views

UnderBagging Testing in Matlab

I used UnderBagging for an imbalanced dataset with 45700 observation with 20 fetures. 45000 observations are 1 and 700 are 0. I used UnderBagging for classifier C ( for example for Decision Tree). I ...
1
vote
1answer
37 views

Multi class Imbalanced datasets under-sampling imblearn

I have an imbalanced dataset. I am looking to under-sample. Even though, the oversampling process takes less time, the model training takes a lot of time. I have taken a look at imbalanced-learn ...
1
vote
0answers
76 views

Adjust class weights due to class imbalance and class importance Multi class classification XGBoost

With respect to this question and the answer given by @Esmailian, Would anyone be able to let me know if Class B has a higher importance or the positive class ( i.e. it needs to have a higher ...
6
votes
2answers
147 views

Why real-world output of my classifier has similar label ratio to training data?

I trained a neural network on balanced dataset, and it has good accuracy ~85%. But in real world positives appear in about 10% of the cases or less. When I test network on set with real world ...
2
votes
1answer
28 views

Dealing with biased binary classifier

My training data is weighed heavier on the '1' class, with about a 4:6 ratio. This outputs a classifier that is of 82% accuracy with an emphasis on the '1' class, which makes sense. ...
2
votes
0answers
34 views

intercept correction in deep learning

Say I have an imbalanced data set, and I decided to over/undersample it during model training. I would then like to predict on new records but using the original, true imbalance in the classes as an ...
1
vote
0answers
28 views

Best approach for classification problem where examples most belong to one set

I'm working to build an opt-out filter for my company. I have a small amount of machine learning experience (I've done a few projects with tensorflow in the past), but wanted to get other opinions on ...
1
vote
2answers
72 views

How correctly assign weights to minority class or samples in ANN?

Having an imbalanced dataset. Abnormal class rate is %5. To handle with the problem I have gave extra weight to the abnormal class. However, It did not change anything. Here is my code: ...
3
votes
1answer
188 views

CNN - imbalanced classes, class weights vs data augmentation

I have a set of data with a few strongly imbalanced classes, eg the smallest class is about 54 times smaller than the largest. Therefore, data augmentation in order to equalize the size of classes ...
4
votes
3answers
159 views

Train classifier on balanced dataset and apply on imbalanced dataset?

I have a labelled training dataset DS1 with 1000 entries. The targets (True/False) are nearly balanced. With sklearn, I have tried several algorithms, of which the GradientBoostingClassifier works ...
1
vote
1answer
19 views

How do we go about imbalanced data for prediction problem? [duplicate]

As in classification we have imbalanced classes, we use up-sampling or down-sampling and other techniques, what do we do when we have imbalanced data in prediction problems, for example, I have ...
1
vote
1answer
151 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 ...
2
votes
3answers
130 views

imbalanced dataset in text classififaction

I have a data set collected from Facebook consists of 10 class, each class have 2500 posts, but when count number of unique words in each class, they has different count as shown in the figure Is ...
5
votes
1answer
257 views

Cross validation for highly imbalanced data with undersampling

In my problem, I am dealing with a highly imbalanced data set, say for every positive class there are 10000 negative one. A normal starting method to train a model is to undersample the data. In this ...
2
votes
3answers
1k views

Deep network not able to learn imbalanced data beyond the dominant class

I have data with 5 output classes. The training data has the following no of samples for these 5 classes: [706326, 32211, 2856, 3050, 901] I am using the following keras (tf.keras) code: <...
0
votes
3answers
35 views

Classifying on imbalanced dataset

I have incidents VS normal operation of my working environment. It is a skew dataset. My prediction accuracy is 95%. Question: 1. Is it common practice among data scientist to accept this prediction? ...
1
vote
0answers
15 views

SmoteBoost: Should SMOTE be ran individually for each iteration/tree in the boosting?

As per the paper on SmoteBoost, SMOTE is ran for each iteration of the boosting, generating N samples, which are further added to the original training data and the weight distribution of the ...
1
vote
1answer
44 views

Class imbalance in one hot encoding for CNN

I am building a 2D Convolutional Neural Network for MFCC features for audio classification. The issue I am facing is that there are 2 classes and huge imbalance between them. One class has 17687 ...
0
votes
4answers
494 views

In a binary classification, should the test dataset be balanced?

I have a dataset with 4519 samples labeled as "1", and 18921 samples labeled as "0" in a binary classification exercise. I am well aware that during the training phase of a classification algorithm (...
0
votes
1answer
75 views

Best way to deal with realistically imbalanced dataset for Regression problem

I have a dataset where each object has a label between 0-1. Objects with label = 1 are very common but those with label = 0 are very rare. I am interested in predicting the label in unseen data. NOTE:...
4
votes
1answer
140 views

issue with early-stopping on f1 score with imbalanced data

I have a highly imbalanced dataset with less than 0.5% of the minor class. Using Keras, I'm training DNN on the training set and evaluate performance on validation set. Loss function is ...
1
vote
0answers
8 views

Word frequencies in unbalanced case-control dataset

I have a case-control cohort for which I'm doing analysis of clinical notes. The ratio of cases to controls is 1:4. What I'm looking at is the relative frequency of certain words (e.g. overdose, ...
1
vote
0answers
48 views

How to weight loss in regression

I've got a regression problem where a model is required to predict a value in the range [0, 1]. I've tried to look at the distribution of the data and and it seems that there are more examples with ...
0
votes
3answers
244 views

Downsampling and class ratios

My target variable is whether an application is accepted or not. It is a highly imbalanced target with 98.5% of applications accepted. I am unclear about the concept of downsampling. If I were to ...
1
vote
2answers
264 views

Which method should be considered to evaluate the imbalanced multi-class classification?

I am working on multiclass-imbalanced data. My dependent variable is highly skewed. ...
0
votes
1answer
240 views

Bidirectional GRU: validation loss stuck on plateau diverges from well performing training loss

tl;dr: What's the interpretation of the validation loss decreasing faster than training loss at first but then get stuck on a plateau earlier and stop decreasing? The accuracy behaviour is similar. ...
2
votes
2answers
128 views

Why does balancing the test dataset improve precision-recall curve?

I have a fairly imbalanced dataset for default-risk credit scoring (2:98). Both costs are fairly important i.e False negative means loss from default and false positive is a lost-revenue opportunity. ...
2
votes
0answers
508 views

How exactly does class_weight in Keras work?

I'm working on a multi-label problem in Keras, using binary-crossentropy loss function with a sigmoid activation. Lets say i have 4 classes, so a response might look like this: ...
0
votes
1answer
599 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 ...
0
votes
1answer
30 views

Handling imbalanced data by deleting over represented rows vs. adding under represented rows

I am currently working with a very imbalanced data set (frauded credit card data from kaggle, which has 492 rows of frauded cards and over 280,000 rows of non-frauded cards). As much as I know, there ...
1
vote
1answer
109 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 ...
3
votes
3answers
1k views

How to handle “unknown” category in machine learning classification problems?

Tutorial problems come in the form of binary or mult-class classification where data are all properly labelled. In real-life applications, there are incoming data that do not belong to any category ...
3
votes
0answers
37 views

Deep Learning: Does starting the training on a smaller subset of the data make sense?

I trained a deep neural network with a small subset of my data, which allowed me to go through many epochs in a short amount of time and allowed the model to perform reasonably, then I gave it the ...
4
votes
2answers
1k views

Macro- or micro-average for imbalanced class problems

The question of whether to use macro- or micro-averages when the data is imbalanced comes up all the time. Some googling shows that many bloggers tend to say that micro-average is the preferred way ...
0
votes
1answer
161 views

Poor Precision-Recall curve for binary classifier trained on balanced data, with imbalanced test data

I have an very imbalanced dataset (9:1), for which I have performed under-sampling and achieved a balanced training set (~130k samples total post balancing). I am performing classification using ...
1
vote
1answer
1k 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 ...
0
votes
1answer
45 views

How to deal with unbalanced class in biological datasets?

When dealing with unbalanced class, which is better, oversampling/undersampling of the classes or randomly selecting equal number of positive samples and negative samples from the training dataset ...
1
vote
1answer
266 views

Poor performance of SVM after training for rare events

I found out that Weighted SVM is a classification approach to handle class imbalance problem. My data set is highly imbalanced with rare event (minority class, labeled as 1) and the majority class (...
1
vote
0answers
119 views

Running two stage classification to predict relatively rare event?

I have a very imbalanced sample in which I am trying to predict probability of a rare event (Out of around 25,000 observations, this event is observed around 30 times) and am reluctant to try over/...
2
votes
1answer
56 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 ...
2
votes
3answers
143 views

Hyperparameter Optimization for a Machine Learning Algorithm

I have a question regarding Hyperparameter Optimization for a Machine Learning Algorithm. I try to fit a Support Vector Classifier and use Hyperparameter-Tuning (but it could be also another ...
9
votes
1answer
203 views

Categorization of approaches to deal with imbalanced classes

What is the best way to categorize the approaches which have been developed to deal with imbalance class problem? This article categorizes them into: Preprocessing: includes oversampling, ...
2
votes
1answer
41 views

Changing multiple models into 1 model

I am working for a recruitment company on developing machine learning algorithms to automatically classify job applicants as either to be interviewed or not be interveiwed. The data is highly ...