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
0answers
7 views

SMOTE for Image regression?

Can you use something like SMOTE for an image regression task, where the target value is very skewed and imbalanced? I already tried using classic augmentation techniques like flipping, cropping, etc. ...
1
vote
0answers
20 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 ...
1
vote
1answer
36 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 ...
0
votes
3answers
41 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 ...
0
votes
0answers
21 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 ...
0
votes
0answers
26 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 ...
1
vote
2answers
21 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 ...
1
vote
1answer
128 views

How to use SMOTE in Stacking in SKLearn?

I have a data set X,y and split them to train and test data. ...
0
votes
1answer
109 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 ...
0
votes
0answers
17 views

How to create training dataset based on sampled or original data?

I am trying to used SMOTE and Feature Selection by following this paper http://jad.shahroodut.ac.ir/article_825_679b8f128dec2874a8fbc314fc922127.pdf In this paper, the authors have mentioned about 4 ...
0
votes
1answer
22 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 ...
4
votes
1answer
104 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 ...
1
vote
0answers
118 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 ...
1
vote
0answers
33 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 ...
0
votes
0answers
52 views

Overfitting in imbalanced dataset

I am working on a dataset related to an insurance company and the objective is to predict if the insurance buyer will claim their travel insurance or not. Training data: https://raw.githubusercontent....
0
votes
0answers
18 views

How many instances should be synthesized for each class when using over-sampling techniques?

As for an imbalanced multi-class dataset, how many instances should be synthesized for each class if we use over-sampling techniques such as SMOTE? For example, there is 4 class including 'A', 'B', 'C'...
0
votes
1answer
130 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 ...
-1
votes
1answer
44 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 ...
7
votes
1answer
636 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 ...
1
vote
0answers
120 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 ...
0
votes
0answers
33 views

SMOTE for imbalance data

I am dealing with data which has only categorical features, whose values are just 0 or 1 and it is imbalance data. So, is it good to try smote because it will try to generate new data points. but, how ...
2
votes
1answer
240 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 ...
2
votes
1answer
487 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 ...
2
votes
2answers
106 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 ...
-1
votes
1answer
794 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. ...
0
votes
1answer
136 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 ...
0
votes
1answer
91 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 ...
1
vote
0answers
238 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 ...
1
vote
1answer
167 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 ...
1
vote
0answers
56 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' ...
3
votes
0answers
328 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 ...
2
votes
1answer
4k 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 ...
4
votes
2answers
2k 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 ...
0
votes
1answer
222 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 ...
3
votes
1answer
90 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 ...
2
votes
2answers
3k 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: ...
3
votes
2answers
1k 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? ...
1
vote
1answer
226 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 ...
1
vote
1answer
92 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 ...
1
vote
1answer
117 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 ...
1
vote
1answer
291 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 ...
0
votes
1answer
174 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, ...
1
vote
2answers
2k 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.
6
votes
2answers
4k views

Oversampling/Undersampling only train set only or both train and validation set

I am working on a dataset with class imbalance problem. Now, I know one needs to oversample or undersample only the train set and not the test set. But my issue is: whether to oversample the train set ...
3
votes
1answer
3k views

SMOTE vs SMOTE-NC for binary classifier with categorical and numeric data

I am using Xgboost for classification. My y is 0 or 1 (true or false). I have categorical and numeric features, so theoretically, I need to use SMOTE-NC instead of ...
4
votes
1answer
238 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 ...
1
vote
0answers
43 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 ...
1
vote
1answer
19 views

SMOTE for multi-instance learning i.e num_rows(x_train) > num_rows(y_train)

I have an imbalanced dataset and I wish to predict classes(0 or 1). Sample x_train: ...
3
votes
2answers
91 views

SMOTE on training data

The SMOTE could only be performed on the training data, so how can we do it using Weka? It means we have to put the training and test data in two separate files and run the SMOTE on the training file, ...
3
votes
0answers
330 views

How to apply oversampling when doing Leave-One-Group-Out cross validation?

I am working on an imbalanced data for classification and I tried to use SMOTE previously to oversampling the training data. However, this time I think I need to use a leave-on group out (LOGO) cross-...