Questions tagged [binary]
The binary tag has no usage guidance.
99
questions
0
votes
0
answers
20
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 ...
1
vote
1
answer
37
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 ...
0
votes
1
answer
24
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 ...
0
votes
0
answers
22
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 ...
0
votes
1
answer
36
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:
...
1
vote
0
answers
32
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 ...
2
votes
1
answer
1k
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-...
0
votes
2
answers
214
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
1
answer
108
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
1
answer
125
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 ...
1
vote
1
answer
113
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
0
answers
439
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 ...
1
vote
1
answer
146
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
0
answers
30
views
CNN seems doing good during training and validation but not really
I'm doing a simple binary classification using this dataset
...
0
votes
1
answer
53
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
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 ...
0
votes
1
answer
367
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 ...
5
votes
1
answer
235
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
votes
1
answer
65
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 ...
2
votes
0
answers
474
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 ...
0
votes
1
answer
296
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
0
answers
54
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
2
answers
72
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
1
answer
76
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
1
answer
183
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 ...
1
vote
2
answers
559
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
1
answer
115
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
0
answers
70
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
2
answers
167
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, ...
-1
votes
1
answer
90
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% ...
1
vote
1
answer
338
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
1
answer
39
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
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 \...
2
votes
0
answers
113
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
1
answer
228
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 ...
1
vote
2
answers
214
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 ...
0
votes
2
answers
35k
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. ...
1
vote
1
answer
103
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
2
answers
101
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 ...
2
votes
1
answer
212
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 ...
0
votes
1
answer
47
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 ...
4
votes
2
answers
295
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
6
votes
3
answers
799
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 ...
2
votes
1
answer
42
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 ...
1
vote
2
answers
239
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 ...
30
votes
2
answers
59k
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 ...
1
vote
0
answers
58
views
How to use "related" and "unrelated" as classes rather than multiple classes?
I have a dataset with about 15 feature columns and about 1000 rows that I'd like to use for supervised training.
Every row can be classified as "related" or "unrelated" to another row. About fifteen ...
2
votes
1
answer
121
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 ...
3
votes
2
answers
2k
views
Binary classfication vs One-class classification
Why do we need samples of both classes for the training of binary classification algorithms, if one-class algorithms can do the job with only samples from one class?
I know that one-class algorithms (...
1
vote
1
answer
200
views
CNN for checking existance of single label
i am just thinking about training a neural network which uses data of only one single label.
For example: Assuming i have many images which contain a dog. Now i want to teach the network how a dog ...