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

0
votes
0answers
7 views

How to deal with training data after cross validation?

I have imbalanced data and used undersampling to construct several logistic regression models, using the way very similar to EasyEnsemble. The parameters, like regularization, number of models were ...
1
vote
0answers
4 views

Difference between class_weight and scale_pos_weight in LightGBM

I have a very imbalanced dataset with the ratio of the positive samples to the negative samples being 1:496. The scoring metric is the f1 score,and my desired model is LightGBM. I am using the sklearn ...
0
votes
0answers
6 views

non linear mixed effect model with unbalanced data

I am using nlme to model the growth curves of individuals that are in 4 different groups, using R. The number of individuals in each group is completely unbalanced (n1=344, n2=51, n3=34, n4=25). ...
0
votes
0answers
30 views

Random oversampling versus classes weighting for class-imbalanced dataset

I want to train a multi-class classification deep learning model. But my dataset is class-imbalanced. So considering 2 solutions, random oversampling and classes weighting, I have some questions: Do ...
0
votes
1answer
10 views

Accuracy and F-mesure for imbalanced datasets

I have 10 imbalanced datasets. Classes are : 1, 2, 3, ..., 10,11,12. I used as evaluation metrics for my datasets accuracy and F-measure. The F-messure of each class in each dataset is as below: Is ...
0
votes
0answers
7 views

Fixed Effects Panel Data

I am trying to run a fixed effects regression but unfortunately having some issues. I hope someone could help me. I want to regress $P_{itc} = \mu_{c} + \phi_{b} + \gamma_{s} + \sigma_{1}*tax_{i,t} ...
0
votes
0answers
8 views

unbalanced panel data: is it possible to use?

I am trying to analyze unbalanced panel data. Honestly, it is first time to do longitudinal study, so I have many difficulties. I really need your help. I consider to use GEE or RE (in STATA) ...
2
votes
0answers
34 views

Choosing error function for regression

I have a dataset with ~100K samples and non-negative continuous target variable. 99% of target values are zeros and the remaining 1% are right-skewed. Here are the deciles (0 and 1 correspond to min ...
0
votes
1answer
15 views

Train/Test split for imbalanced regression problem

I have a dataset with ~100K samples and continuous target variable which has 95% of zero values. Since there are high-dimensional categorical features and missing values in my data, I plan to use ...
0
votes
0answers
13 views

The coefficients and p-values in the Firth logistic regression when the data set is imbalance

My question is that in the case where the contingency table has imbalance data in terms of binary response success and failure, can I confidently say that the two-level categorical predictor is ...
0
votes
0answers
13 views

Interpreting results of a class-balanced model?

I'm working on a logistic regression model in order to model a relationship and am facing a class-imbalance problem (way too many 0's and not enough 1's). In order to resolve this, I'm planning to use ...
0
votes
1answer
12 views

Is Stratified K Fold CV Needed when Estimator implements Balanced Class Weight?

I am working on a classification task with an imbalanced dataset. I am using Sklearn's ensemble RandomForestClassifier and set its class weight to Balanced. My question is, when I then GridSearch it, ...
2
votes
1answer
55 views

Can balanced accuracy be higher than accuracy?

I have classification tree where the balanced accuracy of the test set is higher than the normal accuracy. I thought balanced accuracy can only have at his maximum the same value as the accuracy not ...
0
votes
1answer
29 views

Practical interpretation of Precision-Recall AUC

I have a classifier with an AUC (PR) of 0.06 which I will use for a practical interpretation. My test set consists of three months of data with a total of 2,200,000 observations of which 0.03 are ...
0
votes
0answers
22 views

How can the balanced accurcay be bigger than the normal accuracy in unbalanced test data? [duplicate]

I constructed two binary classification tree's on two different training set's that i balanced with oversampling and undersampling. The test set is still unbalanced. After that i computetd the ...
0
votes
0answers
14 views

Improveness given a certain AUPRC

I am training a machine learning model (Random Forest) for a multiclass problem (64 classes) in which most of them are highly imbalanced. That's why I am using mainly F1 score for checking the model's ...
0
votes
1answer
56 views

Performance Imbalance Dataset Decision Tree

I have a imbalance dataset for a classification task, with the minority class accounting for about 21% of the total. When I use a decision tree based model for prediction, let's say a classification ...
0
votes
0answers
15 views

Filter-based feature selection for binary classification with unbalanced classes

I have a data set with ~10k observations and ~50 features. Each observation is assigned one of two classes (labeled 0 and 1, say). Approximately 98% of the observations are class 0, and the remaining ...
0
votes
1answer
15 views

Do ANOVA & MANOVA require balanced levels?

I have one independent variable with two levels, or categories, and four dependent variables. When doing a MANOVA or ANOVA test, how important is it for the number of observations in each category to ...
1
vote
1answer
36 views

Binary classification for imbalanced distribution of target/response class for age

I'm trying to build/train model that depends on many attributes where age is the most important one (it has significant impact on AUC). Overall target class count is quite balanced (+40% vs. -60%) ...
1
vote
0answers
15 views

Predicting user behaviour based on transactional data - flagging “risky” behaviour

Firstly, I'm not sure if this is the right instance of StackOverflow to post on so feel free to ask me to put it elsewhere. I am exploring the concepts of clustering and "unsupervised" learning for ...
2
votes
0answers
40 views

Repeats across subject and Item with high percentage of single repeat data

I have a data set, with a little over 300 subjects. This is an observational study, so randomization didn't happen. I want to compare 2 methods. about 200 subjects were under method 1 and rest were ...
2
votes
0answers
56 views

Logistic Regression Class Imbalance and the use of weighting and undersampling

I have been working on a machine learning model using Spark (binomial) LogisticRegression. The dataset has what I think is a high degree of imbalance - roughly 1% of rows are labelled as events. The ...
1
vote
1answer
33 views

what is done first balancing data or cross validation?

I want to classify imbalance data in two class and I want to use oversampling, undersampling and Synthetic data generation methods .for tuning my model i want use k-fold cross validation what should ...
1
vote
0answers
38 views

Imbalance dataset in regression problem

I know that there are several ways, such as sampling methods, to deal with the imbalance in classification. However, I am dealing with the imbalance problem in regression settings. Basically, I want ...
1
vote
0answers
21 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
26 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
8 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
57 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
24 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
13 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
445 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
47 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
463 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
32 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 ...
0
votes
0answers
12 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
52 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
44 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
17 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
28 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
15 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
25 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
91 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
95 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
130 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
115 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
13 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
63 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
16 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
16 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 ...