Questions tagged [binary-classification]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5 votes
1 answer
5k views

How to choose the right threshold for binary classification?

I am currently working on the titanic dataset from Kaggle. The data set is imbalanced with almost 61.5 % negative and 38.5 positive class. I divided my training dataset into 85% train and 15% ...
Joe's user avatar
  • 75
4 votes
2 answers
110 views

Meaningfully compare target vs observed TPR & FPR

Suppose I have a binary classifier $f$ which acts on an input $x$. Given a threshold $t$, the predicted binary output is defined as: $$ \widehat{y} = \begin{cases} 1, & f(x) \geq t \\ 0, &...
Alexandru Dinu's user avatar
4 votes
3 answers
181 views

Timing of applying random oversampling on the dataset

I tried to learn classification using machine learning algorithms. I went through Breast Cancer - EDA, Balancing and ML the notebook. In this notebook ...
Encipher's user avatar
  • 359
3 votes
3 answers
874 views

How are scores calculated for each class of binary classification

The formula for Precision is TP / TP + FP, but how to apply it individually for each class of a binary classification problem, For example here the precision, recall and f1 scores are calculated for ...
Jainam Shroff's user avatar
3 votes
1 answer
376 views

How do you add negative class sample for binary classification?

How do you prepare the negative dataset for binary classification? Let us say that I am building a classifier that has to classify whether the input image is of a car or not. I already have a dataset ...
imtiaz ul Hassan's user avatar
3 votes
1 answer
56 views

What does precision-recall curve and ROC curve tell us abouth threshold invariance

Consider a binary classification problem. Intuitively, a value for the area under the curve (for both curves) very close to 1, shows that the curve is almost L-shaped. Thus, this means that the value ...
liakoyras's user avatar
  • 636
3 votes
1 answer
47 views

How to combine binary classification with patient stratification?

I am working on a binary classification model (healthy/diseased) based on gene expression data of different patients. As a second task, I would like to stratify these patients and find subgroups. I ...
vhio's user avatar
  • 31
2 votes
2 answers
1k views

Which machine learning algorithms are more suitable for binary classification?

We know that there are many different types of classification algorithms. But among the different categories of classification algorithms, which algorithms are suitable for binary classification and ...
AMZ's user avatar
  • 153
2 votes
2 answers
625 views

Binary Classification with Very Small Dataset (<40 samples)

