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
0
votes
0answers
8 views

Sample description for unbalanced panel

I'd like to start my descriptive analysis with a sample description (mean, median etc.). My data is arranged in a long format and is unbalanced. For example I want to report the mean of some time-...
0
votes
0answers
18 views

Is G-mean score appropriate for assessing imbalanced binary classification?

I read literature showing how metrics such Accuracy, ROC-AUC, F-1 score can be misleading for the evaluation of classifiers on imbalanced data. Is G-mean score suitable for this context?
0
votes
1answer
24 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
0answers
14 views

semi-supervised classification with a single label

I have a dataset of 1800 entries with about 40 features (some binary, some numerical). Of the 1800, 12 are known to be good for my goal; and the rest are unknown. Of the 1800 only 25-30 of the entries ...
0
votes
0answers
18 views

Cross-validation / Threshold moving when training is balanced but test is imbalanced?

I have a binary text classification problem where texts of class 0 account for ~95% of cases and class 1 for ~5%. I put some effort until having a decently sized, balanced manually labeled subset (7k) ...
0
votes
0answers
27 views

Is upsampling a tiny class before cross-validation valid?

I'm working with a dataset containing several classes. The largest class has over 500 samples, and the smallest classes have fewer than 10 samples. I know that you should perform upsampling inside the ...
1
vote
0answers
19 views

Using multiple probability cutoffs for a logistic regression model?

Have data with "valid" and "invalid" classes, lots of predictors, over 15. Only 5% of data set is valid (success class 1), 95% is invalid class 0. The number of invalids is skewing ...
0
votes
1answer
22 views

Preclinical research: can (should) the sham group be smaller than the treatment groups?

