Questions tagged [binary-classification]
The binary-classification tag has no usage guidance.
132
questions
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% ...
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, &...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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,...
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 ...
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 ...
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 ...
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%...
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>...
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?
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 ...
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, <...
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 ...
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 ...
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.
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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
...
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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$ ...
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 ...
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 ...
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:
...
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 ...
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 ...
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 ...
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
...
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:
...
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 ...
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 ...
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 ...