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 [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*.

1
vote
0answers
10 views

Is it possible to incorporate 'the number of replicates' as a random effect?

Due to the constraints of other aspects of my sample design, I have treatment categories where the number of replicates varies between, say, 17 - 70 across 15 factor levels. For my variable of ...
0
votes
0answers
11 views

How to interpret ROC curve? [duplicate]

I am currently doing a classification problem for classifying the functional class and non-functional class of peptidase cleavage site. The data on non-functional class (negative class) is highly ...
0
votes
0answers
6 views

Modeling on entire dataset vs. Combining segmentation models trained on subsets of the same dataset

Training machine learning models on an unbalanced dataset: about 3% positive labels, and 97% negative. The modeling goal is to get as many examples as possible with 60% precision on a holdout test set ...
1
vote
1answer
31 views

Improve precision/recall for class imbalance?

Trying to get better precision/recall for both classes ... any tips? I have heterogeneous features [a few num vars, a few cat vars, and 2 text vars] Target is a binary classification w/ class ...
0
votes
0answers
11 views

undersampling before or after cross-validation

I have a classification problem with highly unbalanced classes. In 4000 samples, 1% is 1s and 99% is 0s. Normally, I would use the balance technique only in the training set. However, I expect that ...
0
votes
0answers
12 views

How significant are the results of my classifier?

I have seen this and this questions, but all of them are about accuracy. I have 5 different binary classifiers on imbalanced datasets (most of the samples are negative). I need to prove that one of ...
4
votes
1answer
43 views

How does logistic regression “elegantly” handle unbalanced classes?

Frank Harrell in this interesting blog post "Classification vs. Prediction" points out that using stratified sampling to handle unbalanced classes is a bad idea, since a classifier trained on an ...
0
votes
0answers
37 views

How to deal with an imbalanced dataset for multi-label classification?

You can consider me novice to intermediate at best with Machine Learning. For the past few months, I've been developing a neural network that learns to play a 3D fighting game by trying to mimic how ...
2
votes
1answer
369 views

Imbalanced dataset binary classification

I am new in ML & DS and i have a dataset with an imbalance of 9:1 for Binary Classification,as an assignment. Could you please guide me in this regard? Also Which classifier is best for Imbalanced ...
0
votes
0answers
21 views

Lasso Logistic Regression in the presence of Class Imbalance

Since class imbalance only affects the estimate of the intercept in vanilla logistic regression, the orientation of the optimal separating hyperplane remains unchanged. However in $L_1$-regularized ...
-1
votes
0answers
46 views

Unbalanced classes multiclass

Certain ML algorithms have parameters which can be used to deal with the effects of unbalanced dependent variable classes. For example the random forest implementation in Sci-kit learn has the class ...
0
votes
0answers
11 views

oversampling data with subclass

Oversampling of under-represented data is a way to combat class imbalance. For example, if we have a training data set with 100 data points of class A and 1000 data points of class B, we can over ...
0
votes
0answers
40 views

Calculating the correlation of an unbalanced repeated measures data set in python

As mentioned in the title I have an unbalanced repeated measures data set and would like to calculate the correlation of a particular stat with win percentage. The data set is of player performances ...
0
votes
0answers
20 views

How to evaluate Recall and Precision if the negative class is minority?

I try to create a classification tree. My dependent variable is participation which is coded as a categorical 1/0 variable. Participation = 1 means a person works, participation = 0 means a person ...
0
votes
0answers
16 views

Can treating a severely unbalanced binary classification task as multinomial increase accuracy?

(Example for illustration purposes only) Okay, so imagine you have an image-recognition task, you have to design a ML model that is able to look at pictures of all animals and identify only the ...
1
vote
0answers
26 views

Exclude areas of feature space without getting false negatives

I am using a decision tree classifier to split the feature space according to two classes ( A and B). Events of class A are important and I want to classify all of them correct, i.e. no false ...
0
votes
0answers
11 views

Highly unbalanced data set .Minority Class 1 %

I want to optimize precision and recall i.e f-score but I want to keep high precision . What are the possible ways of doing binary classification on such imbalanced data set [Minority class 1 %]. I'...
0
votes
0answers
21 views

Imbalanced Dataset - Poor Evaluation

My dataset has about ~75,000 records with 39 features. Most of the features are categorical, so I have one-hot encoded them. About 14% are minority with label 0 and the rest 86% with label 1. I have ...
0
votes
0answers
23 views

Balanced LogLoss with XGBoost

Following the discussion on here I started worrying less about class imbalance. However, I recently started building a predictor, using XGBoost, and I wanted to used LogLoss as my target metric. I ...
0
votes
1answer
31 views

choosing metric for R keras for imbalanced binary class

i am using Keras on a text classification task in RStudio. I have a very imbalanced binary classification problem where the positive class is only present in about 2% of cases. If i use down-...
3
votes
2answers
75 views

Why is a PR curve considered better than an ROC curve for imbalanced datasets?

I have heard from multiple sources that a precision-recall curve is considered better than an ROC curve when testing a classifier on a dataset with a class imbalance. https://www.biostat.wisc.edu/~...
3
votes
0answers
68 views

Overfitting in Random Forest Classifier?

I would like some help from you in a classification model that I am developing. In summary, the problem is: – Classification problem with binary outcome (0/1) – The classifier is a Random Forest ...
1
vote
0answers
11 views

Which is the more reliable method for reporting classification results in deep learning?

I have two methods to compare, the one which reports weighted F1-score with imbalanced data and, the one which reports better F1-score with balanced data. I am confused as to which method's ...
2
votes
1answer
56 views

What are other ways of doing oversampling apart from SMOTE?

I have just begun learning about machine learning techniques and started solving problems on kaggle. I have a few questions about how to handle class imbalance: How to handle imbalance dataset ...
0
votes
0answers
12 views

What types of problems can an unbalanced design cause?

I have a between subject factor called group (with three levels) and a within subjects factor called stimulus (with two types of stimulus). Du to limitations out of my control, there are an unequal ...
0
votes
0answers
11 views

How to assign class weights & also mis-classification cost in multi class classification of Vowpal Wabit?

I have a problem of Ordinal Classification consisting of labels 1 < 2 < 3 < 4 < 5 < 6. Since the data and cardinality of features are extremely large I have but one choice to use Vowpal ...
0
votes
0answers
22 views

Do you need to adjust the probability if you use the 'class_weight' parameter in LogisticRegression-sklearn?

I have a imbalanced dataset and I want the the output as probabilities and not labels. Hence using Logistic Regression seemed to be the obvious choice. However the classsifer started predicting all ...
0
votes
0answers
17 views

Adjusting predicted probabilities after resampling

Suppose I've got highly imbalanced data and I want to train a model, for binary classification. So I upsample the minority class or downsample the majority class or whatever. My question is whether ...
0
votes
0answers
18 views

Counter intuitive in AUPRC and Recall and Precision and F1 for imbalanced dataset

I would like to ask for some details explanation on comparing several classifiers for imbalanced dataset using the following metrics: Area under the ROC curve, AUC Area under the Precision-Recall ...
0
votes
0answers
20 views

Grouped data as independent variable for continuous outcome

I have an independent variable grouped into irregularly sized classes (0, 1-5, 6-10, 11-20, >20), a continuous dependent variable, and several control variables. So far I've been trying to stay close ...
0
votes
0answers
6 views

unbalanced due to regimes?

I have a sample which seems to have data in two distinct regimes. Suppose that 50% of observations have x variable from 0 to 1, while the remaining 50% with x between 1 and 8. Y appears to increase ...
0
votes
0answers
9 views

When we test for factor invariance, does imbalance among groups affect fit indices?

My question is similar to this one: unequal group sizes in a multi-group CFA but applied to Explorative Structural Equation Model (ESEM) instead of CFA. In short: may group imbalance be a problem ...
0
votes
0answers
25 views

SMOTE algorithm gives better AUC than matching

I have a highly imbalanced data set: a total of 13000 patients, 160 having condition A, and various other features which could be predictors. In order to balance the data I did two things: 1) ...
1
vote
2answers
52 views

