Skip to main content
9 votes
Accepted

Why does data science see class imbalance as a problem for supervised learning when statistics does not?

It's generally not related to Data Science but what goes around; typically all sort of bad practice relating to laziness / looking for short term rewards. I wouldn't say DS is pushing for it but ...
Lucas Morin's user avatar
  • 2,319
6 votes

Deal with overlapping classes in classification modeling

You don’t have the information to reliably classify. When you have more features, this is hard to assess, but with just the two, you can visualize in a scatter plot like you have to see that the ...
Dave's user avatar
  • 3,979
6 votes

Preserving / fixing class imbalance

There are many references and guidance for this kind of question. I recommend you consider the metric that matters most. Consider recall precision, and/or F1. You might consider creating class weights ...
healthydata's user avatar
4 votes

Solve tough clustering problem with overlapping clusters

The Problem is that many clustering algorithms focus on distances (between points, clusters and so on). Especially at the connection between the two desired clusters, distances between points are ...
Broele's user avatar
  • 1,574
4 votes

Why do we need hyperparameter tuning in Scikit learn? Doesn't sk learn models by default give best model?

You are wrong. RandomForestClassifier does not try any hyperparameters. You need to give it the specific value for each of its hyperparameters. Given such ...
noe's user avatar
  • 27.1k
4 votes

Preserving / fixing class imbalance

Using Bayes theorem, we can write the posterior probability of class membership as: $P(C|x) = \frac{P(x|C)P(C)}{P(x)}$ The posterior probability of class membership is the ideal information we need ...
Dikran Marsupial's user avatar
3 votes
Accepted

Xgboost model predicting extreme values for events and non-events | Overfitting

This is not necessarily overfitting, but it may indicate data leakage i.e you are passing information to the model that is not supposed to be there it may be: Information that is generated after the ...
Multivac's user avatar
  • 3,009
3 votes

Car Make and Model detection

For detecting the make and model of cars from images with high accuracy across a large number of classes, I would recommend a convolutional neural network (CNN) architecture tailored for fine-grained ...
Multivac's user avatar
  • 3,009
3 votes

ROC curve for a perfect model, why is AUC 1.0?

The difficulty with ROC curves is to understand what happens when the threshold varies. There is no summing, the curve only depends on how many instances have TP/FP/TN/FN status for every threshold. A ...
Erwan's user avatar
  • 25.6k
3 votes

Why is my LSTM model not predicting well when predicting labels for a new dataset?

Your model is likely overfitting and you get an inflated validation score of 98% because of a data leak. Your idea of setting aside 3 of the time series for testing is good, but you missed to do the ...
Simon Larsson's user avatar
3 votes
Accepted

Train/test split of data, stratified based on label, but ensuring no athletes are In both train/test sets

I think you may use the concept of groups as implemented in scikit-learn. In GroupShuffleSplit you may set a column of groups. Then the split won't happen across groups. Either a group as a whole is ...
Avi T's user avatar
  • 66
3 votes

Fixing class imbalance vs Over-detecting in test data

"binary classifiers tend do better in terms of F1 scores when the class imbalance is at least reduced. However, this leads to over-predicting in the test data" This suggests that you need ...
Dikran Marsupial's user avatar
2 votes
Accepted

What is the benefit of the exponential function inside softmax?

Usually the softmax is applied to logits (you can consider them as unnormalized log-probabilities), which are the output of the neural net. The logits are unbounded, i.e. they lie in $(-\infty, \infty)...
Luca Anzalone's user avatar
2 votes
Accepted

Cluster/Similarity problem with two datasets of different cardinality

There are different possible approaches. Without closer look into your data it is hard to tell which one would be the best. In the following, I will list multiple approaches. Pivot Table This is the ...
Broele's user avatar
  • 1,574
2 votes
Accepted

Which Python lib to use for classify data without training any model?

I think what you are going to achieve is possible with recent advances in: zero-shot learning and few-shot learning can let you build your classifier with little or no training data.: However note ...
Mario's user avatar
  • 400
2 votes

What methods do top Kagglers employ for score gain?

