Questions tagged [class-imbalance]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
15 views

Selecting threshold for F1 Score

When selecting a probability threshold to maximize the F1 score prior to deploying a model (based on the precision-recall curve), should the threshold be selected based on the training or holdout ...
2
votes
1answer
50 views

SMOTE oversampling for class imbalanced dataset introduces bias in final distribution

I have a problem statement where percentage of goods (denoted by 0) is 95%, and for bads (denoted by 1) it is 5% only. One way is to do under sampling of goods so that model understands the patterns ...
1
vote
1answer
10 views

Should the weights for CrossEntropyLoss be exactly the inverse of the propotions of training data?

I have a classifier network which chooses one of three classifications, and uses cross entropy loss as the loss function. If the proportions of training data are 100:10:5 for each classification, ...
0
votes
3answers
20 views

Problem of having imbalanced classes in the test set while using oversampling

I have an imbalanced dataset. My classes are 0 and 1. The number of 0 class instances is about 20 times more than the number 1 class instances. I know that I should apply oversampling after train test ...
0
votes
0answers
24 views

Image Segmentation Class weight using tensorflow keras

I remember definitely being able to pass a list to class_weight with keras (binary image segmentation specifically). For example: ...
2
votes
0answers
25 views

Using SMOTENC in a pipeline

I am trying to figure out the appropriate way to build a pipeline to train a model which includes using the SMOTENC algorithm: Given that the N-Nearest Neighbors algorithm and Euclidian distance are ...
0
votes
1answer
14 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 ...
1
vote
1answer
23 views

Appropriate Machine Learning algorithm for modeling clustered time-varying binary outcome

I'll just dive right in. I have a decent-size (100K observations) dataset of time-varying continuous and categorical predictors. Categorical predictors, actually, usually do not change, however, ...
0
votes
1answer
35 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
0answers
15 views

How do I build a model to improve CTR on campaign?

I am trying to build a propensity model for a client to increase the CTR. Client has the list of people who clicked in the previous campaigns but doesn't have the data on the list of people who didn't ...
2
votes
2answers
63 views

For imbalanced classification, should the validation dataset be balanced?