How should I resample the training and testing set with imbalanced data whilst having meaningful performance metrics?

I have an imbalanced dataset of approx. 200 positive and 800 negative examples. I run nested cross-validation where i=5 and j=5; (i is inner and j is outer). The cross-validation procedure isn't the ...
0
votes
0answers
30 views

How to mining association rules in very unbalanced dataset

I have a dataset of a large groceries store with more than 95% of products with very low support. When I generate rules with the apriori algorithm most rules have RHS equal to some product in the high ...
1
vote
0answers
27 views

Evaluation of Classifier Performance on Imbalanced Dataset with Lift Chart

I trained a classifier on imbalanced dataset (label={0,1}) by assigning higher weight to rare event(label=1). Lift chart shows that the predicted and actual curves are very separated. I also trained ...
0
votes
2answers
31 views

Which classification model should I choose and Why?

I am working on a research-based assignment where I suppose to build a 3-class (bad, medium, good) classification using SVM. The dataset provided is imbalanced. The train:test splitting ratio is 75:25 ...
1
vote
0answers
100 views

Effects of class imbalance on nn batch training

Say I have a binary classification task, where the positive class (1) is only 1% of the whole data set. Intuitively I can understand why this could be bad for the classifier as the model may learn ...
1
vote
1answer
48 views