I am engaged in a preclinical (mouse) in vivo study. There are 5 experimental groups (sham, heart attack, heart attack plus intervention 1, heart attack plus intervention 1+A and heart attack plus ...
1
vote
1answer
46 views

Number of samples required to have visited all classes of a uniformly distributed distribution?

So let's say I have a set of binary vectors $x \in \{0,1\}^n$. Hence, $|\{x\}| = 2^n$ . For all $x$, there is a class $c_i$. We do not know what is this class a priori, but we can compute it once we ...
0
votes
0answers
14 views

Inter annotator agreement (or disagreement) for highly imbalance annotations?

I have a time-series dataset which is annotated by 4 individual annotators where I have following things in annotations. Its possible that one annotator has not annotated all samples (i.e. missing ...
0
votes
0answers
4 views

Getting worse results when I indicate the class_weights using compute_class_weight while using a BERT Model

When using the compute_class_weight from sklearn, I'm getting worst results than when I didn't specify any weights at all when training a BERT Model. The reason why ...
-1
votes
1answer
92 views

Optimization with unbalanced data from multiple experiments

My observations are leaf number of wheat which obtained from multiple experiments. The number of observations are depending on experiment which ranged from 1 to 10. In each experiment, leaf number is ...
0
votes
0answers
11 views

Can I test a model on class-imbalanced data if it was trained on class-balanced data?

Background: Previously, I ran my elastic net model on class-imbalanced data. I found out this is bad practice generally, so I downsampled the data to resolve the class imbalance. ...
0
votes
0answers
14 views

How to address severe class imbalance with lots of zeros in the columns? [duplicate]

My datasets has severe class imbalance with lots of zeros in the columns. Here is the total count of my samples. Total Samples: 12237697 Positive samples: 1061 (0.01% of total) I have tried weighted ...
0
votes
0answers
16 views

resampling of imbalanced dataset with only binary predictors and target

I am trying to classify an indicator of health as 0 and 1. I have an imbalanced dataset (0 : 5700, 1:1700) where all the values are binary (0 and 1 only for all features and target). I applied many ...
0
votes
1answer
27 views

Logistic regression balanced dataset

I am quite inexperienced using logistic regression and am having trouble understanding my data and how the regression behaves. Here's the outline of my problem: I have a (medical) test that gives a ...
0
votes
0answers
11 views

Can you do hyperparameter tuning using a PR curve? Moreover, would this still be considered a “PR curve”?

I am creating a graphical representation of PR results across various hyperparameter changes in an imbalanced dataset (model used was an SVM). I'm wondering if one would still consider this a "PR ...
0
votes
0answers
19 views

Performance loss after applying SMOTE

I'm working on a classification problem, and I've an unbalanced dataset, so I applied SMOTE algorithm in order to balance it. While I got an increased performance when working with classification ...
1
vote
1answer
16 views

Test size with small dataset with class imbalance

what would a good split train/test be, having a class imbalance problem in the dataset and a small number of observations (<5000 obs)? Would it make sense to consider k-fold cross validation (e.g. ...
0
votes
1answer
13 views

imbalanced classes: ROC_AUC vs Precision_Recall AUC

I am dealing with a highly imbalanced classes problem. Accuracy is of course not a good performance metric in such cases, So I want to calculate either ROC AUC sore ...
1
vote
0answers
13 views

How to deal with unbalanced categorical data in GLMM?

I'm trying to model species sighting data across protected areas in R. Naturally, the data are unbalanced - but it is severely skewed towards one protected area (as in, 200 sightings in 1 PA, 15 in ...
0
votes
2answers
38 views

Optimal Machine Learning Sample size

I am new in ML area and I want to build a model to score 100,000 people. I wonder if it is abnormal to build (train/test/validation) the model on a dataset of the same size 100,000? Need to mention ...
0
votes
1answer
46 views

What feature selection methods to implement for logistic regression in R?

I tried several ways of selecting predictors for a logistic regression in R. I used lasso logistic regression to get rid of irrelevant features, cutting their number from 60 to 24, then I used those ...
0
votes
1answer
23 views

XGBoost, Imbalanced Data and CalibratedClassifierCV

I am currently working with a slightly imbalanced dataset (9% positive outcome) and am using XGBoost to train a predictive model. ...
0
votes
0answers
11 views

Citations for Weighted Cross Entropy

I am doing binary classification on an extremely unbalanced data set where only 2% of the data points are positive. I have found online that 1) the default cross entropy loss assumes equal weights of ...
1
vote
1answer
51 views

XGBoost Calibration

I have an imbalanced dataset and am using XGBoost to create a predictive model. xgb = XGBClassifier(scale_pos_weight = 10, reg_alpha = 1) Although my recall ...
1
vote
1answer
13 views

Shall I present predictions on the (oversampled) training set as well?

I am dealing with an imbalanced classification problem and used oversampling on my training set to to predict on my testing set. My PI insists on presenting evaluation metrics of the different trained ...
1
vote
0answers
16 views

keras input data ratio setting

a newbie question not sure if it's a correct method since I've got an imbalanced dataset (binary class, class1 12000 class0 2000, class separated in different folder) I found that my model sometime ...
1
vote
3answers
70 views

Differential model. Random Forest

I was having discussion with some colleagues and I would like to know some external opinion. Description: We have to decide, for a given person, whether that person would choose item EXPENSIVE or ...
1
vote
1answer
15 views

How unbalanced is unbalanced for factorial ANOVA?

Colleagues and I conducted an experiment with participants randomly allocated to each condition using survey software. Unfortunately, the cell sizes ended up being more unbalanced than we anticipated: ...
0
votes
0answers
32 views

imbalanced dataset with lots of csv operation (tensorflow,keras)

A project with about 14000 csv files (about 12000 class 0 and 2000 for class 1 for each csv contain 365 columns and 3330 rows (value are either 0 or 1 ) 1.is there any sample code for this kind of ...
0
votes
0answers
10 views

Using GAN for image data augmentation (unbalanced dataset)

Lets say I have a image classification problem of 5 classes who are very similar to each other, the only difference is their length, and one class is under-represented. How can I use a GAN to create ...
2
votes
1answer
31 views

Modelling data with low observations of variable crosses

I apologies in advance as I am not sure on how best to formulate this problem in a generic manner, probably what is also stopping me finding anything of real value online. I have the scenario where my ...
1
vote
0answers
21 views

Imbalanced class issue

I am taking my first steps in machine learning and data science area. I know for sure that my next task will be related to the imbalanced class problem. I’ve walked through many articles covering this ...
0
votes
0answers
22 views

Two datasets have different imbalanced class. How to split?

I'm new in machine learning. Actually I have two datasets files as my scrapping results from different news webpages. I want to preprocess to just selecting relevant news. So I would like to perform ...
0
votes
0answers
17 views

For imbalanced datasets, is it necessary to use undersampling or upsampling if one evaluates the performance of ML classifier using PR curves?

Previously, I would have assumed evaluating the classification performance of Decision tree and SVM with a PR curve would obviate the need for under/over-sampling since it doesn't evaluate the true ...
0
votes
0answers
31 views

Is there a name for this: dealing with class imbalance by learning to rank?

I've seen the following approach used in link prediction settings, and I think it exists in many other areas as well. Say we have a very imbalanced binary classification dataset, with imbalance in the ...
1
vote
0answers
7 views

Which classification metric to use and why? [duplicate]

I have a random forest classification model that classifies into 3 different labels. The thing is my data is unbalanced label 1 dominates the data with frequency of 0.5 while label 2 is around 0.35 ...
1
vote
0answers
35 views

Overfitting very quickly when using SMOTE or ADASYN

I am currently working on a binary time-series classification problem using the keras deep learning library. The dataset that I am working with is heavily ...
0
votes
0answers
21 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 ...
1
vote
2answers
46 views

Is logrank test and its variations affected by the inequality of classes?

I am currently dealing with an home made exercise which compares the lifetime of patients who made use of a specific drug or not. For simplicity, I decided to remove censored data, but as replacement ...
0
votes
1answer
6 views

How to deal with that accuracy of minority class improves while majority class decreases when using imbalance learning?

I use boosting tree to make prediction for the stock direction, and it is a binary class classification. The majority class is the down direction, and the minority class is the up direction. The ...
1
vote
1answer
75 views

F1 weighted vs. Log loss in SciKit learn RandomSearchCV

I am sorry to ask another question regarding this topic but I am still puzzled about the following: When I use 'F1_weighted' as my scoring argument in a ...
0
votes
1answer
12 views

ML test accuracy higher than training? Small unbalanced samples were stratified by class

My background is in ecology, it is common to have smaller sample sizes and class imbalances and ML approaches are still increasingly adopted. My specific dataset: training set is 49 sample, my test ...
0
votes
0answers
12 views

What is Relative Equilibrium Distribution

Some datasets collected are imbalance in nature which violates the assumption of relative equilibrium distribution for most classifier learning algorithms, which will reduce the performance of ...
0
votes
0answers
27 views

Dropping examples in one vs all classification training

I am working on some legacy code where I have K One vs All classifiers for a classification problem having K labels. The dataset is imbalanced(i.e. the ratio of the ...
0
votes
0answers
7 views

Why do accuracy and MacroF1 decreases and AUC increases when I go from transductive to inductive classification?

I have two experiments with the goal of binary classification with multi-layer perceptron. Train, validation, and test set are the same in both. The only difference is that in the 1st experiment, the ...
0
votes
1answer
17 views

Handling imbalanced data for regression based tasks

I have an imbalanced google analytics dataset. I'm interested in predicting total.tranactionRevenue but, of the 70,000 data points only 700 have transactions. The value of these transactions varies ...
0
votes
1answer
27 views

Perfect recall but moderate precision due to imbalance?

I have a patient dataset on which I trained a RF classifier to predict whether a patient ends up in the hospital or not. Nevertheless, this dependent variable is imbalanced (66% of the patients ended ...
0
votes
0answers
24 views

Plot of Decision Boundaries intuition for different SVMs

I have a class imbalanced dataset and I used two different SVMs for binary classification. One plain SVM and one class weighted(i overweighted the positive class). Below are the decision regions I ...

1
2 3 4 5
18