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
1
vote
3answers
481 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
1answer
21 views

Balance classifier performance (boosting ensemble)

I'm trying to build a classifier for my highly imbalanced binary data, and I'd appreciate some help on how to balance by results. The dataset has the following stats: ...
1
vote
0answers
69 views

Training/testing on one population and then making predictions on a different population

Is there any appropriate way to be able to use a model that is trained/tested on one population, and then used to make predictions on another population? I'm trying to make a NBA draft model that can ...
0
votes
0answers
23 views

Logistic Regression with unbalanced data, intercept effect

In several papers I have read that when doing a logistic regression with unbalanced data, the entire effect of the imbalance is carried by the intercept. However, I cannot understand why this occurs, ...
69
votes
6answers
15k views

When is unbalanced data really a problem in Machine Learning?

We already had multiple questions about unbalanced data when using logistic regression, SVM, decision trees, bagging and a number of other similar questions, what makes it a very popular topic! ...
1
vote
0answers
6 views

Why is importance-weighted empirical risk minimization finite-sample biased?

Classical risk minimization (RM) minimizes the expected loss over the training distribution $p_{\mathrm{train}}(x)$, $$\theta^*_{RM} = \arg \min_\theta E[\ell(x, \theta)]_{p_{\text{train}}}.$$ As the ...
0
votes
1answer
30 views

What are some “not so common” methods for dealing with unbalanced data?

When we talk about unbalanced data, we usually think about SMOTE, resampling and so on. Usually the methods mentioned here: https://www.kaggle.com/rafjaa/resampling-strategies-for-imbalanced-datasets. ...
0
votes
0answers
20 views

How to select a classifier from the set of classifiers resulted from different random undersamplings with different accuracies?

I have a labeled two-class training set and a test set. My training set data is imbalanced. I want to train a classifier using the training set and evaluate it's accuracy using the test set. Before ...
1
vote
1answer
125 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 ...
0
votes
1answer
18 views

Why in stratified cross validation we don't balance the features?

According to Wikipedia: In stratified k-fold cross-validation, the partitions are selected so that the mean response value is approximately equal in all the partitions. balancing the labels sounds ...
0
votes
1answer
27 views

Should I balance the classifier train/test set, if metrics is Precision/Recall (F1 score)?