Suitable performance metric for an unbalanced multi-class classification problem?

I have an unbalanced multi-class classification problem with the following class distributions: Class 0: 17.1% Class 1: 63.2% Class 2: 19.7% I am using scikit-...
1
vote
1answer
40 views

Between-subject fMRI classification: subjects with different number of runs

The main purpose of my work is to discriminate patients vs healthy controls using fMRI and multivariate pattern analysis (MVPA). Since I want to classify at the subject level I performed a separate ...
0
votes
1answer
52 views

SMOTE - What is the difference in sampling before or inside train() [closed]

I have an unbalanced dataset and would like to apply SMOTE to the training data. I can either do one of the following: Inside trainControl() add ...
0
votes
0answers
36 views

unbalanced 3 factor ANOVA in R

We are working on an fMRI study. We have the following factors to consider: -Stimulus (4 levels) -Brain structures (42 levels) -Group (3 levels) Each participant belongs to one group and received the ...
1
vote
2answers
35 views

Metrics for unbalanced classes [duplicate]

I have been looking for good metrics on this data set I am working, however it is highly unbalanced. It has a total of 8 categorical classes, one of them is responsible for ~40% of data, another for ...
0
votes
0answers
15 views

At which threshold is unbalanced data a problem for a binary classification tree? [duplicate]

I want to build a binary classification tree to clasfiy wether a person is working or not and use the model for prediction. I read that unbalanced data could be a problem. Now i ask myself at which ...
0
votes
1answer
49 views

Using separate models to predict unbalanced classes

I'm facing a scenario with 5 classes where a tabulation of the target variable yields: > 1 2 3 4 5 > 1010 1310 1080 2700 2620 As you can ...
0
votes
1answer
26 views

Can I compute an F1 score when the test data has no examples of one class?

I am working on a 3-class classification problem. We are cross-validating via a Leave-One-Out Approach, and there are some instances where the test data has no instances of one of my three classes. ...
0
votes
0answers
19 views

Deal with highly unbalanced data classes [duplicate]

I got this horrible(hope you'll find the good in it) dataset, with 15 classes. Any suggestion to deal with it? I was wondering to group at least into 3 classes, however the first one is tremendously ...
0
votes
1answer
45 views

Correcting sample selection bias of binary classifiers

In fraud investigation the number of detected fraud cases can be very small when compared to the total number of cases. This would also apply to rare desease detected in a very small number of people ...
0
votes
1answer
46 views

Measuring class imbalance of a dataset [closed]

Is there a way to measure the balance (i.e. ideal number of positive samples for machine learning) of a dataset? A citation will also be useful.
0
votes
0answers
29 views

Incorporating uneven sample sizes into linear mixed models

I have run an experiment measuring behaviour of individual animals of different Species. Given that the species are all quite different, I standardised my experiments by biomass, but this means that ...