Stack Exchange Network

Stack Exchange network consists of 174 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
5 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
25 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 ...
0
votes
0answers
9 views

How to find AUC for Precision-recall curve using glmnet in R? [closed]

I am running penalized regression in R on an imbalanced dataset using glmnet. Since glmnet masks all other AUC functions in other packages, Can anybody help on how to find Precision-Recall AUC using ...
1
vote
0answers
22 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
0answers
13 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
36 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
32 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
12 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
18 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
12 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
37 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
16 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
38 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
34 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
17 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 ...
0
votes
1answer
28 views

Consequences of unbalanced subgroups of categorical variables in logistic regression?

I have a dataset of around 120000 (120K) unique individuals. I am fitting a binary logistic regression, where I have around 150 variables to choose from. For the categorical variables, some are very ...
1
vote
0answers
25 views

How to approach memory issues with up/down-sampling problem across millions of rows in database that can't be loaded locally? (class imbalance)

I'm faced with fairly typical class imbalance problem across a dataset with nearly 9MM rows (hard drive failures) that's not stored locally (it's in Postgres table; downloading a .csv of it is not ...
1
vote
0answers
38 views

Which is the right way to handle imbalanced data in a regression problem?

I'm working on a regression problem with imbalanced data, and I would like to know if I'm weighting the errors correctly. I'll try to illustrate the concept with a simple example. Imagine I'm ...
0
votes
1answer
38 views

ROC and PR curves after over/under sampling in Unbalanced datasets

As I understood till now, ROC curves are not a good presentation of unbalanced datasets and PR curves are preferred because ROC curves are not sensitive to false positives. If we now use resample ...
0
votes
0answers
8 views

Do I need to treat class imbalance before preforming RFE (Recursive Feature Elimination)? [duplicate]

I am trying to perform RFE on an imbalanced data set that will later be used for binary classification. I have chosen to use the caret::rfe package for feature selection. I am using random forests ...
0
votes
0answers
18 views

Bootstrapped linear regression with unbalanced factors

I am investigating the relationship between Valence ratings (continuous response variable) and Condition (4-level factor) as ...
0
votes
0answers
19 views

Evaluating binary classifier model. What can say precision, recall etc.? [duplicate]

i'm trying to understand wether my model has good performance or not. I have binary classifier for summarization sentences: important or not (extractive approach) on specific corpus. Dataset is ...
1
vote
2answers
40 views

Multinomial Logistic Regression: small groups

I am implementing a Multinomial Logistic Regression, but I am encountering the possible issue of having very small groups when I create a frequency table of the dependent variable Y and one of the ...
0
votes
0answers
14 views

Interpreting probabilities from image classifier, which model to use?

I'm trying to interpret examples from a probability perspective and my intuition is telling me Logistic Regression should be used for such a purpose despite the score being weaker than the other ...
0
votes
0answers
13 views

Should oversampling/undersampling be applied only during CV or also for final model creation?

I am dealing with a highly class imbalanced dataset and am going to try oversampling and see how my nested CV is affected when comparing algorithms. When it comes to model finalization, should I ...
0
votes
0answers
16 views

classification-multivariate analysis+creation of class variable

I am working on a university R project of multivariate analysis and I need some help: DATA: MIXED, with 17 variables : 4 qualitative and the 13 are continuous. PROBLEM: I don't have a class variable, ...
0
votes
0answers
25 views

Biased coefficient estimates when using logistic regression with unbalanced classes?

I'm aware of the fact that probability estimates can be biased in logistic regression when dealing with unbalanced classes. When looking at the log-likelihood function ... $$ ℓ(β)= ∑ 𝑦_𝑖 *\log 𝑝(𝑥...
0
votes
1answer
45 views

Adjusting probability threshold for sklearn's logistic regression model

I am a 10th grade student working on a binary classification problem and I have decided to use the logistic regression model from Scikit-Learn. I am looking to predict patient adherence given the time ...
0
votes
0answers
23 views

Are Micro and Macro F1 enough for imbalanced classifier evaluation? What about AUC?

I'm working on an imbalanced classification problem. In the experiments, Micro-F1 and Macro-F1 are used for evaluation? But I can't get why the AUC score is not chosen for evaluation. Are these two ...
0
votes
0answers
16 views

Can SMOTE Be Used for Pure Data Augmentation and not Just Imblanaced Classes

I have learned that SMOTE can be used to deal with imbalanced class datasets. Could it also be used to create a larger dataset, preserving the original structure/distribution and thus also the ...
0
votes
2answers
49 views

Does bootstrapping help with power concerns?

I am running a logistic regression, similar to the following: Pr(Y = 1) = B0 + B1*X1 + B2*X2 + B3*X3 + e X1 is an indicator variable. I find B1 is statistically ...
0
votes
0answers
23 views

Recommender using classification

Hi I'm tasked with building a recommender for predicting item categories to users. I have data about which items the user has viewed and bought respectively. I'm interested in turning this into a ...
0
votes
1answer
28 views

Predicting proportion of individuals belonging to different classes

I am trying to compare performances of different classifiers to predict some data. The variable I wand to predict is binary (A or B), and I have a bunch of predictive variables to predict to what ...
0
votes
1answer
116 views

Imbalanced multiclass classification with many classes

I am working on a text classification project in which we have hundreds of (imbalanced) classes. Some characteristics of the data: We have examples of "bad" documents. Basically documents that don't ...
0
votes
0answers
19 views

Imbalanced class SVM prediction results using different validation data

I am trying to fit my data to a classifier using SVM. My data has 2 classes, the positive class which occurs with a probability of 0.002 and the negative class which is the dominant one. Suppose that ...
1
vote
0answers
36 views

Question about sample size for each class for machine learning classifiers

I'm trying to use a machine learning classifier (SVM in particular) on data that I generate. Unlike other applications, the data is not given to me but rather I have the flexibility to generate how ...
0
votes
1answer
27 views

Dealing with dataset imbalance: test if adjusting is necessary

I'm currently working on a project which uses a imbalanced dataset (two classes) for training, and I'm not sure if I should do a resampling procedure or not. Is there a way to actually test if it's ...
0
votes
0answers
10 views

State of the art in feature extraction from review text

I am working on a sentiment review classification problem and so far i have explored POS tags, synsets, N-grams, word2vec, tf-idf, doc2vec, glove and fastext vectors as features. I am wondering what ...
0
votes
1answer
49 views

Imputing and handling class imbalance

I have data with missing values. My $y$ is imbalanced (20% to 80%). a) is it at all possible to balance (e. via Smote) and Impute (e. via Mice) or will the results become too unreliable? b) if a) ...
1
vote
1answer
44 views

