Skip to main content

Questions tagged [unbalanced-classes]

Data organized into discrete categories or *classes* may present problems for certain analyses if the number of observations ($n$) belonging to each class is not constant across classes. Classes with unequal $n$ are *unbalanced*.

Filter by
Sorted by
Tagged with
4 votes
1 answer
223 views

Comparing coefficients and confidence intervals when some categories have very few observations (logistic regression)

I'm fitting a logistic regression model (with multiple predictors) to data where the outcome is a success or failure. My data points are in the range of 100,000. Most of my variables are categorical, ...
Myungjin Hyun's user avatar
0 votes
0 answers
11 views

Classification model for categorical data, highly imbalanced

I am trying to create a classification model for birth defect data. The goal is to determine which of the paternal variables are most associated with the top 5 birth defects. The target variable '...
Farmurey's user avatar
0 votes
0 answers
10 views

Imbalanced dataset with multiple classes [duplicate]

I have an imbalanced dataset with multiple classes where some have less than 100 some are more than 10k,where i want to apply random forest(the dataset is confidential so i cant share),i used all ...
Deepak kumar's user avatar
2 votes
3 answers
49 views

Is relying on just the confusion matrix for highly imbalanced test sets to evaluate model performance a bad idea?

I have a binary classification model with a test set that is highly skewed, the majority class 0 is 22 times greater than the minority class 1. This causes my Precision to be low and Recall to be high,...
statsnoob's user avatar
-1 votes
0 answers
24 views

Binary classifier for highly imbalanced security data achieves high ROC AUC and Recall, but poor Precision, F1 and PR AUC

I'm working on a binary classifier to predict suspicious activity from security logs which is highly imbalanced, the minority to majority class ratio is 1:50. Several techniques to deal with the class ...
statsnoob's user avatar
0 votes
0 answers
10 views

How do I initialize a bias for the final layer of a CNN if my final output is logits and not probabilities?

I'm working on a medical image binary segmentation problem using a U-Net in tensorflow, and my classes are extremely unbalanced (about 1 in 10,000). I want to initialize a good bias for the last layer ...
Thao Nguyen's user avatar
1 vote
0 answers
22 views

Balancing when combining multiple datasets (balancing in a metastudy?)

There have been some detailed discussion of balancing the datasets in this community: Are unbalanced datasets problematic, and (how) does oversampling (purport to) help? Why is accuracy not the best ...
Roger V.'s user avatar
  • 4,286
6 votes
2 answers
218 views

Impact of class weights on logistic regression - excessively low p-values and narrow confidence intervals

