Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [imbalanced-learn]

Imbalanced Learn is a python package used specifically for dealing with imbalanced data in machine learning contexts.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

What is the Near-Miss Version 3 undersampling algorithm?

I understand version 1 and version 2 of the Near Miss undersampling algorithm, as described here. However, I don't understand version 3 of this algorithm. I'll appreciate an explanation.
Evan Aad's user avatar
  • 175
5 votes
3 answers
232 views

Reproducible examples where balancing the training data demonstrably improves accuracy

I asked this question on the Statistics SE, but there were no answers, even when a modest bonus was available, so I am asking here to see if any examples can be given. I have been looking into the ...
Dikran Marsupial's user avatar
1 vote
1 answer
806 views

I used SMOTE-ENN to balance my dataset and it improved the performance metrics, but how can I be sure it's not overfitting?

The models were evaluated using 10-fold cross validation. foldCount = StratifiedKFold(10, shuffle=True, random_state=1) The models in question are XGBoost. ...
Tariq's user avatar
  • 15
2 votes
2 answers
1k views

How to calculate accuracy of an imbalanced dataset

I like to understand what is the accuracy of an imbalanced dataset. Let's suppose we have a medical dataset and we want to predict the disease among the patients. Say, in an existing dataset 95% of ...
Encipher's user avatar
  • 361
0 votes
1 answer
70 views

Do I need to use AUPRC for reporting classification results on an imbalanced dataset when the model was trained using upsampling and CV

I am working on a binary classification problem which dataset has about 5% of positive class samples. I split the dataset, 70% for training and 30% for testing. I used the test data only once for ...
Paul's user avatar
  • 1
0 votes
1 answer
91 views

How to effectively evaluate a model with highly imbalanced and limited dataset