I am building a binary classification model for imbalanced data (e.g., 90% Pos class vs 10% Neg Class). I already balanced my training dataset to reflect a a 50/50 class split, while my holdout (...
0
votes
0answers
18 views

Orange ROC analysis widget

ROC analysis widget has an option to change prior target class probability. I'd like to know, when and how it should be used. Playing with it changes the slope of iso-performance line. Each classifier ...
2
votes
2answers
39 views

Data Imbalance in Regression Tasks [closed]

Having read a lot about class imbalance in classification tasks, I'd like to know what is the methodology for data imbalance in regression tasks. Particularly, - What is the procedure to check for ...
2
votes
0answers
27 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 ...
0
votes
0answers
12 views

How to calculate final AUC for sequential combinations of binary classification models in Python

I am working on developing a binary classification model using GradientBoostingClassifier on a highly imbalanced dataset (100:1) that I plan to implement in 2 steps. build a model (M1) that will try ...
0
votes
0answers
11 views

loss increases but accuracy and macroF1 are still stable and don't change dramatically

I have a classification task with 2 classes. The dataset is imbalanced. When I train the model, at some point, the loss of test dataset starts to increase but the values of accuracy and macro-f1 don't ...
0
votes
1answer
40 views

While downsampling training data should we also downsample the validation data or retain validation split as it is?

I am dealing with class imbalance problem. In this case, I am down sampling the majority class lables in the training set. Among training, validation and test splits, the majority class in training ...
0
votes
1answer
13 views

Low leves of probability observed after modelling.Is it right to scale the probability

I have done modelling on imbalanced class , without any sampling methods. Event rate is around 0.1 ,After modelling I am getting probalities more at the lower side close to zero.I have tried differnt ...
1
vote
1answer
23 views

Model assessment for EXTREMELY imbalanced dataset

I am dealing with an extremely imbalanced dataset, with about 10,000 negative samples for each positive sample. I am now trying to come up with an adequate measurement of model accuracy but none seem ...
0
votes
1answer
21 views

How to handle such a large class imbalance in text data?

I am working on a multi class text classifier. The total number of class that are there is 265 and total number of rows is 20,000. The class with largest number of occurrences has 6000 samples and ...
-1
votes
1answer
26 views

How to best handle imbalanced text classification with Keras?

I implemented a text classification model using Keras. Most of the datasets that I use are imbalanced. Therefore, I would like to use SMOTE to handle said imbalance. I tried both on plain text, and ...
2
votes
0answers
28 views

The most informative curve for imbalance datasets

For the imbalanced datasets: Can we say the Precision-Recall curve is more informative, thus accurate, than ROC curve? Can we rely on F1-score to evaluate the skillfulness of the resulted model in ...
2
votes
4answers
204 views

How to deal with class imbalance in a neural network?

Suppose we have a game and its action space contains two possible actions: A and B. We have a labelled dataset of state-action ...
1
vote
1answer
33 views

How to deal with imbalanced text data

I am working on a problem where I have to classify products into multiple classes (more than one) based on product descriptions. For instance: "Tresemme shampoo and conditioner - sulfate-free" = ...
1
vote
0answers
15 views

How to fix class imbalance in dialogue (text) time series data?

I have a dataset that looks like this: ...
0
votes
0answers
19 views

dealing with imbalanced data for multi-class problem

Based on the experiments I run for a number of times, and the reading I did on imbalanced data for a multiclassification problem such as this paper, resampling techniques like ...
1
vote
0answers
26 views

Identifying possible data leakage

I am building a binary classification model for imbalanced dataset using XGBoost. I tuned the hyperparameters for four different models based on 2 training datasets and 2 optimization metrics. Class ...
0
votes
0answers
22 views

Imbalanced text classification by oversampling: correction of class predicted probability by prior probability

My dataset has 3 class and 900 examples for training. Class distribution is 255, 185, and 460. I found that if I oversample (random) the training data then I have to correct/calibrate the predicted ...
0
votes
2answers
32 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 ...
3
votes
1answer
63 views

Why is oversampling outperforming class weight?

I have a dataset that is highly imbalanced. One class has 412 (class 0) samples while the other has 67215 (class 1) samples. For its classification, I am using MLP. When I use class weight of 165 for ...
0
votes
1answer
58 views

Preferred approaches for imbalanced data

I am building a binary classification model with imbalanced target variable (13% Class 1 vs 87% class 0). I am considering the following three options to handle the data imbalance Option1: Create a ...
0
votes
2answers
31 views

Right order for Data preparation in Machine Learning

For the below mentioned steps of data preparation Outlier detection/treatment Data imputation Data scaling/standardisation Class balancing There are two sub questions Should each of these steps ...
1
vote
0answers
12 views

g-mean for binary classification doesn't use sensitivity of each class?

scikit-learn's contrib package, imbalanced-learn, has a function, geometric_mean_score(), ...
0
votes
0answers
40 views

Imblanced-data: Need assistance with SMOTE technique for a CNN input

I am trying to apply the SMOTE sampling technique to over-sample the minority class of a multiclass (5-class) problem using the convolutional neural network. As far CNN requirement, the input shape ...
1
vote
1answer
49 views

How to apply dataset balancing techniques whilst using Pipeline in Sklearn?

I am new to Machine Learning and trying to construct machine learning models that adhere to good practice and not susceptible to biases. I have decided to use Sklearn's ...
-2
votes
1answer
2k views

'numpy.ndarray' object has no attribute 'plot' [closed]

I am trying to balance my data set and using imblearn library for this but After performing fit operation when i try to see the data count in dependent variable its showing me below error ...
0
votes
0answers
23 views

Computing Rare values After SMOGN - Imbalanced Regression

I am dealing with a regression problem where I have the phenomenon "Imbalanced Regression". In my problem, the most relevant events are scarcely represented. In order for me to evaluate my models' ...
0
votes
1answer
22 views

Binary classification problem with imbalanced dataset, how to compare to random classifier

We have a very imbalanced dataset (2% of class 1). To the best of our knowledge, there is no baseline in the literature to the problem we want to solve - so we thought of comparing our performance to ...
2
votes
1answer
32 views

Kohen Kappa Coefficient of Naive Bayes with 62% overall accuracy is better than Logistic Regression with 98% accuracy?

I have been trying to evaluate my models used on fire systems dataset with a huge imbalance in the dataset. Most models failed to predict any true positives correctly however naive Bayes managed to do ...
1
vote
1answer
83 views

XGBoost multiclassification interpreting predicted probabilities

Let's consider an example. I have patient level data, their symptoms, reading from various medical tests. Based on that, I have built a binary classifier given patient data to classify if they are ...
1
vote
0answers
159 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 ...
3
votes
1answer
36 views

I have 3 graphs of a binary Logistic Regression that I want to understand better what is happening and learn of a strategy to make the model better

My problem is the following: I have a binary Logistic Regression model with a very imbalanced dataset that outputs the percentage of the prediction. As can be seen in the images, as the threshold is ...
4
votes
1answer
226 views

AUC ROC metric on a Kaggle competition

I am trying to learn data modeling by working on a dataset from Kaggle competition. As the competition was closed 2 years back, I am asking my question here. The competition uses AUC-ROC as the ...
0
votes
1answer
25 views

SVM SVC: Metric for parameter optimization on imbalanced data

I trained a multiclass SVC with RBF kernel on a down-sampled (and therefore balanced) dataset. Now I want to perform grid search to find best cost and gamma. What performance metric should I optimize ...
0
votes
1answer
204 views

Macro F1 result higher than accuracy for imbalanced dataset

In one of the research papers on fake news detection, the authors collected a fake news binary dataset (fake vs. real news) consists of 16,817 real articles and <...
1
vote
1answer
18 views

is there any rule to apply pca to the imbalance data? [closed]

Is there any rule to apply PCA to imbalanced data? (randomforest, xgboost) I used multiclass imbalance data to pca but the log-loss accuracy getting decrease any theoritical background of this?
0
votes
1answer
80 views

Imbalanced dataset - Positive majority class

My dataset consists of 150 patients where 50 are controls/healthy (negative) and 100 are sick (positive). If I want my model to have high sensitivity at hight specificity, in other words to have low ...
0
votes
1answer
26 views

imbalanced target dataset(multi class)

I have a multi-class prediction problem but the 300classes is imbalanced should I make it balance all 300 class will predict the better result? is there an easier method to do this job? if I'm using ...
0
votes
0answers
33 views

why we use “class_weight='balanced” as a classifier parameter?

Please I have imbalanced data and at first, I used SMOTE to oversample it, and it gives a good result, then I see some code used sometimes class_weight='balanced" inside of the classifier ( RL, DT, ...
2
votes
1answer
20 views

Can sampling like SMOTE/UP/DOWN applied on Validation set?

I am trying to predict classification problem. For that I have used Ranger, Xgboost and naive bayes. My Response class is imbalance . 92:8 ratio. My positive Response is only 8% of whole data. ...