Skip to main content

Questions tagged [binary-classification]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
65 views

How to make logistic regression give some observations more importance/weight?

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 ...
0 votes
1 answer
7 views

How to tune the classification threshold in a cost-sensitive manner?

I have trained a classifier outputting probabilities for each class. I want to tune the decision threshold in such a way that it accounts for different costs/gains assigned to false positives ($FP$), $...
1 vote
1 answer
66 views

How do I compute and plot Bias and Variance of a classifier in Python?

I'm new to Machine Learning and I understand bias and variance in theory but I can't seem to find a single source that explains how bias or variance can be computed. I'd like to do it in Python and ...
0 votes
1 answer
199 views

Decision boundary of an neural network

Starting with a). For the first unit: 0 * x1 + 1 * x2 + 1 > 0 (0, because the threshold is 0) which is the same as x2+1 > 0. For the second unit: x1 * 1 + x2 * 0 + 1 > 0 (0, because the ...
-1 votes
0 answers
12 views

Difficulty learning binary classification for 'very similar' inputs

I have been struggling to train a classifier to tell the difference between 'bad' and 'good' datapoints for a physics application. Essentially I am inputting as features some parameters that are used ...
0 votes
0 answers
7 views

Why PySpark `BinaryClasssificationEvaluator` metric `areaUnderROC` returns slightly different across multiple evaluations on the same dataset?

I am using BinaryClasssificationEvaluator in Pyspark to calculate AUC, however, I find that the returned auc across multiple evaluations on the same dataset are ...
1 vote
0 answers
36 views

Class imbalance for binary classification tasks

I am looking to train a binary classifier. Most of my experience so far has been with generative models, not classifiers, so I am wondering with respect to training data, what is a good ratio of 0 and ...
1 vote
0 answers
21 views

Interpreting the SHAP values presented in layered violin plot in SHAP-library for Scikit binary RandomForestClassifier

I am using the SHAP-library for computing feature Shapley values for a binary RandomForestClassifier which has naturally two outputs, 0 or 1. The forest itself consists from 100 decision tree ...
0 votes
1 answer
78 views

Aggregation of low level features for a classifier

The objective is to predict router fail/no fail (1/0) in a future time window with all the data collected over the last hour (i.e. binary target) The data is received at two different levels: Router ...
0 votes
0 answers
10 views

Remove feature from kernel matrix

I am pretty new to machine learning so please bear with me :) I am trying to do a binary classification task using an SVM with precomuted kernel (in python using sklearn). I created my train kernel ...
0 votes
1 answer
60 views

Give more weight to features based on distribution plot

I have a task to predict a binary variable purchase, their dataset is strongly imbalanced (10:100) and the models I have tried so far (mostly ensemble) fail. In ...
1 vote
0 answers
13 views

About GANs specialization

I'm working in a binary classification problem. In general terms, I'm focused on using neural networks to classify datasets that are not huge and in order to address that problem I'm comparing ...
0 votes
0 answers
19 views

Getting nearly 100% accuracy using Binary Classification in Tensorflow but incredibly wrong prediction levels for email messages

I'm creating a Chrome Extension to read user emails via Gmail's API, and then passing in user emails to a trained Keras model in Flask to determine whether the email was written by an AI or a Human, ...
2 votes
2 answers
2k views

Is it vital to do label encoding with target variable

Should I always use label encoding while doing binary classification?
0 votes
0 answers
18 views

How can i retrieve incorrect labelled predictions on new unseen data on image classification when i want to retrain my model later on?

I've recently made a binary image classification model with transfer learning. The model is used on an api and the predictions gets saved into a database. The problem is that it predicts images ...
2 votes
1 answer
66 views

How does dependency information impact binary classification in multi-label prediction models?

TL;DR: I don't understand the dependency issue with binary classification (binary relevance) compared to multi-label prediction models. I often read in papers that some kind of "dependency ...
0 votes
1 answer
464 views

Which classification_report metrics are appropriate to report/interpret for a binary label? Individual or macro average for both classes? scikit-learn

First, please forgive my ignorance; I am a newbie but dedicated to learning more. Example: I have a using a random forest classifier to predict a binary outcome. The binary outcome equals 1 if people ...
0 votes
0 answers
30 views

Multilabel Classification - Flat Binary Classifiers vs Hierarchical Binary Classifiers

Was researching on multi label classification to solve the problem of tagging news articles with topics and countries, where tags follow the syntax <topic>-<country>, and would like to ...
1 vote
0 answers
30 views

When can we claim that the training converged?

I've been working for a while in a binary classification problem with different types of neural networks. In this particular case, I'm using an 3-layer MLP with hyperbolic tangent activation in input ...
0 votes
0 answers
11 views

How does hyperparameter tuning work for constructing/choosing a final model using Nested Cross validation?

I want to determine if XGBoost is better than random forest or logistic regression for building a binary classification model. The model will be a composite model, with a feature selection model to ...
0 votes
0 answers
10 views

Computing empirical coverage in binary classification confidence estimation

I am trying to compute confidence interval empirical coverage. I have computed the confidence intervals for binary probability predictions. For example, the model estimates that there is probability ...
0 votes
0 answers
20 views

Are my CNN loss and performance curves valid, or are they showing under or overfitting?

Thanks in advance for any help offered. I am using a Keras CNN to perform binary classification (credit card transactions fraud vs non-fraud). Below is my results for 100 epochs. It feels odd that the ...
1 vote
1 answer
946 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: ...
0 votes
1 answer
171 views

Text Classification misclassifying?

I am trying to solve a binary classification problem. My labels are abusive (1) and non-abusive (0). My dataset was imbalanced (more 1 than 0s) and I used oversampling of the minority label (i.e. 1) ...
1 vote
1 answer
946 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$ ...
0 votes
0 answers
29 views

