Questions tagged [binary]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
4 views

How to deal with categorical disalignment in test and train in binary classification problems

I have a train and test datasets (600k observations) that have different categories for the same categorical variable. For example train has the categorical variable Letters having unique categories ...
kyara's user avatar
  • 1
0 votes
1 answer
64 views

Employee Attrition - Binary Classification - Predicting leavers

I'm trying to wrap my head around what the standard or best approach is for identifying which employees in a business would be most at risk of leaving, given their features and an indicator column ...
TheCheeseWizard's user avatar
0 votes
0 answers
7 views

Feature selection methods when input data is continuous but target variable is categorical

I plan on extracting features from a univariate time series, and use a feature selection method to select relevant features to predict a binary target variable via logistic regression. But, I have 2 ...
user155775's user avatar
0 votes
0 answers
24 views

Training a two-layer neural network for multi-label data (binary bit array of dim 50)

This is my problem setup. Train Input size (6300x300) These are standard BERT embeddings, so floating point numbers, mostly negatives. Train Output size (6300x50) These are binary bit arrays like [0, ...
Niloy Talukder's user avatar
0 votes
0 answers
207 views

Binary transformer classification model predicts everything as same value

I'm training a binary classifier using a transformer on structured numerical data (so the order of the columns in my spreadsheet matters). I have adapted the keras text classification model for IMDb ...
mins134's user avatar
2 votes
1 answer
97 views

What is the fastest way to detect periodicity in a binary time series?

Example, T = array([0,1,1,1,0,0,1,0,1,1,1,0,0,1,1,1,1,1,0,0,1,0,1,1,1,0,0,1,0,1,1,0,0,0,1,0,1,1,1,0,0,1]) ( T is almost a repeat of the array([0,1,1,1,0,0,1]) six ...
Imp's user avatar
  • 21
0 votes
1 answer
49 views

What is the fastest way to detect lag and calculate cross correlation of two binary time series?

Example, arr1 = array([0,0,0,1,1,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0]) arr2 = array([1,1,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0]) arr2 is almost perfectly correlated with ...
Imp's user avatar
  • 21
0 votes
0 answers
26 views

Dealing with conditional variables in anomaly detection

I am working on an anomaly detection model and I have a conditional variable, i.e., it is zero or it has an amount like below histogram. Suppose the variable shows the time when a machine is not ...
8Simon8's user avatar
  • 11
0 votes
1 answer
46 views

Creating a custom layer in tensorflow

I'm trying to create a layer in TensorFlow, which works something like this: And my implementation looks something, like this: ...
Maifee Ul Asad's user avatar
1 vote
0 answers
47 views

R Phi Coefficient Calculation [closed]

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 ...
Omar Zid's user avatar
2 votes
1 answer
3k 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-...
linello's user avatar
  • 121
0 votes
2 answers
248 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 ...
andins's user avatar
  • 56
2 votes
1 answer
164 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)...
Kanishk Mair's user avatar
1 vote
1 answer
165 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 ...
Dean's user avatar
  • 125
1 vote
1 answer
184 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 ...
Dean's user avatar
  • 125
1 vote
0 answers
632 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 ...
Pierre O's user avatar
1 vote
1 answer
164 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 ...
StressedBoi3's user avatar
0 votes
0 answers
32 views

CNN seems doing good during training and validation but not really

I'm doing a simple binary classification using this dataset ...
Mohamed Abduljawad's user avatar
0 votes
1 answer
71 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\...
user avatar
2 votes
0 answers
19 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 ...
xyztg's user avatar
  • 21
0 votes
1 answer
465 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 ...
DOT's user avatar
  • 103
5 votes
1 answer
397 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 ...
Brian Spiering's user avatar
-1 votes
1 answer
80 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 ...
DSNewbie's user avatar
2 votes
0 answers
627 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 ...
Karl Haebler's user avatar
0 votes
1 answer
385 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 ...
navid's user avatar
  • 3
1 vote
0 answers
61 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 ...
Asif Munir's user avatar
1 vote
2 answers
75 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 ...
Ian's user avatar
  • 33
1 vote
1 answer
109 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 ...
Eren's user avatar
  • 13
2 votes
1 answer
235 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 ...
Bach Pham's user avatar
1 vote
2 answers
883 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 ...
Nagh's user avatar
  • 129
1 vote
1 answer
214 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) ...
misheekoh's user avatar
  • 133
0 votes
0 answers
78 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 ...
Ilya.K.'s user avatar
  • 157
2 votes
2 answers
196 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, ...
puneet's user avatar
  • 83
-1 votes
1 answer
157 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% ...
Okeev TV's user avatar
1 vote
1 answer
374 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 ...
Moshe's user avatar
  • 111
0 votes
1 answer
43 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 ...
Raikan 10's user avatar
1 vote
0 answers
15 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 \...
aaronsteven's user avatar
2 votes
0 answers
128 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 ...
Uchenitsa's user avatar
0 votes
1 answer
259 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 ...
Usman Ali 's user avatar
1 vote
2 answers
330 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 ...
Chicoscience's user avatar
0 votes
2 answers
45k views

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

Is there any way to at least 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. ...
Himanshuman's user avatar
1 vote
1 answer
128 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 ...
developer1's user avatar
1 vote
2 answers
124 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 ...
Train Heartnet's user avatar
2 votes
1 answer
233 views

Using Majority Class to Predict Minority Class

Suppose I want to train a binary model in order to predict the probability of who will buy a personal loan and in the dataset only 5 percent of the examples are people who marked as bought a personal ...
tkarahan's user avatar
  • 422
0 votes
1 answer
49 views

Binary Clasification Accurary

newbie speaking: Commonly we can say that accuracy is defined as total positive/ total nbr cases. But I read that, when it is a binary classifier we should consider: TP+TN/ total nbr cases. Can ...
Benedita Montenegro's user avatar
4 votes
2 answers
344 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
user10296606's user avatar
  • 1,824
6 votes
3 answers
872 views

What is the best metric to evaluate highly imbalanaced binary classifiction? (such as fraud detection in credit card)

What is the best metric to evaluate highly imbalanaced binary classifiction? (such as fraud detection in credit card? I have examining several metrics precision recall F1 lassification Report (macro ...
user10296606's user avatar
  • 1,824
2 votes
1 answer
44 views

Data Science Take Home Challenge Interpretation of Question

I am currently applying for a Data Science position and have to finish a take-home challenge for one of the companies. However, I don't really understand what they want me to do and hope you can help ...
Blo4d's user avatar
  • 21
1 vote
2 answers
254 views

Training model on a Balanced vs Imbalanced dataset?

Let's say that I have a 2-class classification problem where classes A & B have 10*N and ...
Outcast's user avatar
  • 1,057
30 votes
2 answers
63k 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 ...
user avatar