Questions tagged [binary]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
1answer
75 views

Reduce multiclass classification targets to binary classification targets in scikit-learn

I would like to reduce multiclass classification targets to binary classification targets. Ideally, this mapping would happen within scikit-learn so the same transformation applies during both ...
1
vote
0answers
7 views

R Phi Coefficient Calculation

I have a dataframe in R and am trying to determine the Phi correlation coefficient between 2 binary (aka dichotomous: 0 or 1) variables, each one in a column (column1 and column2). I have installed ...
2
votes
1answer
1k views

Backpropagation with step or threshold activation function

I understand that gradient descent is local and it deals only with the inputs to the neuron, what it outputs and what it should output. In all I've seen, gradient descent needs the activation function ...
2
votes
2answers
76 views

Binary classification problem with imbalanced dataset, how to compare to random classifier

We have a very imbalanced dataset (2% of class 1). To the best of our knowledge, there is no baseline in the literature to the problem we want to solve - so we thought of comparing our performance to ...
2
votes
0answers
194 views

Keras model with LSTM quantization aware training

I would like to run quantization aware training with a keras model which has an LSTM layer. However, just the LSTM layer seems to not be supported. Alan Chiao seems to suggest here that it is possible ...
1
vote
1answer
1k views

How to quantize weights in forward pass during training in Keras?

In Keras, I would like to train a network with binary weights in the manner of Coubariaux, et al., but I cannot figure out where the quantization (binarization) should occur within the code. A core ...
0
votes
2answers
13k views

How do I read a dat file, for which I don't know its structure?

Is there any way to atleast read the text from the dat file. I have its corresponding mdf file hence I know what all data and columns are there in it. How do I figure out the contents in my dat file. ...
2
votes
1answer
19 views

Best metric and hyperparameters in dimension reduction with UMAP for binary sparse data

I am playing with a dimensionality reduction step prior to clustering for a pretty large sparse binary matrix of almost 3000 columns and 50k rows. My idea is to embed the 3000 dimensions into a two-...
4
votes
2answers
135 views

If in t-SNE digaram of binary classification both classes follow the similar curve what does t-SNE diagram show?

If in t-SNE digaram of binary classification both classes follow the similar curve what does t-SNE diagram show for instance: Figure1 or Figure2
1
vote
3answers
92 views

logistic regression or density estimation for binary dependent variable and binary (or categorical) features [closed]

I have a binary dependent variable $t$ and categorical features. We can even simplify to binary features since I can one-hot encode the categorical variables. In practice the one-hot encoding induces ...
2
votes
1answer
112 views

Impose similar metric on segments to model

I am training a binary classifier in a dataset using AUC as a score. The dataset has two main groups (we will refer to them as good and bad population). A property that this dataset has is having a ...
1
vote
1answer
28 views

Making an ensemble model for high F1 score

I presently have 2 algorithms that have a numerical output. Using a threshold of 0.9, I get the classification output. Let's say they are: P (high precision, low recall) R (high recall, low precision)...
1
vote
1answer
37 views

Predicting the next occurrence based on binary

I have no experience in statistics or machine learning. I have a True/False binary array describing occupation of open public spaces ...
1
vote
2answers
44 views

Does it make sense to train multiple classifiers for multiple partitions of data?

Let's say I have a dataset consisting of 100 features and a binary target variable. On exploring the data, I see that Feature 10 which is binary, seems to split the data in an 80:20 ratio with respect ...
0
votes
1answer
118 views

Binary classificaiton for weather data if its class 1 or class 0 alert

I am working on weather data and it has few features that are independent variables such as severity, severity_id, ...
1
vote
1answer
100 views

Understanding outputs from ANN and how to improve validation loss

I apologise if this is a bit long winded, but it was suggested by another user that I post. I will start by saying that I am very new to the world of machine learning and deep learning. As such, the ...
2
votes
1answer
24 views

Can you choose a binary feature matrix for a binary classification model

This may be a stupid, but, I am new to deep learning (and machine learning for that matter) and I can't seem to find any literature to help with my question. All I can see when Googling many different ...
1
vote
0answers
99 views