While working on binary image classification, the class mode set to binary incorrectly labels the images, but does it correct on categorical

I am currently working on a binary image classification. My problem is that when i use data augmentation, it incorrectly labels the images when it is set to binary. The things i have tried: Looked ...
0 votes
2 answers
149 views

How to deal with temporal trend in ML

I am fitting a binary classifier and I observe a temporal trend in the response variable, meaning that the actual percentage of positives fluctuates with time, I can see periods where it is high and ...
0 votes
0 answers
30 views

Can someone interpret my Binary Cross Entropy Loss Curve?

I am trying to understand my loss curve using : tf.keras.losses.BinaryCrossentropy() Question 1: Based on my loss curve/accuracy, would it be wise to proceed to feed it into a ensemble learning model ...
0 votes
1 answer
71 views

Input Tensor Shape for CNN Binary Classification of Time Series Data

I want to predict whether a machine will fail based on the most recent set of measurements taken by on-board sensors. I have several dozen machines, each with a sensor that takes a measurement at ...
0 votes
0 answers
24 views

Binary classification penalizing only one class

Let's suppose that the task is the following binary classification: Does this image have a cat or a dog? These are the four possible predictions: It predicts cat and the image has cat. It predicts ...
0 votes
1 answer
272 views

What is the best practice to normalize/standardize imbalanced data for outlier detection or binary classification task?

I'm researching Anomaly/outlier/fraud detection, and I'm looking for the best practice to pre-process the synthetic data for imbalanced data. I have checked all methodology for normalizing/...
1 vote
1 answer
582 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 ...
0 votes
1 answer
131 views

Different accuracy scores with sklearn roc_auc_score on same model using sklearn.metrics

Why do these below lines give different outputs while the input is the same? I need to report these results in paper, but I am unsure which is better and why. ...
0 votes
1 answer
88 views

Single model or multiple models for predicting at each level in a multi-level classification problem

Given a flat structured data with features that can be considered hierarchical, where each feature is at a different level (e.g., Brand at the top level, Product, Color, and Size at different levels), ...
0 votes
0 answers
27 views

Gradient boosting algorithm implemented in LightGBM

I'm currently reading the documentation of LightGBM and I'm wondering which gradient boosting algorithm is exactly implemented there if choose boosting parameter as "gbdt" or "dart?&...
1 vote
1 answer
56 views

How to balance labeled datas and then carry out execution with a certain ratio?

I'm building a binary classification model using a neural network, with python and the libraries tensorflow and keras. For that I have an unequal amount of labeled data: Around 2'000'000 labeled with <...
4 votes
1 answer
326 views

Does a random classifier have a diagonal ROC (received operator characteristic) curve even when the data is biased toward negatives?

About 9% of the US population have a diabetes diagnosis. So a binary random classifier that just guesses 50% positive and 50% negative would likely be incorrect when it guesses positive (leading to ...
0 votes
0 answers
27 views

Pycaret cross validation scores are way lower than unseen test set scores

How come the cross-validation model scores are much lower than the model scores on an unseen dataset? ...
3 votes
2 answers
365 views

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

According to this article, The ROC curve for a perfect model would go straight up the TPR axis on the left and then across the FPR axis at the top. Since the plot area for the curve measures 1x1, the ...
0 votes
0 answers
123 views

Empty Confusion Matrix and Zero Precision/F-score

Could you please say why I'm getting this warning while doing a binary classification using Artificial Neural Networks? The data are colored images. ...
1 vote
1 answer
79 views

Correct way to take a subset of a dataset?

I am attempting a binary classification problem (using Weka). My dataset has 100,000 rows, 14 attributes (1 output variable). It takes already too long just to open the dataset in excel so I just know ...
0 votes
0 answers
30 views

Model can not fit to 8 datapoints

I have 10 groups of biological experiments, all of size 100. I want to estimate experimental performance (success rate) of each groups of experiments, but have only ran experiments in two groups. My ...
1 vote
1 answer
78 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 ...
0 votes
0 answers
16 views

Why is my Histogram Gradient Boosting Classifier model still producing type II error? How can I reduce the type II error?

Type 2 error and how to hypertune or feature engineer a solution for it I trial and tested different techniques and kept the structure which made the most sense to me. But still my model confusion ...
0 votes
2 answers
47 views

Binary classification using RNN not going beyond 50% accuracy

I am trying to find out the reason behind why my RNN network won't go beyond 50% for binary classification. My input data is of the shape: ...
0 votes
0 answers
45 views

Competition test set performance much lower than validation set

We are a team of 3 participating in a university competition for a deep learning course. The competition involves a binary image classification task where we have to predict leaf diseases on a (5200, ...
0 votes
0 answers
30 views

Logistic regression with E-net regularization produces different set of weights with each run

I am currently trying to make a model to classify brain tumor patients by incidence of epilepsy using a combination of variables extracted from clinical records, and radiomics features from segmented ...
0 votes
1 answer
318 views

Training ResNet50 model for binary classification

I want to use ResNet50 model to perform binary classification on a dataset spectrogram dataset. In order to do that I had to make a couple of modifications to the model's architecture: Modified the ...
0 votes
0 answers
26 views

Binary classification using xgboost

Why when adding new features in my ADS for a binary classification using XGBOOST my score and uplift has decreased ? What is the best way to treate categorical features or other features in order that ...
0 votes
3 answers
103 views

Reduce false positives having imbalanced data

I'm using a DNN-48 having the following scenario: Features: 8 (48 at the end because I generate conditional sequences of 6 elements each) Classes: Y=0 (90%), Y=1 (10%) Precision and recall are good ...