I'm trying to perform binary classification on a very small dataset, consisting of 3 negative samples and 36 positive samples. I've been testing different models from scikit-learn (logistic regression,...
apcuevw's user avatar
  • 23
2 votes
3 answers
96 views

What could go wrong if I sample before classification?

I have a million entries in a table that I can use to train a binary classifier. Only 30 thousand of them are positive. Is there anything fundamentally wrong with selecting around 30 thousand negative ...
Bruce's user avatar
  • 196
2 votes
1 answer
30 views

Changing model architecture doesn't impact results

I am currently learning binary classification. The problem is classifying positive and negative movie reviews. The dataset is 25,000 reviews with each review represented by 10,000 of the most used ...
Omer Mualem's user avatar
2 votes
1 answer
153 views

Finding research papers for a dataset

I found a breast cancer dataset on Kaggle. Here is the link - https://www.kaggle.com/datasets/reihanenamdari/breast-cancer I would like to how could I find out which research papers use this dataset ...
Encipher's user avatar
  • 359
2 votes
1 answer
48 views

Top 2% of scores of a binary classifier are 100% class 1

I have a binary classification model (Xgboost) that is supposed to be predicting whether a customer will be purchasing a service. Overall the metrics are satisfactory ~.67 AUC, ~30% precision and ~40%...
Mouad_S's user avatar
  • 121
2 votes
0 answers
16 views

Obtaining threshold based rules for classification problem

Suppose there are X1...Xn numerical variables predicting a target variable Y (0 or 1) Objective: to obtain the best possible thresholds and combinations of X1...Xn that can predict Y Example: (X1>...
Sunit Gautam's user avatar
2 votes
2 answers
1k views

Is it vital to do label encoding with target variable

Should I always use label encoding while doing binary classification?
Rus Pylypyuk's user avatar
1 vote
3 answers
111 views

ROC Curve for model validation

Is there a general approach that the ROC curve can be used for to validate a model? My understanding is that we can use it to compare different threshold values to determine the best, or even see how ...
user143064's user avatar
1 vote
1 answer
690 views

How can SHAP feature importance be greater than 1 for a binary classification problem?

Let's say I build a binary classification model to predict survival on the Titanic. I then use SHAP to get feature importance for each feature. I see that the SHAP importance for the top feature, <...
Gaurav Bansal's user avatar
1 vote
2 answers
54 views

Classification of data points using vertical lines through visualisations

I am currently doing my master's thesis and at the end of finishing it, but there are some questions raised by my supervisor. I have answered most of the questions, but only one question is remaining ...
user1791442's user avatar
1 vote
1 answer
23 views

How do I best approach a multiple-target binary classification in Tensorflow/Keras?

I currently have eight features which are either categorical or continuous variables. My targets are many (~1000) binary variables. So far I have attempted skmultilearn and sklearn.multioutput. I ...
FoolsGold1997's user avatar
1 vote
1 answer
34 views

How to bias a neural network towards one category in binary classification?

I have a basic sequential neural network built with TensorFlow. ...
Chandler Kenworthy's user avatar
1 vote
1 answer
96 views

Probability distribution of probabilities

We can get the prediction probabilities of a binary classifier from sklearn's API using the predict_proba method. Is it reasonable to expect that the shape of a histogram plotted for the prediction ...
zebinx's user avatar
  • 11
1 vote
1 answer
265 views

Select threshold (cut-off point )for binary classification by desired fpr persentage value

I want to recreate catboost.utils.select_threshold(desc) method for CalibratedClassifierCV model. In Catboost I can select ...
Michael's user avatar
  • 131
1 vote
2 answers
56 views

Validate Unsupervised Binary Classification

I’m working on a fully unsupervised anomaly detection problem. Since it’s completely unsupervised, I’m having hard times in defining some metrics to kind of validate the results (I run several ...
fpialcoi_o's user avatar
1 vote
1 answer
362 views

How to use confidence labels?

I have 2 sets of training data in csv files. The training data have class labels, 1 for memorable, and 0 for not memorable. In addition, there is also a confidence label for each sample. The class ...
user avatar
1 vote
1 answer
417 views

Improving roc auc score when accuracy is good

I have got a binary classification problem with large dataset of dimensions (1155918, 55) Also dataset is fairly balanced of 67% Class 0 , 33% Class 1. I am getting test accuracy of 73% in test set ...
Shubh's user avatar
  • 198
1 vote
1 answer
50 views

Where shall I use odds logarithm and when shall I use sigmoid in logistic regression?

I have been interested in DS and ML recently and logistic regression was on of the first algorithms I learned. In my first course it was said that ln(p/(1-p) was used for the logistic regression. But ...
No Name's user avatar
  • 21
1 vote
1 answer
20 views

Using precision as a metric - how to gauge if more TP's

So precision is calculated as tp/(tp+fp) But this doesn't seem to be a good way to assess a model as both of the below would give a result of 1? Binary Classification ...
Lewis Morris's user avatar
1 vote
2 answers
663 views

Why does my InceptionV3 model give a high training accuracy (99%), a high validation accuracy (95%+) but a very low testing accuracy (55%)?

Note: Please go through this in its entirety. My objective here is not just to get a high testing accuracy but to explain why it is so low in spite of validation accuracy being so high. I am a ...
Abhishek Chakravorty's user avatar
1 vote
1 answer
116 views

ZeroR as performance baseline for binary classfication model?

It is known that ZeroR model is used predict the majority class in a given data set. Having said that, is ZeroR a suitable performance baseline provided one has a balanced data set (50/50)? If not, ...
JavaApprentice's user avatar
1 vote
1 answer
118 views

precision and recall is zero

Why my model shows metrics like this? While my model was training recall and precision was equal to zero? I trying to do binary classification of mushrooms [edible, poisonous]. I have CNN model with ...
User Name's user avatar
1 vote
0 answers
18 views

How to calculate threshold values for a simple binary classification model

Consider a binary classification problem with two features. Let's assume that the higher the value of each feature the more likely a datapoint is to be positively classified. Additionally assume we ...
Daniel Wyatt's user avatar
1 vote
0 answers
18 views

Data filtering framework

I have procurement data that needs to be labeled with product categories. It's tabular data, containing 700k rows and a mix of data types (dates, free text, floats, etc.) The product set we currently ...
Benjamin B.'s user avatar
1 vote
0 answers
22 views

Best way to represent a version feature based on percentiles

We're training a binary classifier in AutoML, and one of the features consist of browser versions. Currently these versions are provided "normalized" to the model, according to the ...
Gabriel Ballesteros's user avatar
1 vote
0 answers
24 views

Repeating values caught with a binary classifier

If my machine is broken, it starts to repeat certain channels. Thing is if there are no out-liars, it is difficult to tell it's broken as we would expect all data points to be around the same value. I ...
gotenks's user avatar
  • 11
1 vote
1 answer
51 views

How to customize logistic regression for this case?

I have a binary classification problem, with a dataset comprising of several features. When I train LogisticRegression on it, I get large number of false positives ...
matttree's user avatar
1 vote
0 answers
36 views

Fractional Differencing/Differentiation for Non-Time based Model; Look-ahead bias?

I have time-series data, but instead of using a time-based model like RNN, I've decided to approach my classification problem using an lgbm classifier. To do so, I have modified the data, such that ...
Michael Mech's user avatar
1 vote
1 answer
129 views

Is binary classification the right choice in this case?

I am somewhat new to text classification and I have some questions if you folks can help: I have some text I need to be able to classify as belonging to a single class or not (usually 1-10 sentences ...
superqd's user avatar
  • 115
1 vote
0 answers
29 views

Suggestions for binary time-series-classification model for small dataset

Hopefully I´m at the right place for my question: I´m looking for suggestions for models to use to classify multivariate time series. I´m trying to find a way of classifying the behaviour of motors ...
sensation96's user avatar
1 vote
1 answer
627 views

Finding logistic loss/negative log likelihood - binary logistic regression classification

I am new to ML and data science and am struggling with a simple problem. In my problem, I am given a series of datapoints $X_i$ where $X_i = (x_{i1}, x_{i2})$ with each data point having a label $y_i$ ...
Slip's user avatar
  • 11
1 vote
1 answer
182 views

Binary Classifier , when Data Points are very less and number of features are very large [closed]

I am building a Binary Classifier. There is no Real World Scenario Problem Statement, We have just given only the data set and some guidelines. Number of features : 2040 All features are in decimal ...
vaibhav's user avatar
  • 21
1 vote
1 answer
215 views

Binary document classification using keywords for a very small dataset

I have a set of 150 documents with their assigned binary class. I also have 1000 unlabeled documents. Each document is about the length of a journal paper. Each class has 15 associated keywords. I ...
s21's user avatar
  • 13
1 vote
1 answer
844 views

Loss drops to NaN after a short time for a time series classification

here is my model code for a binary classification of a time series: ...
Tollpatsch's user avatar
1 vote
0 answers
315 views

How to pass manually split data to cross-validation

I have to perform a binary classification. My dataset is quite small 280 samples and quite imbalanced (1:10 ratio). I kept around 100 sample as testing and about 140 for training. My input variables ...
Luigi87's user avatar
  • 111
1 vote
0 answers
31 views

Testing a Binary Classifier

I have been training a binary multilayer perceptron on a database made out of roughly 3600 0 values, and 4 1 values. Afterwards, I'm testing the MLP on a test set made out of 7 0 values and 7 1 ...
Joni Joni -al's user avatar
1 vote
0 answers
52 views

Classification problem with 2 level features

Consider an automated house, where we can collect router data every minute. The objective is to predict router fail/no fail (1/0) in a future time window. The router sends data at two different levels ...
simon's user avatar
  • 133
0 votes
1 answer
138 views

Different result of classification with same classifier and same input parameters

I did a binary classification using "Random Forest". The code block is ...
Encipher's user avatar
  • 359
0 votes
2 answers
1k views

How to deal with Different Shapes of X_train and X_test after OneHotEncoding?

I am trying to perform OneHotEncoding as well as feature scaling on my training and testing data separately, steps I did: ...
Jainam Shroff's user avatar
0 votes
3 answers
132 views

How to properly do a k-fold cross validation?

I am trying to solve binary classification problem using deep neural networks. I want to compare different approaches (model architectures) and I have no hyperparameters which I want to tune. So my ...
dmasny's user avatar
  • 13
0 votes
1 answer
367 views

ROC-AUC Imbalanced Data Score Interpretation

I have a binary response variable (label) 𝐵 in a dataset with around 50,000 observations. The training set is somewhat imbalanced with, 𝐵𝑖=1 making up about 33% of the observation's and 𝐵𝑖=0 ...
data wannabe's user avatar
0 votes
2 answers
777 views

Python xgboost predicting future events

This is related to this article: https://towardsdatascience.com/forecasting-of-periodic-events-with-ml-5081db493c46 I found it interesting and tried to replicate it, having as a result a xgboost ...
glezo's user avatar
  • 53