Questions tagged [smote]

Synthetic Minority Oversampling Technique (SMOTE) is an approach used for dealing with imbalanced datasets before running them through machine learning models.

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

When I use imblearn pipeline instead of sklearn pipeline all textual features disappear. Any solution?

This is my code below, I need to use SMOTENC to balance the dataset, which means I have to use the pipeline from the imblearn library. However, it does not recognize the CountVectorizer features ...
user avatar
0 votes
0 answers
16 views

Imbalanced classification

I've tried all kind of oversampling undersampling techniques and I've tried also weighted Xgboost ( the model I'm trying to improve) I couldn't surpass a very Bad F1 score : 0.09 What should I do
user avatar
1 vote
0 answers
71 views

SMOTE for image dataset

I'm working on Image augmentation with Smote. I'm confused that how can SMOTE be useful for an image dataset with containing 5955 images with four classes(2552,227,621,2555). Could anyone please help ...
user avatar
4 votes
1 answer
1k views

How does SMOTE work for dataset with only categorical variables?

I have a small dataset of 977 rows with a class proportion of 77:23. For the sake of metrics improvement, I have kept my minority class ('default') as class 1 (and 'not default' as class 0). My input ...
user avatar
  • 2,215
0 votes
0 answers
71 views

Can SMOTE be used for non-binary classification?

There is a class imbalance present in my dataset and I would like to balance the dataset. The dependent variable's features are (0,1,2,3,4). How do I make use of SMOTE, SMOTE-N, SMOTE-NC when if they'...
user avatar
1 vote
2 answers
95 views

Why does class_weight usually outperform SMOTE?

I'm trying to figure out what exactly class_weight from sklearn does. When working with imbalanced datasets, I'm always using ...
user avatar
  • 161
4 votes
2 answers
241 views

Why SMOTE is not used in prize-winning Kaggle solutions?

Synthetic Minority Over-sampling Technique SMOTE, is a well known method to tackle imbalanced datasets. There are many papers with a lot of citations out-there claiming that it is used to boost ...
user avatar
0 votes
0 answers
466 views

Applying SMOTE on time series data

I have a dataset that consist of student grades and it's based on a time series. I used LSTM to predict the student future grade. Can I apply SMOTE on this dataset to ensure that the model will not be ...
user avatar
  • 101
1 vote
1 answer
272 views

SMOTE for multi-class balance changes the shape of my dataset

So I have a dataset of shape (430,17), that consists of 13 classes (imbalanced) and 17 features. The end goal is to create a NN which btw works when I import the imblanced dataset, however when i try ...
user avatar
  • 13
4 votes
2 answers
1k views

Imbalanced Dataset: Train/test split before and after SMOTE

This question is similar but different from my previous one. I have a binary classification task related to customer churn for a bank. The dataset contains 10,000 instances and 11 features. The target ...
user avatar
  • 65
0 votes
1 answer
152 views

Is it necessary to use stratified sampling if I am using SMOTE already?

I have already applied SMOTE to my imbalanced dataset with more than 300K observations. Does it still make sense to use stratified K-fold cross validation rather than simply ordinary K-fold cross ...
user avatar
0 votes
0 answers
12 views

Oversampling techniques for a class with 1 sample

I have 5 classes, one of them having only one sample. I've been researching techniques to oversample such as SMOTE and Bootstrapping but they do not work for the class with only one sample. I am ...
user avatar
  • 13
1 vote
0 answers
22 views

Training data with one class

I have a real-time scenario, finding out whether a transaction is fraudulent or not. I have a dataset that contains only fraudulent transactions. For any binary classification algorithm, we may need ...
user avatar
  • 11
1 vote
1 answer
129 views

Train score is very lower than Test score, is that normal?

I am working on very imbalanced dataset, I used SMOTEENN (SMOTE+ENN) to rebalance it, the following test is made using Random Forest Classifier : My train and Test ...
user avatar
  • 45
0 votes
3 answers
138 views

Confusion Matrix before and after SMOTE is same

I am working with a very unbalanced dataset and I used SMOTE (for training data only). However, I did not understand why the results before and after SMOTE are the same. The attached confusion matrix ...
user avatar
  • 45
0 votes
0 answers
170 views

How to use SMOTE to rebalance multiclass dataset when the target is one hot encoded with pd.get_dummies?

I'm using a multiclass dataset (cic-ids-2017), which is very imbalanced. I have already encoded the categorical feature (which is the target) using ...
user avatar
  • 45
0 votes
0 answers
93 views

Train/ Test split on small dataset along with SMOTE

I have a binary classification imbalanced dataset with 1000 samples ( 15% of class 1, 85% of the rest). My main goal is to build a robust classifier using the following approach. Wanted to know if ...
user avatar
1 vote
2 answers
132 views

How to properly use oversampling without inflating results?

I am using with a tiny private dataset (over 192 samples) with 4 classes. A preprocessing step is trivial in order to do any classification. Among feature selection and extraction techniques, i ...
user avatar
1 vote
1 answer
356 views

How to use SMOTE in Stacking in SKLearn?

I have a data set X,y and split them to train and test data. ...
user avatar
  • 181
0 votes
2 answers
716 views

Is it good practice to use SMOTE when you have a data set that has imbalanced classes when using BERT model for text classification?

I had a question related to SMOTE. If you have a data set that is imbalanced, is it correct to use SMOTE when you are using BERT? I believe I read somewhere that you do not need to do this since BERT ...
user avatar
  • 133
0 votes
1 answer
29 views

Looking for binary class datasets with high class imbalance, that also have intra-class imbalance in the minority class

Newbie question alert... For a college project I want to compare a few variants of SMOTE in terms of how much they improve classification of the minority class, over using random oversampling. I have ...
user avatar
4 votes
1 answer
156 views

Why removing rows with NA values from the majority class improves model performance

I have an imbalanced dataset like so: df['y'].value_counts(normalize=True) * 100 ...
user avatar
  • 335
1 vote
0 answers
280 views

How do I handle class imbalance for text data when using pretrained models like BERT?

I have a skewed dataset consisting of samples of the form: Category 1 10000 Category 2 2000 Category 3 400 Category 4 300 Category 5 100 The dataset ...
user avatar
1 vote
0 answers
62 views

Follow up question regarding Upsampling for Imbalanced Data and the use of ADASYN instead of SMOTE

I have a follow-up question regarding this topic. I have been working on a project predicting success(1) or failure(0) for organizations by using the Decision Tree and Random Forest algorithms. My ...
user avatar
0 votes
1 answer
444 views

SMOTE train test split with validation data [duplicate]

Would like to ask, in which way to use SMOTE? My dataset is imbalanced and a multiclass problem. As I read in many posts, use SMOTE method only for the training dataset (X_train and y_train). Not for ...
user avatar
  • 329
-1 votes
1 answer
57 views

Model to choose with Cross Validation or not?

I made different tests on an imbalanced dataset and got these results: Model 1 = train test validation split + Cross Validation(cv=10) --> f1'micro' 0,95 Model 2 = train test split + smote method ...
user avatar
  • 329
7 votes
1 answer
2k views

Why you shouldn't upsample before cross validation

I have an imbalanced dataset and I am trying different methods to address the data imbalance. I found this article that explains the correct way to cross-validate when oversampling data using SMOTE ...
user avatar
  • 335
1 vote
1 answer
296 views

What's the order in applying SMOTE transformation in a pipeline?

Here's the thing, I have an imbalanced data and I was thinking about using SMOTE transformation. However, when doing that using a sklearn pipeline, I get an error because of missing values. This is my ...
user avatar
  • 11
2 votes
1 answer
408 views

SMOTE oversampling for class imbalanced dataset introduces bias in final distribution

I have a problem statement where percentage of goods (denoted by 0) is 95%, and for bads (denoted by 1) it is 5% only. One way is to do under sampling of goods so that model understands the patterns ...
user avatar
  • 207
2 votes
1 answer
1k 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 ...
user avatar
2 votes
2 answers
239 views

Main options on how to deal with imbalanced data

As far as I can tell, broadly speaking, there are three ways of dealing with binary imbalanced datasets: Option 1: Create k-fold Cross-Validation samples randomly (or even better create k-fold ...
user avatar
  • 21
-1 votes
1 answer
2k views

How to increase a low recall value?

I am dealing with a HR Attrition Dataset which is highly unbalanced. I used Balancing technique like SMOTE to generate synthetic data and then used Gaussian Naive Bayes to Classify the Attrition. ...
user avatar
0 votes
1 answer
287 views

How to best handle imbalanced text classification with Keras?

I implemented a text classification model using Keras. Most of the datasets that I use are imbalanced. Therefore, I would like to use SMOTE to handle said imbalance. I tried both on plain text, and ...
user avatar
0 votes
1 answer
140 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 ...
user avatar
1 vote
0 answers
428 views

Imblanced-data: Need assistance with SMOTE technique for a CNN input

I am trying to apply the SMOTE sampling technique to over-sample the minority class of a multiclass (5-class) problem using the convolutional neural network. As far CNN requirement, the input shape ...
user avatar
  • 113
1 vote
1 answer
255 views

Using MultiLabelBinarizer for SMOTE

This is my first NLP project. I'm trying to use SMOTE for a classifier with 14 classes. I need to convert the classes into an array before using SMOTE. I tried using MultiLinearBinarizer but it does ...
user avatar
1 vote
0 answers
86 views

Computing Rare values After SMOGN - Imbalanced Regression

I am dealing with a regression problem where I have the phenomenon "Imbalanced Regression". In my problem, the most relevant events are scarcely represented. In order for me to evaluate my models' ...
user avatar
  • 187
3 votes
0 answers
624 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 ...
user avatar
  • 163
3 votes
1 answer
9k 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 ...
user avatar
5 votes
2 answers
4k views

SMOTE for multilabel classification

I have a dataset with 77 different labels. Each sample has one or more of these labels. I did some data analysis and found out that the dataset is highly imbalanced - there are a large number of ...
user avatar
0 votes
1 answer
395 views

Getting feature vectors from CatBoost pool

I have a dataset with some numerical and categorical features and I am trying to apply CatBoost for categorical encoding and classification. Since my dataset is highly imbalanced, with a large number ...
user avatar
3 votes
1 answer
240 views

Unbalanced data set - how to optimize hyperparams via grid search?

I would like to optimize the hyperparameters C and Gamma of an SVC by using grid search for an unbalanced data set. So far I have used class_weights='balanced' and selected the best hyperparameters ...
user avatar
  • 393
2 votes
2 answers
4k views

Passing data to SMOTE after applying train/test split

I'm trying to resample my dataset after splitting it into train and test partitions using SMOTE. Here's my code: ...
user avatar
  • 63
3 votes
2 answers
2k views

Resampling with Python SMOTE

I am trying to do a simple ML re-sampling approach after the train-test split. However when I do this, it throws the below error. Can you please help me understand what this error is about? ...
user avatar
  • 2,215
1 vote
1 answer
401 views

What are the standard parameters values for SMOTE technique?

I'm working on an imbalanced class data set (200 samples) with 2 classes, first class has 50 sample and second has 150 sample. My questions: When I use SMOTE technique on my data set my total ...
user avatar
2 votes
1 answer
257 views

On which step should use SMOTE technique for over sampling?

I want to use SMOTE technique for over sampling but I don't know on which step on pre-processing I should use it. My preprocessing steps are: Missing values Removing Outliers Smoothing Data Should ...
user avatar
1 vote
1 answer
244 views

What are advantages of oversampling over changing threshold for unbalanced classes?

Let's say that I have unbalanced data set that has two classes, and I am using Random Forest to make my predictions. Random forest will be biased towards the majority class, which will cause low ...
user avatar
  • 886
1 vote
1 answer
474 views

Adjust predicted probability after smote

i have an imbalance data set and I used smote to oversample the minority class and undersample the majority class. now, I want to check the test AUC using predict_proba of the model. I have two ...
user avatar
  • 155
0 votes
1 answer
227 views

Variation in output of Logistic Regression when using SMOTE

I am working on a logistic regression case with an imbalance in the target variable. To fix this I am using SMOTE (Synthetic Minority Oversampling Technique), but each time I run my regression model, ...
user avatar
  • 161
1 vote
2 answers
3k views

How do I run SMOTE on image data using the packages available?

I need to balance some image datasets, how do I use SMOTE variants or the imblearn SMOTE method with images? I can't figure out how to, since they seem to be working only with numerical datasets.
user avatar
  • 11