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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

0
votes
0answers
25 views

How to fight imbalanced data in regression task? [on hold]

Suppose a reggression task, where solution space is [0..1]. But our dataset has more examples of solutions closer to zero, than to one. I am training a neural network. It is biased to predict numbers ...
0
votes
0answers
12 views

Binary Class Imbalance - not enough of class A or too much of class B?

Assume 1000 instances of both class A and class B are sufficient to train a decent binary classifier. Since it is easy to get more class B data, we get 99000 additional instances of class B (if we ...
0
votes
0answers
12 views

Comparing two Unbalanced data sets [on hold]

I have two data sets. The first one has 500 observations and the second one has 100000 records. Statistically, does it really does it make sense to compare these two data sets together?
0
votes
0answers
11 views

Use Logistic Regression to Predict Click Through Rate

The goal is to predict click through rate of article content. Currently, the linear regression is used and the input data set is at article level. The label is the click rate of the article. The issue ...
0
votes
0answers
20 views

Oversampling for multi-class neural net

Does this make sense or do I have no idea what I'm doing? I want to train a model that takes a sentence and outputs a binary multi-class vector of size $K$ where each dimension is a question class. ...
0
votes
0answers
9 views

Classification of temporal correlated data in out of fold prediction - Surprisingly high Accuracy

At the very moment, I might have awesome results or a problem. I will start with an overview about my problem setting. I have temporal correlated data (~10000 observations, ~200 features) from two ...
0
votes
0answers
7 views

Motivating the exclusion of certain results based on sample size

A survey of the physical condition of cars on the road is taken every year. A random sample of those cars is selected each year. The number of cars selected each year changes. Most years the sample ...
0
votes
0answers
10 views

Data augmentation or weighted loss function for imbalanced classes?

I have a CNN image classification problem with imbalanced classes. I could balance the dataset using data augmentation (Replication, mirror, etc.) on the minority classes. Also, imbalance could be ...
1
vote
0answers
15 views

Poor P-R curve for binary classifier trained on balanced data, with imbalanced test data

I have a very imbalanced dataset (9:1), for which I have performed under-sampling and achieved a balanced training set (~130k samples total post balancing). I am performing classification using ...
2
votes
1answer
17 views

How to calculate the probability that a feature falls into a certain class

There are classes A,B,C,D,E. Variable x has different means for each of these classes, but there is overlap in the range of x among classes. Item counts are different between classes, eg. there are ...
1
vote
3answers
62 views

Confidence in precision in the presence of few positives

I would like to report precision and recall for an existing binary classifier, which is a black box and which I cannot modify. I have a 1,000 test examples, sampled from a population of 100,000, and ...
2
votes
1answer
34 views

Get the number of weak learner - ebmc package of R - implementing class imbalance RusBoost on my dataset

I'm new to class imbalance and applying class imbalance technique 'RusBoost' on my dataset. I'm using ebmc package from R. I'm having difficulties to get its arguements values, as per the ...
0
votes
1answer
35 views

Interpreting precision and recall graphs

i have a CNN for sentiment analysis whose precision and recall for validation data over 10 training epochs is (average:macro): The dataset contains more positive samples than negatives.I have ...
3
votes
0answers
32 views

Can unbalanced classes introduce bias in a Random Forest model?

I am working on a classification problem using Random Forest. The training set has 600 instances and 16 attributes. The final class is an Yes/No answer. The ratio of "Yes" to "No" in the training ...
2
votes
0answers
58 views

Performance gap between training and validation/test data

I have a heavily imbalanced binary classification task, where the prevalence of the negative event is around 3%. I shuffled then stratified split my data in train, test and validation, ensuring that I ...
0
votes
0answers
10 views

can focal loss function works for text classification problem?

I am working on a relation extraction and classification problem. The data is in the form of text files. The data is imbalanced. I want to use focal loss function to address class imbalance problem in ...
-2
votes
0answers
20 views

How to undersample for a logistic regression using binomial data in python?

I have a highly imbalanced dataset. Only 4% of all data is clicks, 96% is non clicks. The data is represented in terms of counts, for example: I am using a generalized linear model with the binomial ...
0
votes
1answer
22 views

Should I balance my training dataset for an employee attrition analysis in machine learning?

I need to perform an analysis on employee attrition using Machine Learning algorithms. I intend to do both Supervised Learning ...
2
votes
3answers
64 views

Churn prediction on a highly passive and imbalance dataset

I'm trying to create a model to predict churn in the insurance industry. The objective will be to ' predict the probability of each member that will churn next month' i created a one row per member ...
0
votes
0answers
17 views

How to re-scale probabilities based on new cutoff point?

Suppose in a risk analysis study one component that needs to be estimated is probability of a binary event. We use a classification method, SVM for example, and achieve very good classification ...
0
votes
1answer
15 views

Unbalance images dataset

I want to create a deep learning model to classify images. My dataset has around 400 classes and the classes have different number of images.. How can I train the deep learning network on unbalanced ...
9
votes
0answers
117 views

Are unbalanced datasets problematic, and (how) does oversampling (purport to) help? [duplicate]

TL;DR See title. Motivation I am hoping for a canonical answer along the lines of "(1) No, (2) Not applicable, because (1)", which we can use to close many wrong questions about unbalanced datasets ...
1
vote
0answers
15 views

Deliberately creating unbalanced class size

I'm working on a logistic regression model to predict a certain disease, binary classification (Present/Not_Present). The disease has a normal occurrence rate of about 10% in the general population. ...
0
votes
0answers
55 views

GLMNET: Weights and imbalanced data

I have a multinomial regression problem using glmnet. The training data is imbalanced (1:5:10 roughly). I tried over and undersampling already. Would providing ...
1
vote
1answer
36 views

Random Over Sampling to handle Data Imbalance

Was reading an article on imbalanced datasets where the event occurs and look at balancing the dataset. In that article, the event records were 2% of the total records. The author of the blog ...
1
vote
0answers
25 views

Model Selection with Oversampling/ Cross-Validation leads to similar test results in 2 approaches

Quick Intro Sorry for the long read. I added a lot in here because I wanted to describe what I've worked on so far, but I wanted to quickly summarize the issue I've been having, just so you have it ...
0
votes
0answers
9 views

Two different approaches of oversampling data with GridSearchCV leads to similar test results

I was trying to compare two approaches to optimal selection of hyperparameters based on two approaches: 1) Wrong Approach: Oversampling before GridSearch CV This can lead to bleeding of data (that ...
0
votes
0answers
6 views

Average Precision or FBeta & Decision Threshold Tuning for Binary Classifier [duplicate]

I'm working with an imbalanced binary classifier data set (3% positive) in sklearn. The cost of a false negative is extremely high so recall is much more important than precision. To baseline my ...
0
votes
0answers
23 views

Why does ANOVA require balanced data, but mixed-effects models do not?

Anecdotally, I've often heard it said that unbalanced designs are problematic for ANOVA but not for mixed-effects models. For example, in this question someone had unbalanced data (very few ...
0
votes
0answers
12 views

which type of Anova apply for my one way anova with unbalanced data?

I've run an one way anova with unbalanced data. My database ...
0
votes
0answers
29 views

Training data for logistic regression has only one binary value

I'm fairly new to machine learning and want to build a vehicle crash prediction model using logistic regression. Ideally, I'd like to predict crash risk as a probability (1 = crash, 0 = no crash) but ...
0
votes
0answers
15 views

Running two stage classification to predict relatively rare event?

I have a very imbalanced sample in which I am trying to predict probability of a rare event (Out of around 25,000 observations, this event is observed around 30 times) and am reluctant to try over/...
1
vote
0answers
103 views

Linear Mixed Model with Unbalanced Observational Data

I am doing an observational study that yields very unbalanced data. First, let me describe the experiment and my hypothesis. Participants performed a task (e.g., reading) with some physiological ...
0
votes
1answer
34 views

Process for oversampling data for imbalanced binary classe

I have about a 30% and 70% for class 0 (minority class) and class 1 (majority class). Since I do not have a lot of data, I am planning to oversample the minority class to balance out the classes to ...
0
votes
0answers
22 views

AUC from test set higher than training set using GridSearchCV + Random Forest Classifier on Oversampled Dataset

I was trying to compare the effect of running GridSearchCV on a dataset which was oversampled prior and oversampled after the training folds are selected. The oversampling approach I used was random ...
0
votes
1answer
42 views

Precision and recall of imbalanced classes

I'm new and have searched many questions about this problem in this stack, but those answers aren't clear enough for me. The point is the area under PR curve of my binary classes is the same as the ...
0
votes
0answers
29 views

Understanding how cross-validation works - do I test the entire data set after cross-validation?

QUESTIONs: I will appreciate help on the correct flow on how to create 5 different splits of the data for imbalanced dataset especially or in general and a clarification if in each new run the ...
0
votes
0answers
19 views

Should one use balanced data when you are just interpreting a statistical model? [duplicate]

I am currently working with a data that is highly unbalanced for logistic regression (99% false and 1% true). This is an expected result. But I am using logistic regression only for interpretation i.e....
0
votes
0answers
9 views

How to define the minimum number of validations instances (points) in large imbalanced datasets

I have been reclassifying a polygon layer to transform Land Use data into Land cover data. Long story short: My final reclassification has about 100.000 polygons, and I need to manually validate them,...
0
votes
1answer
52 views

Q: Possible to optimize for area under the precision-recall curve in glmnet logistic regression?

tl;dr with the R glmnet package, is it possible to optimize for the area under the precision-recall curve, rather than the area ...
7
votes
3answers
104 views

Using ML to assist human labelling in dataset with highly unbalanced classes

Are there scientific issues with using ML to assist human annotation? I've got a 3 class unlabelled dataset where only 1 in 500 elements belong to the 2 classes of interest. The labels arn't ...
0
votes
1answer
55 views

Random sampling methods for handling class imbalance

https://www.svds.com/learning-imbalanced-classes/ explains quite nicely the different ways to handle an imbalanced dataset. But there is an information under the random undesampling and random ...
1
vote
1answer
36 views

Training binary classifiers with huge dataset with mostly negative examples [duplicate]

I would like to build an ensemble classifier (possibly boosting) on a huge training dataset (>> 1e7 examples) where the proportion of positive examples is around 5%. And what I am interested in are ...
0
votes
0answers
83 views

Is Undersampling or oversampling for unbalanced classification data?

I am trying to train a Random Forest classifier on a binary classification problem but with a highly imbalanced dataset where the positive class is much smaller than the negative class . I have ...
0
votes
0answers
9 views

Testing data when responses may be based on unequal sample size

An experiment is run in which subjects are given information and a conclusion. They are asked if they agree or disagree with the conclusion and asked to justify their answers. Justifications are ...
2
votes
0answers
44 views

How to work with unbalanced datasets in generalized Boosted Regression Models using gbm in r?

I'm using generalized boosted regression models to explore what is the contribution of 20 independent environmental variables (x1, x2, ...., x20) to the explanation of the variability of the dependent ...
1
vote
1answer
25 views

How can I check whether a SVM classifier delivers “degenerate” predictions?

If I fit an SVM to imbalanced data (e.g. two classes and a sample where more than 90% belong to class 1 and only 10% to class 2) it may happen that the classifier simply classifies all cases as class ...
2
votes
1answer
43 views

Conceptual questions on ensemble learning and Boosting methods in Matlab

The documentation on ensemble methods in Matlab explains different ensemble algorithms for classification and regression tasks. I have normalized the raw feature set and using the normalized data for ...
0
votes
1answer
78 views

improving prediction of the minority class for imbalanced data

I am trying to classify a data set X of 2000 examples (rows) and 20 features (Columns) following the example code given here: https://stackoverflow.com/questions/...
1
vote
0answers
20 views

Test for clustered data, multinomial response, ordinal categorical variables, unbalanced design

I have a data set consisting of samples of contaminated water collected at different times at different sites. Each sample has an associated contamination level (...