I want to train a classifier on an unbalanced data set. Proportions of classes C0/C1 are 65/35. Importantly, the success metrics is F1_score. In other words, the proper classification of class 1 (...
1
vote
0answers
47 views

Imbalanced classification or Regression? What is the best approach to my A/B testing related problem?

The context of the problem is A/B testing of two new versions of a game. I have a structured dataset (50000 rows x 22 columns) from the game designers that represents data with respect to two versions ...
5
votes
1answer
6k views

MANOVA with unequal sample sizes

I have data for 352 response ratings that have been categorized as "Low," "Medium," and "High." I would like to compare the differences of five variables across the three categories to see which ones ...
0
votes
1answer
20 views

Should I balance data set for survival random forest?

Should I balance data set for survival random forest? By subsampling I will loose information in data set. However I would do that in RF for classification. Should it be done also in case of survival ...
5
votes
2answers
69 views

Should we really do Re-Sampling in Class Imbalance data?

I have been doing ML for quite some time and I have a thought in class imbalance problems that has bothered me quite a lot. In problems where we have Imbalanced Dataset (one class is far more frequent ...
1
vote
0answers
14 views

ROC Curve for data sets with large negative bias

For context, I've read this forum here regarding a similar issue, and it seems the conclusion on there was that precision-recall curves are better-suited for data sets where there is a large negative ...
0
votes
1answer
361 views

Oversample procedure for nested cross valdiation

I'm currently conducting a nested cross validation on Random Forest to determine optimal hyper parameters and outer loop generalisation. My dataset has a class imbalance problem with only a few (8%) ...
1
vote
1answer
192 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, ...
1
vote
1answer
20 views

Improving F1 scores using models with good precision and recall

I have a highly imbalanced dataset (0.21 percent positives, rest negatives) for which I am trying to build a classifier. I tried to improve the F1 scores using hyperparameter tuning but in all the ...
2
votes
1answer
136 views

Why does a class weight fraction improve precision compared to undersampling approach where precision drops?

I have an imbalanced data where the ratio between positive to negative samples is 1:3 (positive samples are 3 times higher than negative). For my case it is is important to have a higher precision (...
1
vote
0answers
10 views

Multilabel Tweet Classification

I need some general advice and possible ideas. Problem statement goes like this -- We are given a tweet and we have to specify associated labels for it like generalized hate, support, oppose, ...
3
votes
1answer
2k views

Optimization algorithms for sparse data

For couple of weeks now I've been dealing with a classification problem involving a sparse dataset. To be more specific, for each input $x^{(i)}$, knowing that I have 1000 features, I've only 5 to 10 ...
1
vote
1answer
229 views

classification in imbalanced datasets: how to measure performance on test set?

I am using re-sampling methods to address the imbalance between classes for my binary classification problem. I am not sure how to measure the performance of my model on the test set: should I re-...
1
vote
0answers
18 views

How to do class balancing?

I am working with a really imbalanced dataset ($\approx$ 1% of positive cases) for a classification problem. I know that class balancing is an important step in this scenario. I have two questions: ...
0
votes
0answers
19 views

How H2O perform class balancing?

I wanto to perform class balancing using h2o autoML. I know there is a parameter class_sampling_factors that allow to specify the under/over sampling factor for ...
1
vote
1answer
19 views

Adding Gaussian Noise to unbalanced dataset

I have a highly umbalanced dataset, and the models that I used are overfitting. I read somewhere about SMOTE and I wanted to try it. However, the latter needs at least two samples (k_neighbors=1) to ...
1
vote
2answers
2k views

Calibration curve of XGBoost for binary classification

I'm working on a binary classification problem, with imbalanced classes (10:1). Since for binary classification, the objective function of XGBoost is ...
0
votes
0answers
11 views

Limits of oversampling

I have a dataset with an event rate of less than 0.3 percent. To improve the modeling results, I did some oversampling using SMOTE. I initially oversampled so that the event rate increases 10 times to ...
3
votes
1answer
98 views

How are artificially balanced datasets corrected for?

I came across the following in Pattern Recognition and Machine Learning by Christopher Bishop - A balanced data set in which we have selected equal numbers of examples from each of the classes would ...
56
votes
7answers
30k views

Binary classification with strongly unbalanced classes

I have a data set in the form of (features, binary output 0 or 1), but 1 happens pretty rarely, so just by always predicting 0, I get accuracy between 70% and 90% (depending on the particular data I ...
1
vote
0answers
21 views

Cost sensitive learning and class balancing

I am facing a classification problem with classes that are really imbalanced (more or less 1% of positive cases). In addition, the "cost" of a False Negative (FN) is much higher than the ...
0
votes
0answers
4 views

Monte carlo upsamling for imbalanced data to balance the class before Machine learning algorithm [duplicate]

I have highly imbalanced dataset yes(1440) and No(2.1 lakh ) records for training, I have tried with SMOTE/ADASYN to upsample the imbalanced class and achieved a precision of (0.2% ) , Recall 24 % ...
0
votes
0answers
16 views

Highly Unbalanced Dataset

I have a dataset (vector data) that contains the polygons and their corresponding crop type. This data is highly imbalanced i.e, I have a lot of classes that contain one sample only, as shown in the ...
1
vote
2answers
94 views

Is data-likelihood-weighted regression a thing?

Consider the basic linear regression model $y = A \theta$ with $y\in R^n$ and $A \in R^{n\times k}$ measurements and $\theta \in R^k$ parameters to be estimated. In my case, $\theta$ are physically ...
3
votes
1answer
144 views

Running SMOTE on very large class imbalanced datasets - batched or subsampled implementations

There is a theoretical and computational aspect to this question. I was trying to use SMOTE to reduce class imbalance in a rather large dataset--about 8 million rows. The data has a binary outcome ...
0
votes
0answers
17 views

Xgboost parameter scale_pos_weight for cost sensitive learning

I am using XGboost for classification in Python in a very unbalanced scenario. I know that, according to documentation, I can set the scale_pos_weight, to handle ...
0
votes
0answers
8 views

Long-tailed predictors for likelihood prediction

I have a set of long-tailed predictors and a binary target variable. The long-tailed predictors have also 0 values. The data-set is imbalanced with about 5% of positive class samples. I would like to ...
-1
votes
2answers
246 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 ...
2
votes
2answers
2k views

Finding optimal F1 threshold for classifier without probabilities (e.g. SVM)

Assume I have a dataset split into train/val/test and I want to compute the optimal threshold value for an F1 score. This threshold value is in [0, 0.5] as described in What is F1 Optimal Threshold? ...
3
votes
4answers
457 views

classification imbalance data - bias and class weight

This page shows a classification problem. They have used bias as well as bias along with class weights. What is the difference between bias and weights? In some other techniques such as Random ...
0
votes
0answers
16 views

Improving specificity, with unbalanced data

I am trying to predict if a debtor will repay or not in a given quarter. 8% do make a payment so my data is unbalanced. I am trying to improve my specificity without compromising too much on my ...
0
votes
0answers
9 views

Creating train/test sets on imbalanced time series data in R

I am analyzing fraud data, so the data set is very imbalanced with less than 1% of observations being fraudulent. Therefore, I know I need to perform up/down sampling to make my train/test sets more ...
10
votes
2answers
472 views

Is up- or down-sampling imbalanced data actually that effective? Why?

I frequently hear up- or down-sampling of data discussed as a way of dealing with classification of imbalanced data. I understand that this could be useful if you're working with a binary (as opposed ...
0
votes
0answers
13 views

Improve Precision for highly imbalance binary classification without compromising much on Recall score

Have a highly imbalanced dataset with Yes ( 1915 ) and No ( 545946).Splitted this into two items namely Train,Test. Applied Overampling using ADASYN as shown below and left the test part as it is ( no ...
0
votes
1answer
2k views

imbalanced dataset - class weight vs weighted loss function

I'm working on a classification problem with a very imbalanced dataset. Many papers mention a "weighted cross-entropy loss function" or "focal loss with balancing weights". I can't find any of those ...
0
votes
0answers
10 views

which one to tune first scale_pos_weight or gamma?

I have a dataset with a lot of zeros 1:14 and I am trying to fit a classification with xgboost and having trouble with f1 score. if I assign ...
1
vote
2answers
52 views

Do we normalise the dataset before or after performing one hot encoding?

I am working with an imbalanced dataset involving fraud. The aim is to use Logistic regression to predict if new observations are legitimate or fraudulent. I currently plan to perform normalisation, ...
0
votes
1answer
205 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
12 views

How to figure out loss weight for label-imbalanced regression problems?

In classification, suppose you have 1 image labeled as cancer and 99 labeled as not cancer, you can just divide the loss weight of "not cancer" by 99. Then you can train the model as this ...
0
votes
0answers
12 views

How to choose the number of samples to sample from an unbalanced dataset?

I have two unbalanced dataset with binary classes. One dataset has $13000$ samples for class 1 and $14000$ samples for class 2. Another dataset has $20000$ samples for class 1 and $40000$ samples for ...

1
2 3 4 5
15