Top Kagglers often employ a combination of traditional machine learning techniques and creative, out-of-the-box strategies to gain an edge in competitions. Here are some techniques: 1. Ensemble ...
lvvittor's user avatar
2 votes

What methods do top Kagglers employ for score gain?

There are many methods that can be employed to increase your score on a Kaggle competition. Here are a few examples: Advanced classification techniques: Using advanced classification techniques such ...
Multivac's user avatar
  • 3,009
2 votes
Accepted

How does oversampling or undersampling approch is going to help during the testing on real time data?

The key here is how you define "help" regarding the measurement of performance. Oversampling/undersampling may not help increasing accuracy. However, it may help increase other performance ...
noe's user avatar
  • 27.1k
2 votes

How to impute and aggregate data with ID variant variables for predictive modeling?

This sounds like you're having issues grappling with relational theory. You have focused on the ID column as though it identifies an observed example. But your narrative ("multiple services")...
J_H's user avatar
  • 1,130
2 votes

ROC curve for a perfect model, why is AUC 1.0?

An explanation I find more insightful is by noting the probabilistic interpretation of AUC. For any random pair of positive and negative instance, AUC is the probability that the model gives a higher ...
Passer By's user avatar
  • 121
2 votes

Why does data science see class imbalance as a problem for supervised learning when statistics does not?

Statisticians typically focus on probabilistic classification. In the way they build their models they are interested in predicting $P(Y|X) = P(X|Y)P(Y)/P(X)$. Now we find : The predicted ...
Ggjj11's user avatar
  • 216
2 votes

Why my simple resnet model overfit?

It looks like your dataset is tiny, so I wouldn't be surprised if your model picks the majority class most of the time. Here are a few things I'd do: Increase amount of data if possible Analyze ...
Valentin Calomme's user avatar
2 votes

How can I scale my data for a machine learning model in a way that preserves the relationship between columns?

Not a complete answer, but some clarifications to help frame things. Models that are arithmetically based can still produce your relationship: if the scaling is $\tilde{x}_i := (x_i - b_i)/m_i$, then ...
Ben Reiniger's user avatar
  • 12k
2 votes
Accepted

Data augmentation technique not working correctly

You should measure the performance on the same dataset to be a good head-to-head comparison. I suggest you create a non-augmented test set first, then train a simple SDG from the train set, and then ...
saiRegrefree's user avatar
2 votes

Public Email Classification Dataset but not Spam vs Ham

If I am understanding correctly, you want to create a model that takes an email body and assigns some probability to a pre-specified set of classes (feedback, complaint, lost and found, etc.) ...
AndrewJaeyoung's user avatar
1 vote

Adding multi-image context to a CNN

You can perform individual image classification using as input the whole set of related images as well. In order to do this, your initial input will be some 3d array of stacked 256x256 matrices and ...
Giovanni Amorim's user avatar
1 vote
Accepted

How can I approach this transactions data problem?

There are so many things to take into consideration but my answer will focus on some divergent thoughts to help you with your modeling. 1 - I would start by understanding the underlying distribution ...
NNZ's user avatar
  • 36
1 vote
Accepted

Why do we need hyperparameter tuning in Scikit learn? Doesn't sk learn models by default give best model?

FYI, as of scikit-learn 1.3.2, the RandomForestClassifier's default hyperparameters are: n_estimators=100 criterion='gini' max_depth=None min_samples_leaf=1 ... ...
lpounng's user avatar
  • 1,107
1 vote

Xgboost model predicting extreme values for events and non-events | Overfitting

A high score on the test set does not indicate overfitting. See Why 100% accuracy on test data is not good? ; you're not quite reaching perfect performance, but you're quite close, and in that seeing ...
Ben Reiniger's user avatar
  • 12k
1 vote

How to build a categorization system without a target variable?

Welcome to Data Science! The first step is to make clear for yourself and future models the output you are looking for. It appears it's clear in your mind which tests to priorities but it's not in the ...
fswings's user avatar
  • 378

Only top scored, non community-wiki answers of a minimum length are eligible