Imbalanced Test Data

I have an imbalanced (1:5) training and test set with only two classes and have oversampled the training set with SMOTE so that the class ratio is 1:1. The ML model gives values over 0.7 for accuracy, ...
0
votes
0answers
20 views

Encoding variable number of categorical features

I have a dataset listing the software installed for each user. This dataset shall be used (in conjuction with other user datasets) to classify the user into 4 (imbalanced) categories. There are over ...
1
vote
1answer
60 views

Bernoulli Naive Bayes with Unbalanced Classes of Binary Features

I'm using a multivariate Bernoulli model with a Naive Bayes classifier on binary features. It's giving a lot of very low estimates of the probability that each instance is correctly classified. I ...
0
votes
0answers
27 views

Alternatives to logistic regression when dataset can't meet 10 events per predictor variable

I have a dataset with a binary outcome I'd like to model, but have many more parameters than events, probably ~100 categorical parameters to test, in a dataset with 20 events in ~600 observations. As ...
0
votes
1answer
45 views

using (deep) neural networks for a severely imbalanced image dataset when some classes have <10 images

Taking a long shot here. So I have a a small dataset of ~500 images with discrete labels from 1 to 9. My task is to detect the per-class and overall accuracy of this classification method using a (...
0
votes
0answers
8 views

Binary Classification - Why is the Ratio of FP to TP the same (and can i leverage this fact?)

I am training a highly imbalanced dataset on a binary classification problem. (about 1.2% positive class). I have tried neural nets, random forest classifier, and gradient boosting classifier from ...
0
votes
0answers
38 views

Difference between AUPRC in caret and PRROC

I'm working in a very unbalanced classification problem, and I'm using AUPRC as metric in caret. I'm getting very differents results for the test set in AUPRC from caret and in AUPRC from package ...
0
votes
1answer
40 views

Unbalanced dataset accuracy [duplicate]

I’m currently encountering some problems analyzing a dataset with neural network. The problem is that I have an unbalanced binary class training set (10:1). Training accuracy for both classes are 100%....
0
votes
0answers
15 views

How can stratified kfolds perform worse than regular kfolds?

I am working with unbalanced classes to solve a classification problem (whether individuals pay their fees or not). My class imbalance is 75% positive (paid) and 25% negative (unpaid). I have read ...
0
votes
0answers
39 views

Handling imbalanced data for classification [duplicate]

What are the best ways to deal with imbalanced datasets for classifying whether or not individuals pay their tuition? The data is 75% positive class (paid) and 25% negative (unpaid). Some approaches I ...