Most data imbalance questions on this stack have been asking How to learn a better model, but I tend to think one other problem is How do we define "better" (i.e. fairly evaluate the learned ...
jasperhyp's user avatar
0 votes
2 answers
426 views

How to evaluate data imputation techniques

I have a data set with 29 features 8 if them have missing values. I've tried Sklearn simple imputer and all it's strategies KNN imputer and several Number of K Iterative imputer and all combinations ...
yassine sfayhi's user avatar
1 vote
1 answer
320 views

Class imbalance: Will transforming multi-label (aka multi-task) to multi-class problem help?

I noticed this and this questions, but my problem is more about class imbalance. So now I have, say, 1000 targets and some input samples (with some feature vectors). Each input sample can have label ...
jasperhyp's user avatar
0 votes
1 answer
56 views

Give more weight to features based on distribution plot

I have a task to predict a binary variable purchase, their dataset is strongly imbalanced (10:100) and the models I have tried so far (mostly ensemble) fail. In ...
robsanna's user avatar
  • 101
0 votes
1 answer
62 views

Over-sampling when predicting a contionuous variable

Let's say I am predicting house selling prices (continuous) and therefore have multiple independent variables (numerical and categorical). Is it common practice to balance the dataset when the ...
Kev's user avatar
  • 9
0 votes
1 answer
219 views

Explaining the logic behind the pipe_line method for cross-validation of imbalance datasets

Reading the following article: https://kiwidamien.github.io/how-to-do-cross-validation-when-upsampling-data.html There is an explanation of how to use ...
PwNzDust's user avatar
  • 149
1 vote
1 answer
568 views

ColumnTransformer worse performance than sklearn pipeline

I have an (unbalanced , binary data) pipeline model consisting of two pipelines (preprocessing and the actual model). Now I wanted to include SimpleImputer into my ...
corianne1234's user avatar
0 votes
1 answer
1k views

Handling Imbalanced Datasets in Orange

I work in the medical domain, so class imbalance is the rule and not the exception. While I know Python has packages for class imbalance, I don't see an option in Orange for e.g. a SMOTE widget. I ...
Bob Hoyt's user avatar
3 votes
1 answer
756 views

What does IBA mean in imblearn classification report?

imblearn is a python library for handling imbalanced data. A code for generating classification report is given below. ...
codeczar's user avatar
  • 153
1 vote
1 answer
674 views

Orange data mining: Balancing data set using imblearn code

I am using an unbalanced dataset. I wanted to oversample my dataset using a Python script (Scripting code for class imbalance in Biolabs Orange). However, it still gives me an error ...
Emma Bartholomeeusen's user avatar
1 vote
0 answers
337 views

Why Imblearn pipeline gives very different results when used scaler and under sampling method swapped

I am using the Kaggle's credit card fraud detection dataset (https://www.kaggle.com/mlg-ulb/creditcardfraud) In order to create a balanced datasets I was testing RandomUnderSampler() and NearMiss(). I ...
Neo's user avatar
  • 11
0 votes
0 answers
29 views

How does my score ranges change when I use class weight in Keras vs when I don't?

Following are images of Unweighted Score Range and Weighted Score Range
siddhesh tiwari's user avatar
2 votes
1 answer
2k views

Using SMOTENC in a pipeline

I am trying to figure out the appropriate way to build a pipeline to train a model which includes using the SMOTENC algorithm: Given that the N-Nearest Neighbors algorithm and Euclidian distance are ...
thereandhere1's user avatar
1 vote
1 answer
852 views

Why to adjust class weights instead of simply finding the best threshold?

In a binary supervised classification where classes 1 and 0 have different number of samples in training, it’s very common to find tutorials about adjusting class weights, over and under sampling for ...
Henrique Nader's user avatar
1 vote
2 answers
697 views

Cross validation schema for imbalanced dataset

Based on a previous post, I understand the need to ensure that the validation folds during the CV process have the same imbalanced distribution as the original dataset when training a binary ...
thereandhere1's user avatar
11 votes
3 answers
5k views

For imbalanced classification, should the validation dataset be balanced?

I am building a binary classification model for imbalanced data (e.g., 90% Pos class vs 10% Neg Class). I already balanced my training dataset to reflect a a 50/50 class split, while my holdout (...
thereandhere1's user avatar
0 votes
1 answer
39 views

Low leves of probability observed after modelling.Is it right to scale the probability

I have done modelling on imbalanced class , without any sampling methods. Event rate is around 0.1 ,After modelling I am getting probalities more at the lower side close to zero.I have tried differnt ...
JJchry's user avatar
  • 1
3 votes
1 answer
94 views

The most informative curve for imbalance datasets

For the imbalanced datasets: Can we say the Precision-Recall curve is more informative, thus accurate, than ROC curve? Can we rely on F1-score to evaluate the skillfulness of the resulted model in ...
Dave's user avatar
  • 248
1 vote
0 answers
53 views

Multi-classification: low precision due to imbalanced classes in test data - what to do?

I built a multi-classification model with 3 result classes (XGBoost using R's caret-package): A, B and C. I undersampled my training data - so every class is equally abundant for training. The ...
Arne's user avatar
  • 11
4 votes
1 answer
1k views

Why is oversampling outperforming class weight?

I have a dataset that is highly imbalanced. One class has 412 (class 0) samples while the other has 67215 (class 1) samples. For its classification, I am using MLP. When I use class weight of 165 for ...
girl101's user avatar
  • 1,161
1 vote
2 answers
215 views

Preferred approaches for imbalanced data

I am building a binary classification model with imbalanced target variable (13% Class 1 vs 87% class 0). I am considering the following three options to handle the data imbalance Option1: Create a ...
thereandhere1's user avatar
1 vote
0 answers
84 views

CART classification for imbalanced datasets with R

Hey guys i need your help for a university project. The main Task is to analyze the effects of over/under-smapling on a imbalanced Dataset. But before we can even start with that, our task sheet says, ...
mingabua's user avatar
3 votes
0 answers
813 views

Balancing the dataset using imblearn undersampling, oversampling and combine?

I have the imbalanced dataset: data['Class'].value_counts() Out[22]: 0 137757 1 4905 Name: Class, dtype: int64 ...
hanzgs's user avatar
  • 163
4 votes
1 answer
18k views

SMOTE for regression

I am looking into upsampling an imbalanced dataset for a regression problem (Numerical target variables) in python. I attached paper and R package that implement SMOTE for regression, can anyone ...
thereandhere1's user avatar
1 vote
1 answer
126 views

Quantifying the imbalanceness of a dataset

after looking a lot in the literature there is really a lot of how to work with imbalanced dataset but so far I can not find a definition of a imbalanced metric that quantifies how much imbalanced ...
Alex P's user avatar
  • 31
1 vote
0 answers
110 views

Balance two crossentropy losses with different number of neurons

I have a model with a few outputs, each output with shape: Shape: (batch_size, labels_1) -> softmax -> ...
Daniel Möller's user avatar
0 votes
4 answers
10k views

How to find whether a dataset is blanced or imbalanced?

I have few dataset to experiment classification(Multi-class). These datasets are about 400GB. I wanted to know whether the dataset is balanced or imbalanced. How to know that dataset is balance or ...
Data Bee's user avatar
4 votes
3 answers
8k views

How to Split And Resample Imbalanced Dataset Into Train, Validation and Test

I want to understand how to split the imbalanced data set with a binary target variable where 87% of the samples are negative and 13% of the samples are positive. Now, I know that you should always ...
Krishnang K Dalal's user avatar
0 votes
1 answer
60 views

Evaluate imbalanced classification model on balanced testing sample

Why it would be too optimistic to compute presicion, recall and f1-score to evaluate a model trained for imbalanced classification on a balanced testing sample ?
Hector Blandin's user avatar
4 votes
1 answer
773 views

Combining 'class_weight' with SMOTE

This might sound a weird question, but I could not find enough details in sklearn documentation about 'class_weight'. Can we first oversample the dataset using SMOTE and then call the classifier with ...
Sarah's user avatar
  • 611
1 vote
0 answers
51 views

Binary classifier on imbalanced dataset yields weird PR curve

I have a dataset with ~6M points, 9 features and two classes. The minority class represents just under 2% of the data. The data is first divided into 100 batches and a different classifier is trained ...
Seb's user avatar
  • 111
6 votes
1 answer
5k views

Difference between sklearn make_pipeline and imblearn make_pipeline

Can anybody please explain the difference between sklearn.pipeline.make_pipline and imblearn.pipeline.make_pipline.
boredaf's user avatar
  • 161
6 votes
2 answers
558 views

Can we specify the number of data generated(minority class) using SMOTE?

I am trying to improve classification of imbalanced dataset creditcard fraud using SMOTE imbalanced_learn. But, in this it generates the data to 50%, can we give a specific number for the data to be ...
somorjit leichombam's user avatar
2 votes
1 answer
1k views

Positively skewed target label in regression

I have a dataset where the target label is positively skewed and produces a long tail, and currently I have a high residual on these values when experimenting with some linear, tree-based and neural-...
Ellio's user avatar
  • 93
2 votes
1 answer
406 views

SMOTE and oversampling with constraints

I'm trying to apply SMOTE to a dataset that has time-constraints. I have information about users visiting a website. For some features, there are time constraints, e.g having the first visit and the ...
Titus Pullo's user avatar
1 vote
0 answers
58 views

Different result between Rapidminer and Python imblearn

I'm currently working on imbalanced classification problem. However i found different result between SMOTE in rapidminer and SMOTE in imblearn (python). rapidminer SMOTE give 15-20% improvement on ...
moh_isa's user avatar
  • 11
1 vote
2 answers
794 views

A robust metric in the presence of class imbalance

When evaluating the performance of a multiclass classification problem, on a highly imbalanced dataset, what is the most robust metric for this purpose? I read a paper that states: "Average ...
Sarah's user avatar
  • 611
0 votes
1 answer
634 views

Best metric in imbalanced classification for multi-label classification

My test data are imbalanced, i tried to use the precision or the gmean as metrics for a multi-label learning model, but both metrics are not very informative. Is there any way to use for example the ...
Born New's user avatar
0 votes
2 answers
208 views

Dealing with the test set of imbalanced data

I am working on a problem dealing with unbalanced data that has a very specific request. I would like to know the following: When I have an imbalanced dataset and I do train test split, the test ...
tsumaranaina's user avatar
1 vote
1 answer
2k views

Improving accuracy on highly imbalanced dataset

I need some suggestions to improve my model accuracy. The training data shape is : (166573, 14) It has all int and float columns. I have dropped claims_daysaway column as most of values are NaN and ...
Praveenks's user avatar
  • 151
2 votes
1 answer
2k views

Multi class Imbalanced datasets under-sampling imblearn

I have an imbalanced dataset. I am looking to under-sample. Even though, the oversampling process takes less time, the model training takes a lot of time. I have taken a look at imbalanced-learn ...
Michael Schroter's user avatar
0 votes
0 answers
151 views

Deep learning(MLP) on multiclass classification. Model learns only one class

I am new to deep learning. I have imbalanced class data. I used one hot encoding and scaling to preprocess my data. I have used adamoptimizer as optimizer function and sparse categorical crossentropy ...
Bhupesh_decoder's user avatar
3 votes
3 answers
3k views

imbalanced dataset in text classififaction

I have a data set collected from Facebook consists of 10 class, each class have 2500 posts, but when count number of unique words in each class, they has different count as shown in the figure Is ...
mtesta010's user avatar
3 votes
1 answer
1k views

How to use SMOTENC inside the Pipeline?

I would greatly appreciate if you could let me know how to use SMOTENC. I wrote: ...
ebrahimi's user avatar
  • 1,307
1 vote
3 answers
22k views

imblearn error installing smote

I wanna install smote from imblearn package and I got the Following error: ...
Rawia Sammout's user avatar