Pearson correlation on two categorical variables

I am using the fourth-corner method in one of my papers (for those who need the name). The method was developed to test associations between variables in two datasets. In my case, the datasets ...
0
votes
0answers
13 views

Multiple Input (Binary) and Single Ouput: How to calculate correlations?

I have a dataset with multiple criteria which are either "passed" (green) or "not passed" (red) and an output (passed or not passed) -> see table. Also the criteria have a ...
1
vote
1answer
47 views

Binary Cross Entropy | Manual scalars [closed]

I am wanting to make print statements "showing my working out" of Binary Cross Entropy loss function, that works with ...
0
votes
0answers
22 views

CNN seems doing good during training and validation but not really

I'm doing a simple binary classification using this dataset ...
0
votes
1answer
21 views

Understanding PyTorch's BCE Notation

According to the PyTorch documentation for the Binary Cross Entropy Loss, we can write it as follows: $$l_{n} = -w_{n}\cdot \left[y_{n}\cdot \log \left(x_{n}\right) + \left( 1-y_{n}\right)\cdot \log\...
2
votes
0answers
13 views

Best Approach and Classifier for Binary Classification Problem

I am trying to build a binary classifier, and I am wondering what is the best approach for data segmentation, training/testing, performance evaluation, selecting classifier type, and overall approach ...
0
votes
0answers
18 views

Handle unbalanced data by implementing Edited nearest neighbors, smote and Tomek links in r?

Imbalanced data is a big problem in classification problems. I have a binary classification problem with imbalanced data. I have researched and found that a possible method of dealing with this is ...
0
votes
0answers
44 views

LightGBM get model decision(rules)

I need to interpret the model decision for binary classification. Here is my model: ...
0
votes
1answer
44 views

Resampling : My dataset is categorical or numerical?

I have a dataset with 203 variables. Like age>40 (0 -yes, 1-no), gender(0 or 1), used or not 200 types of drugs (one hot encoded into 200 variables), and one target variable (0 or 1). This is an ...
23
votes
2answers
38k views

How to interpret classification report of scikit-learn?

As you can see, it is about a binary classification with linearSVC. The class 1 has a higher precision than class 0 (+7%), but class 0 has a higher recall than class 1 (+11%). How would you interpret ...
34
votes
5answers
21k views

Best practices to store Python machine learning models

What are the best practices to save, store, and share machine learning models? In Python, we generally store the binary representation of the model, using pickle or joblib. Models, in my case, can be ...
-1
votes
1answer
24 views

Increase accuracy in binary classification with ambiguous data

I am fairly new to Datascience and currently working on an assignment that requires me to do a binary classification on a set with about 9 parameters for X. I tried working on it using different ...
0
votes
1answer
61 views

Flipping the labels in a classification problem

Let us say A- we have a binary classifier with labels 1 as healthy and 0 as sick. The precision we got is 100% and the recall is 70%. Now let us say B-we flip the labels where 0 is healthy and 1 as ...
1
vote
0answers
36 views

How to cross validate WDBC.csv breast cancer classification dataset in Stacked Autoencoders? [closed]

I need kind guidance regarding the context of how to cross validate WDBC.csv (Wisconsin Breast cancer diagnostic) dataset for breast cancer binary classification in Stacked Autoencoders as I put the ...
1
vote
2answers
69 views

Choosing a model for input: categorised, weighted sequence, output: binary variable

What would be an appropriate model for predicting a binary target variable, given a weighted sequence? Sequences will be reasonably short, typically between ~ 1 and 5 elements. Illustrated example Say ...
1
vote
1answer
34 views

How to deal with a binary classification problem, where the instances in the negative class are very similar? [duplicate]

Let's say, one wants to detect, whether a picture of a fixed size contains a cat or not. But as a dataset, you have 10000 pictures of cats, and 30000 pictures which don't contain a cat, but are very ...
2
votes
1answer
42 views

How to set class_weight parameter for cost sensitive learning?

I'm dealing with a binary classification problem with a balanced data set, however false positives are much more costly than false negatives. Let's just say that an FP is in general 3 times more ...
0
votes
0answers
23 views

Classifier Performance - Binomial proportion confidence interval

I am solving a binary classification task. As an output of Random Forest classifier, I get a probability of how sure RF is that class is 0 or a 1. How can I calculate the needed threshold, to be 95% ...
0
votes
2answers
90 views

Is it possible the model be better on a few epochs rather than hundreds of epochs?

I have very interesting experience in my CNN binary image classification. Do you think the result is by chance or there is a logic behind it? I used InceptionV3 transfer with softmax (I know you will ...
1
vote
1answer
84 views

Which Loss function is correct for binary mapping?

I have built a 3 layer neural network to perform a binary mapping (2016 inputs, 288 outputs.) I am getting decent results with mean square error and stochastic gradient decent. My question is: Is ...
1
vote
1answer
25 views

Preparing Dataset Minority Class vs Majority Class

I'm currently doing a binary classification for sentiment prediction. Currently I have the majority class (~90% of the data) as my positive class (labelled 1) and the minority class (~10% of the data) ...
0
votes
0answers
59 views

questions about logistic regression

In the following Linear Regression discussion I didn't understand a few things: So my questions are: In the third slide: What does this probability means $P\left(y_i|x_i\right)$ and accordingly what ...
2
votes
2answers
132 views

How to model user choice probability: binary model vs multi class model

Let's say Morpheus has multiple users to offer colored pills(from an infinite set of colored pills), there are in total 3 unique colored pills(red, blue, green) Morpheus can offer. The trick is, ...
5
votes
3answers
274 views

How to create an ensemble that gives precedence to a specific classifier

Suppose that in a binary classification task, I have separate classifiers A, B, and C. If I ...
-1
votes
1answer
38 views

What is the best way to select unimportant columns for binary classification?

There is a dataset with one binary attribute (dependent variable) 0 or 1. Distribution 57/43 My task is to find such combinations of signs in which the accuracy of predictions 0/1 will increase to 70% ...
9
votes
3answers
645 views

Binary (Unary) Recommendation System with Biased Views

I would like to create a content recommendation system based on binary click data that also takes views into account. What content a user has been exposed to, and therefore has the chance to click ...
1
vote
1answer
246 views

Simple Binary Classification Example in Python

I'm not sure the correct place to ask, but I'm trying to develop a simple function/algorithm that outputs a predicted number from a sequence of numbers (I have a background in Python, but little to no ...
0
votes
2answers
96 views

Forcing class imbalance to mirror the target data

I'm trying to do binary classification on some data, my source data has a class split of 40% A / 60% B while my target data has a split of 70% A / 30% B. Is it a worthwhile strategy to use SMOTE to ...
0
votes
1answer
33 views

Cat Classifier becomes worse the more you train it

I am using a dataset from kaggle to train a feed forward neural-neteork with no convolutional layers. I wanted to try it this was as a learning exercise with Pytorch without Transfer Learning and ...
1
vote
0answers
10 views

What is the generalization of binary/boolean matrix factorization to fuzzy logics called?

Given a matrix of boolean values $\mathbf{X} \in \mathbb{B}^{M \times N} = \{\top, \bot\}^{M \times N}$, the binary/boolean matrix factorization (BMF) problem is to find $\mathbf{U} \in \mathbb{B}^{M \...
1
vote
0answers
97 views

Forecasting binary time series

I am working on the next event occurrence prediction task and the data is binary time series with 1 if the event occured and 0 if not. I want to predict whether the event will occur or not on the day ...
0
votes
1answer
107 views

What annotators are used in Cohen Kappa for classification problems?

I am working on a classification problem using algorithms such as Logistic Regression, Support Vector Machines, Decision Trees, Random Forests and Naive Bayes. My data consists of binary class ...
51
votes
9answers
25k views

How to deal with version control of large amounts of (binary) data

I am a PhD student of Geophysics and work with large amounts of image data (hundreds of GB, tens of thousands of files). I know svn and ...