I am currently working on a logistic regression problem with an imbalanced dataset. The total number of rows in my input is 51220 (class_0=49,654, class_1=1,566). I use 3 predictors (1 continuous and ...
Panos's user avatar
  • 63
0 votes
0 answers
19 views

Dataset for impact prediction in a container

I have a sensor that captures when there was an impact in a container. With this i have a dataset that contains data of when the device communicated and there was no impact and when the device ...
Wwwardrunaa's user avatar
0 votes
0 answers
126 views

Solutions to downsampling imbalanced time series dataset in time series forecasting for regression model

I have an imbalanced time series dataset for use in a time series forecasting problem for regression (forecast 1 video of 24 hour data (144 7x7 images) given a 1 video of 24 hour data (144 7x7 images))...
Marco's user avatar
  • 51
0 votes
1 answer
56 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 ...
easymoneysniper's user avatar
0 votes
0 answers
24 views

Fluctuating Validation Loss & Accuracy during Transfer Learning (ResNet50) - FER+ Dataset

I'm trying to build a CNN model for image classification, more specifically emotion classification using the FER+ dataset which is proving difficult to work with. I've tried several variations of ...
RoliPoliOli's user avatar
0 votes
1 answer
44 views

How do you train-test split an imbalanced dataset?

I have an imbalanced dataset and I'm trying to predict a binary target. The minority class amounts to approximately 0.4% of all observations (60 million observations from which 250K belong to the ...
Arturo Sbr's user avatar
0 votes
0 answers
17 views

Sampling in case of imbalanced dataset [duplicate]

From a course of AI for Medical Diagnosis, it is explained that validation and test sets should be balanced, 50-50 cases of both cases 0 and 1, so that the performance of the model can be assessed. ...
Félix Francisco Enríquez Romer's user avatar
3 votes
3 answers
99 views

One class never gets predicted, regardless of the model

I'm working on a classification problem from a dataset containing three classes, with proportions {"0":0.43, "1":0.25, "2":0.30}. ...
Mordechai's user avatar
0 votes
3 answers
77 views

Generalization with imbalanced classes

I have a generic question about learning (binary classification) with imbalanced classes and generalization. One recipe for learning with imbalanced classes is to downsample the negatives to a ratio ...
Frank's user avatar
  • 1,686
0 votes
0 answers
45 views

SMOTE and Sequential Feature Selection Order

Good morning, I am doing the following procedure: Split a Train a Test Dataset ...
Andres Portocarrero's user avatar
1 vote
0 answers
25 views

A complex crossover study: addressing unbalance and time effects

I'm analyzing a crossover study, where subjects are measured at two time points during each treatment phase (Placebo or Treatment). Additionally, baseline measurements were taken before the experiment ...
Diego Pujoni's user avatar
0 votes
0 answers
19 views

Dealing with imbalanced datasets for a case-control study [duplicate]

I'm working with a dataset where the number of samples in my positive class is significantly lower than the negative class (e.g., 30 positive samples and 160 negative samples). I am planning to ...
Ed9012's user avatar
  • 371
2 votes
1 answer
24 views

Missing data for Cox regression and HR

I'm conducting a research in which patients went through a surgery, for some the surgery was successful (outcome = 1) and for some it wasn't (outcome = 0). The risk factors were calculated using a Cox ...
AREEEL's user avatar
  • 21
0 votes
0 answers
8 views

question on the model number for the validation test dataset

I'm doing the project related to the glioma research. It would be a good strategy to have the training, validation, and testing but it is not fit in the data number I got.((12 IDH mutant (180 MRI) and ...
curtis sohn's user avatar
1 vote
0 answers
41 views

Equivalent to Kappa or MCC that compares to baseline classifier?

Both Cohen's Kappa ($\kappa$) and Matthew's Correlation Coefficient (MCC) measure the improvement of a classifier compared to a random classifier. This means that, for a classifier with a confusion ...
cdalitz's user avatar
  • 5,212
4 votes
2 answers
132 views

Strange interaction term estimate in a logistic regression with a large class imbalance between exposure groups. How to interpret?

EDIT 2 In reply to one of the commenters, here is the 2x2x2 table. Y = 1 : Y = 0. X = 1 X = 0 M = 1 9 : 73 3 : 29 M = 0 34 : 245 1,214 : 21,204 EDIT 1 In my attempts to make things simpler when ...
awastus's user avatar
  • 61
0 votes
0 answers
39 views

Multiple goodness of fit tests for multinomial proportions of unbalanced classes

I am considering a case where I have a nominal variable with $L$ levels (let us say $L=2$ for simplicity) and a bunch of continuous features. I would like to test if the most centrally located point ...
HeyCool08's user avatar
0 votes
0 answers
22 views

Why do I always get Recall=0, Precision=0 in Class 1 only in Fold1 during 5-fold validation?

I implement a classifier in python based on Negative Selection (Artificial Immune Systems) that classifies a dataset of transactions as either fraud (Class 1) or non-fraud (Class 0). The dataset is ...
Mitsos 's user avatar
2 votes
1 answer
624 views

Imbalanced classes and possible ways to increase precision, recall and f1-score of the prediction model

I've just started my data science internship, and this is my first time in the field. I'm sure I'll face challenges in the future where I might need your help. It's also my first time asking a ...
Thimali Fernando's user avatar
1 vote
0 answers
25 views

Are there any downsides to using AUROC curves in low event rate samples?

I was just asked to familiarize myself with some methods looking at comparing AUROC for a few predictive scores to predict outcomes. Issue is that I have a dataset of about 200 with <5% with the ...
Mike K's user avatar
  • 11
0 votes
0 answers
20 views

Robust ANOVA t2way unequal sample sizes?

I have some parameters that I would like to analyze with a two-way ANOVA. The treatment groups have unequal sample sizes (n=9, n=36, n=36, n=36) and the data do not fulfill the requirement of normal ...
willi wulst's user avatar
1 vote
1 answer
32 views

CV score vastly different from Train-Test score

I'm working on a multi-class classification task. I'm currently trying to tune a LGB model but have encountered a behavior that I do not understand. First, my data is from 1996 to 2015 so I split my ...
jauyjad's user avatar
  • 11
0 votes
0 answers
35 views

Assign weights to examples in a highly imbalanced dataset

I have a highly imbalanced dataset and I'd like to train a simple ANN classifier on it. My model currently is a simple 2-layer feed-forward neural network with ReLU activation in between. After a few ...
Green绿色's user avatar
1 vote
1 answer
243 views

Unbalanced binary response variable causing poor model fit

I am trying to model what environmental data increases the probability of my response variable occurring. My data covers 30 years of daily observations. I have narrowed my predictor variables down ...
Greatwhite4's user avatar
4 votes
1 answer
93 views

Is it valid to compute survey weights using the distribution of a hypothetical/"imaginary" population?

I'm informally reviewing a study by a coworker, but as I'm not a specialist of survey weighting procedures, I need a second opinion about something I disagree with him. He collected a convenience ...
Daniela's user avatar
  • 57
0 votes
0 answers
47 views

XGBoost imbalanced class problem

I am currently working on a personal project for predicting financial equities movements into 3 classes. The three classes are 1.) above a certain percentage move within a certain timeframe, 2.) below ...
Victor Minin's user avatar
2 votes
1 answer
134 views

