Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
129 views

Machine Learning Binary Classification Model on a Small Tabular Imbalanced Dataset - Improving Performance

I have a dataset that is fairly small (15,000 rows), with 10 features for a model to learn from. It is not possible to increase the size of this dataset. I am using machine learning for binary ...
user167433's user avatar
2 votes
1 answer
45 views

Techniques for solving the problem with an unbalanced data set

I am trying to solve a problem with an unbalanced data set. I have two classes, one is for patients with risk (1), the other for patients without risk (0). I have a larger number of patients without ...
Naty's user avatar
  • 21
0 votes
0 answers
36 views

Multiclass PyTorch neural net is stuck predicting 1 class, even with "simple" dataset

I'm trying to predict a class of some data, and am struggling. So, to debug I created a simple test dataset, yet I am having the same issues. I've tried adding weighting, and lastly adding a column ...
Russ's user avatar
  • 1
0 votes
0 answers
97 views

How to handle imbalance in input variables?

Currently working on a finance dataset which has more than 20 input variables with high imbalance. [Apparently, the target variable is also imbalanced (for this I am currently considering to handle it ...
bh7781's user avatar
  • 1
4 votes
2 answers
2k views

Flipping the labels in a binary classification gives different model and results

I have an imbalanced dataset and I want to train a binary classifier to model the dataset. Here was my approach which resulted into (relatively) acceptable performance: 1- I made a random split to get ...
Farzad's user avatar
  • 43
0 votes
0 answers
181 views

Different training score but same test score when using pipeline

I have a problem that produce different training score when using pipeline and manual. MANUAL : ...
Jovian Aditya's user avatar
2 votes
2 answers
1k views

Plotting a no-skill model in a precision-recall curve

I am following this tutorial to apply threshold tuning using precision-recall curve for an imbalanced dataset Within the tutorial, a no-skill model is defined as: A no-skill model is represented by a ...
sums22's user avatar
  • 447
1 vote
0 answers
24 views

Handling imbalanced Feature (X) not lavbel (Y) in machine learning

I am very new to this field and have done a decent amount of research on this, but every time, I stumble upon handling the imbalanced label by using f1 score, recall, precision as metrics, and using ...
plutolaser's user avatar
4 votes
2 answers
7k 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 ...
KK_o7's user avatar
  • 67
1 vote
0 answers
201 views

Should I use Pad Sequence when using Word Vectors?

I have an unbalanced text data set. I want to use word vectors to embed words. When I use pad sequence? Before or after the word vector? I tried it, after the word vector I used pad sequence but my ...
grace's user avatar
  • 13
1 vote
1 answer
244 views

Imbalanced classification task – Discrepancy between learning curves and test set evaluation

I have a binary classification task related to customer churn for a bank. The dataset contains 10,000 instances and 11 features. The target variable is imbalanced (80% remained as customers (0), 20% ...
KK_o7's user avatar
  • 67
2 votes
2 answers
317 views

Influence of imbalanced feature on prediction

I want to use XGB regression. the dataframe is coneptually similar to this table: ...
Reut's user avatar
  • 299
1 vote
0 answers
89 views

Is it right method to remove instances that are hard to predict before train test split?

In a binary classification problem, I have a slightly unbalanced medical dataset with class distribution: 0:5600, 1:1500 0 without a problem and 1 with a problem. I tried many pipelines, automls, and ...
DOT's user avatar
  • 113
0 votes
1 answer
152 views

Data simulation using make_classification in Python

I have a question about data simulation in Python. I deal with the classification of imbalanced data and want to test the effectiveness of different methods on simulated data. I have seen in various ...
Marni's user avatar
  • 21
0 votes
1 answer
625 views

Logistic regression with unbalanced data, scoring based only on rare class

I have a dataset off app. 600.000 data points in which 0.2% (1.200 samples) is labelled as signifying a rare event. I want to use logistic regression to help me predict this rare event, but even when ...
Nick W's user avatar
  • 15
0 votes
1 answer
28 views

Unbalanced training set from balanced data

I am looking to get an unbalanced training set with a given ratio of classA:classB from a dataset without regarding if it is balanced or not. The point is to analyze the influence of data imbalance on ...
jelczyn's user avatar
0 votes
1 answer
2k views

How does class_weight work in Decision Tree?

I am interested in Cost-Sensitive learning. And I am trying to understand how class_weight in DecisionTree works in terms of math. I read a lot of articles that ...
Marni's user avatar
  • 21
2 votes
1 answer
1k views

Adjusting imbalance in classification problem reduce precision, accuracy but increase recall

I've learned that adjusting imbalanced data when training a CNN affects model performance which got me thinking "what about in ML?" so I've done some testing on my own, you can check it out ...
haneulkim's user avatar
  • 479
0 votes
1 answer
84 views

Any pythonic way to auto determine imbalance class problem, specially in multiclass scenario?

A data is imbalanced if a target class proportions are unequal and typically, heavily biased. But, what is the exact measurement of this heavy bias? Before applying imbalance techniques (SMOTE, ADASYN,...
Kaustuv's user avatar
  • 101
3 votes
1 answer
297 views

Features selection in imbalanced dataset

I have some doubts regarding an analysis. I have a dataset with class imbalance. I am trying to investigate some information from that data, e.g., how many urls contain http or https protocols. My ...
V_sqrt's user avatar
  • 295
4 votes
1 answer
587 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 ...
sums22's user avatar
  • 447
3 votes
1 answer
810 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
0 answers
237 views

Stratified K Fold Cross Validation in Orange: python script

I am using Orange to predict customer churn and compare different learners based on accuracy, F1, etc. As my problem is unbalanced (10% churn - 90% not churn), I want to oversample. However, when ...
Emma Bartholomeeusen's user avatar
0 votes
1 answer
209 views

Model accuracy: how to determine it?

I have some doubts regarding the approach to building a classifier such as Multinomial Naive Bayes or SVM. I will go through the steps to see if the approach is fine. I do have not a lot of experience ...
V_sqrt's user avatar
  • 295
0 votes
2 answers
527 views

What makes the validation set a good representative of the test set? [closed]

I am developing a classification model using an imbalanced dataset. I am trying to use different sampling techniques to improve the model performance. For my baseline model, I defined an AdaBoost ...
sums22's user avatar
  • 447
11 votes
1 answer
4k 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 ...
sums22's user avatar
  • 447
2 votes
0 answers
542 views

How can I use the Brier Skill Score in cross-validation for imbalanced data?

I wish to use search for model hyper-parameters (by a grid search) using the Brier score as the scoring method (see code below): ...
mathella's user avatar
1 vote
1 answer
71 views

How to handle such a large class imbalance in text data?

I am working on a multi class text classifier. The total number of class that are there is 265 and total number of rows is 20,000. The class with largest number of occurrences has 6000 samples and ...
PranavM's user avatar
  • 31
1 vote
0 answers
40 views

How to fix class imbalance in dialogue (text) time series data?

I have a dataset that looks like this: ...
connor449's user avatar
  • 133
2 votes
0 answers
682 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 ...
arilwan's user avatar
  • 123
1 vote
2 answers
624 views

Weights for unbalanced classification

I'm working with an unbalanced classification problem, in which the target variable contains: np.bincount(y_train) array([151953, 13273]) i.e. ...
yatu's user avatar
  • 303
3 votes
0 answers
824 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
1 vote
2 answers
219 views

Different performance for splitting into test/train data vs. using cross-validation

I am training a linear model using the following scikit-learn setup: ...
Make42's user avatar
  • 752
0 votes
1 answer
284 views

Undersampling improvement F1-score

Im doing a 2-class classification project for an imbalanced data set. The imbalance is about 18%/82%. Im noticing a huge improvement in F1-score when I under-sample; from 16% without under-sampling to ...
19dr95's user avatar
  • 31
2 votes
1 answer
215 views

Oversampling possible improvement

I am currently solving a classification problem for an imbalanced data set (approximately 17% of the minority class). I split the data using a stratified k-fold split from sklearn (Stratified shuffle ...
19dr95's user avatar
  • 31
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
2 answers
225 views

Why does downsampling leads classification to only predict one class?

I have a multi-class classification problem. It performs quite well but on the least represented classes it doesn't. Indeed, here is the distribution : And here are the classification results of my ...
Revolucion for Monica's user avatar
1 vote
0 answers
425 views

Ensure class balanced batches while hyperparameter tuning keras models with grid search

Ensuring class balanced batches while training keras models is possible using fit_generator method. I used imblearn.keras.BalancedBatchGenerator for that and it works fine! But I wanted to do that ...
Amine Benatmane's user avatar
9 votes
3 answers
5k views

Is There a Way to Re-Calibrate Predicted Probabilities After Using Class Weights?

I have classification data with far more negative instances than positive instances. I have used class weights in my models and have achieved the discrimination I want but the predicted probabilities ...
from keras import michael's user avatar
2 votes
1 answer
368 views

How to evaluate model with imbalanced data binary classification?

I have a binary classification problem. I am using Area under precision recall curve as the evaluation metric. The dimensions of my data are (211, 1361). The data is imbalanced so I have used various ...
CyberPunk's user avatar
  • 141
6 votes
2 answers
658 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
3 votes
1 answer
103 views

Machine Learning: Balanced training set but highly unbalanced prediction set? How to adjust?

I am trying to train a model to detect gender in a dataset of CEO speeches. Here are the datasets that I have: Final Dataset: 20K CEO voices analyzed (around 95% male) Testing dataset (?): 1K CEO ...
user1029296's user avatar
4 votes
0 answers
527 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-...
npm's user avatar
  • 141
1 vote
2 answers
115 views

Determining threshold in an area with very few samples of positive label

I have a binary classification task where I want to either keep or discard samples. I have about a million samples, and about 1% should be kept. I want to discard as much as possible, but discarding ...
Gnoevoet'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
2 votes
1 answer
3k 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
3 votes
0 answers
436 views

Adjust class weights due to class imbalance and class importance Multi class classification XGBoost

With respect to this question and the answer given by @Esmailian, Would anyone be able to let me know if Class B has a higher importance or the positive class ( i.e. it needs to have a higher ...
Michael Schroter's user avatar
2 votes
2 answers
5k views

How correctly assign weights to minority class or samples in ANN?

Having an imbalanced dataset. Abnormal class rate is %5. To handle with the problem I have gave extra weight to the abnormal class. However, It did not change anything. Here is my code: ...
Ram's user avatar
  • 161