Poor balanced accuracy and minority recall but perfect calibration of probabilities? Imbalanced dataset

I have a dataset with a class imbalance in favour of the positive class (85% occurence) I'm getting a fantastically calibrated probabilities profile but balanced accuracy is 0.65 and minority recall ...
Kat's user avatar
  • 21
0 votes
0 answers
32 views

Unexpected distribution of scores after using class-weighted loss, when data is highly imbalanced (2%), low N and high p

I won't go into the way the data is built because I want to keep the discussion general. Relative to balancing, I couldn't find a lot of materials online about the results of cost-sensitive learning. ...
David Harar's user avatar
0 votes
0 answers
8 views

Object detection: better to train with imbalanced dataset or remove images to balance out [duplicate]

I am training an object detection model using the YOLOv5 architecture. I have the following classes and counts. ...
Peter's user avatar
  • 239
0 votes
1 answer
29 views

Can I transform my output variable in an imbalanced dataset?

I have a dataset that has an output variable that is quite right-skewed and imbalanced. I want to use a neural network as a regressor to predict the output variable. Visually, it looks like there may ...
Omnitragedy's user avatar
25 votes
6 answers
944 views

Area under the ROC curve when there is imbalance: is there a problem, and if not, why does this rumor exist?

THE BOUNTY As promised, a bounty of $250$ points has been issued. A bounty-worthy answer should address the apparent controversy in the answers here that ROC curve interpretation does not depend on ...
Dave's user avatar
  • 63.6k
0 votes
0 answers
14 views

Aggregating predictions on micro data

I am a machine-learning noob, so please bear with me. I am trying to predict the aggregate number of businesses that will exit (i.e. shut down permanently) in the next quarter (or year). However, my ...
Mishal Ahmed's user avatar
1 vote
1 answer
35 views

Churn prediction model

I've constructed a training dataset by creating monthly timestamps. However, a significant issue has arisen: there's a substantial data imbalance (240,000 rows for active clients versus only 500 for ...
Walid Ibnoucheikh's user avatar
4 votes
3 answers
604 views

Machine learning classification: best way to know if my variables are unable to distinguish between two classes

I am working with an imbalanced dataset containing 42 variables and around 136,000 observations, in order to perform a binary classification (96% of the observations belong to one class). I tried ...
donut's user avatar
  • 263
2 votes
1 answer
198 views

Best way of splitting panel data for machine learning

I am trying to train a machine learning model to predict the probability that a given credit card customer defaults within the six-month window after the observed date. In this context, default means ...
Jorge Luis's user avatar
0 votes
0 answers
8 views

How to test for significant differences among percent increases between two unbalanced samples from each of 10 treatments?

I am trying to figure out how best to analyse fruit weight data from an experiment involving samples of both open-pollinated and unpollinated fruit from each of 10 different pollination treatments. I ...
D.Hodgkiss's user avatar
0 votes
0 answers
24 views

Effective number of samples (ENS) and evaluation metric choice

I have a question regarding the appropriate evaluation metric for my problem. I'm working on a classification problem with highly imbalanced classes. I've decided to employ ENS (effective number of ...
Arya513's user avatar
1 vote
0 answers
27 views

Is there actually a right and wrong way to deal with major imbalance in logistic regression (or other models, really)? [duplicate]

I have seen a lot of different advice on how to deal with imbalance, and I get that it can be case-specific. But I learned in school that SMOTE oversampling or undersampling were basically the ways ...
Siri C's user avatar
  • 11
0 votes
1 answer
310 views

What is covariate imbalance?

Covariate imbalance refers to an unequal distribution of independent variables (covariates) among different groups in a dataset. Is the above definition correct? So, would the following be an example ...
Anne Maier's user avatar
0 votes
0 answers
48 views

Conformal prediction nonconformity measure

I want to implement offline inductive conformal prediction for a bianry classificstion task but I have an issue with finding an appropriate nonconformity measure. Shafer proposes the Nearest neighbor ...
Dom's user avatar
  • 1
0 votes
0 answers
7 views

Model selection for multi-factor and hierarchical image data

I've been trying to wrap my mind around the best way to test for differences within some data I have collected for a study I am finishing up. I have multiple questions that I just can't seem to find ...
jiversivers's user avatar
2 votes
0 answers
39 views

Continue train xgboost specifically on misclassified observations?

I'm considering integrating the Boosting technique into a basic XGBoost classification model, in which I'd focus on misclassified instances. Assuming I have already used ...
helloworld's user avatar
0 votes
1 answer
70 views

How to modify imbalanced sets to avoid data leakage or overfitting

I have a project for predicting credit card approvals (binary classification). I got stuck on feature selection, hyperparameter tuning and final testing stages, as I don't know how to properly modify ...
CraZyCoDer's user avatar

1
2 3 4 5
22