Questions tagged [binary-classification]

For questions about binary classification problems, i.e. problems where we want to classify inputs into 1 of 2 classes.

Filter by
Sorted by
Tagged with
3 votes
0 answers
40 views

Why does a neural network struggle to solve this simple problem?

Consider the following problem: Given a vector x of size dim with values between 0 and 1 (exclusive), determine if ...
  • 191
0 votes
0 answers
20 views

ANN Input vector representing a network of contests's outcomes between thousands of individuals?

Let's say I have 1000 participants within a tournament, each of the participants having a single ID. One instance of this tournament is a 1 vs 1 contest when one wins and the other loses. Now let's ...
  • 1
-1 votes
1 answer
103 views

I’m making a simple neural network from scratch and it won’t learn anything. Please help [closed]

I am coding a classifier neural network from scratch. It is not really learning and I believe that somewhere there is a gradient explosion/vanishing issue. Could be some other stuff as well that I ...
  • 31
0 votes
1 answer
69 views

Why does KNN Model return 99% accuracy on dataset with default parameters? [closed]

I am building a model that predicts if a user will like a stock or not based on different features, such as Market Cap, Current Ratio, Sector, Trailing PE, etc. I am going to implement this model in a ...
0 votes
1 answer
33 views

How to evaluate binary classifier on imbalanced dataset?

I have trained a Decision Tree model on an imbalanced dataset. I got the following results for the test set from the sklearn and imblearn classification reports (attached below). Moreover, the other ...
  • 7
0 votes
1 answer
72 views

How to specify categorical features in cat boost?

I have a dataset (pandas data frame) with all features of type int32 containing continuous values except one feature state_number, its data type is int32, but it ...
  • 7
0 votes
1 answer
112 views

How to interpret binary classification metrics on an imbalanced data set?

I have an imbalanced dataset on intrusion detection. I have (attack class) 3668045 samples and (benign class) 477 samples. I made a 70:30 Train test split. My problem is to predict whether the given ...
  • 7
1 vote
1 answer
26 views

machine learning for a budgeting application

I am interested in finding references and previous applications where prior year budgets are analyzed to provide guidance for a current year budget. Specifically, each year some two thousand items ...
  • 11
0 votes
1 answer
39 views

How does Supervised learning models handle time-varying data

I need to train a supervised learning model which would take some input which differs in its output relating to time. to better understand my question I would give a simple binary classification, the ...
1 vote
0 answers
130 views

Categorical loss function for variable number of labels

I have a model for binary classification. The target variable has the different number of labels (instances) in each sample. For example, a batch of size 2 with 2 and 3 instances and correspondingly ...
0 votes
1 answer
40 views

Binary Classification Model Comparison - Interpretation of Training, Test and Validation Set Performance

I am looking for some advice regarding the best choice of binary classification model based on training, validation and test set results. Model 1 (results in 1st image) shows better test set results ...
0 votes
1 answer
19 views

Why do smaller weights converge faster for RNNs?

I am writing a Recurrent Neural Network using only the NumPy library for a binary classification problem. When I initialize the weights with np.random.randn, after 1000 epochs it gets ~60% accuracy, ...
  • 15
1 vote
1 answer
29 views

ML algorithm suggestion for databases that change a lot with time after model training

I have a classification problem and I'm using a logistic regression (I tested it among other models and this one was the best). I look for information from game sites and test if a user has the ...
1 vote
1 answer
46 views

What architecture would be best to match images of torn pieces of tapes?

I am currently working on a project where the goal is to create a neural network that can determine if two pieces of torn tapes are a true fit or not. My current idea is a convolutional network that ...
1 vote
1 answer
36 views

Prediction of continuous variable based on threshold

The independent variables are date, count, atmp, and ...
  • 111
0 votes
1 answer
39 views

How can my RNN get way better results than my ANN [closed]

So, I'm using the same dataset in both models but my RNN gets a 95% accuracy and my ANN gets 52%. It is a time series, binary classification problem, and I know that RNN is better than ANN for time ...
1 vote
1 answer
41 views

Does Using the Same Background for Binary Classification Improve Model Accuracy?

I am training a CNN that detects if a there is a pot of boiling water vs if there is a pot of boiling water with pasta inside. My hypothesis is that having the same background for both a positive and ...
1 vote
1 answer
187 views

Which pre-processing steps are necessary for Deep Learning models to solve a document classification problem?

I have created a data set with 30.000 text documents (each text file is rather small with respect to its length), which are labelled with 0 and 1. Using this data set, I want to train machine learning ...
0 votes
1 answer
63 views

Given a dataset of people with and without cancer, should I split it into training and test datasets such that the same person is not in both?

I have a database that contains healthy persons and lung cancer patients. I need to design a deep neural network for the binary classification problem (cancer/no cancer). I need to split the dataset ...
  • 111
0 votes
1 answer
112 views

How to arrange test dataset distribution for an imbalanced classification problem?

I have a dataset that contains 560 datapoints, and I would like to do binary classification on it. 400 datapoints belong to class 1, and 160 points belong to class 2. In the case of an imbalanced ...
  • 11
3 votes
1 answer
92 views

Is there a way to update the neural network to fit the new data without the time required for retraining?

I built a basic neural network in MATLAB. The neural network classifies points on the X-Y axis system into two classes (0 and 1). (I try to get the function that represents a shape from this photo) ...
0 votes
0 answers
45 views

Explainable AI for complex input features

I have a model for binary classification that includes 2 linear layers with RELU activation function and Sigmoid in the last layer. The input features are FastText word embedding, frequency, and ...
0 votes
0 answers
157 views

Is a test accuracy of 0.74 good enough, given a dataset of about 700 samples, and, if not, how can I improve it?

I am new to neural networks. I am trying to solve a binary classification problem. Specifically, I want to determine whether a patient has or not a certain disease based on the dataset. The dataset ...
0 votes
0 answers
45 views

How can I weight each point in one-class SVM?

I want to give weights to some data points Specifically, these are points related to anomalies (I'm implementing one-class SVM for anomaly detection) Exactly, I want to consider some data points that ...
3 votes
3 answers
2k views

In logistic regression, why is the binary cross-entropy loss function convex?

I am studying logistic regression for binary classification. The loss function used is cross-entropy. For a given input $x$, if our model outputs $\hat{y}$ instead of $y$, the loss is given by $$\text{...
  • 3,451
1 vote
1 answer
340 views

What are pros and cons of using a multi-head neural network versus a single neural network for multi-label classification?

I haven't been able to find a good discussion specifically comparing the two (only one describing a classification and regression problem). I am training a classifier to learn both age and gender ...
1 vote
0 answers
22 views

Is my dataset unlearnable, or is my LSTM model not smart enough?

I have time-series data obtained from a video. The data is composed of bitrate and corresponding label pairs for each timestamp: The distribution over the first 30 seconds is as follows: I have ...
  • 133
1 vote
0 answers
171 views

How to train a machine learning model with multiple attributes and one target value?

I'm working on a machine learning problem where I need to guess which customers will churn and which of them will continue to be customers. I have $X_0, X_1, X_2, X_3, X_4, X_5$ and $X_6$ attributes ...
0 votes
3 answers
154 views

Is binary classification using CNN possible if the training data only consists of one class?

Is binary classification using CNN possible if the training data only consists of one class? I am working on landslide risk assessment using Convolutional Neural Networks and I want to train a network ...
  • 1
2 votes
1 answer
395 views

How to get more accuracy of the logistic regression model?

I am working on a Baby Crying Detection model using logistic regression. Out of $581$ audios, $222$ are of a baby crying. Each audio is of $5$ seconds. what I have done is convert each audio into ...
0 votes
0 answers
28 views

Can RNNs be used to classify these time series into two classes?

My task is to classify into two classes the time series like these shown in the figure. The figure shows one class on the left sub-figure and second one on the right. The series are shown in pairs ...
  • 9
0 votes
2 answers
87 views

Could I just choose the other (non-predicted) class when the accuracy is low?

I have a binary classification problem. My neural network is getting between 10% and 45% accuracy on the validation set and 80% on the training set. Now, if I have a 10% accuracy and I just take the ...
1 vote
1 answer
2k views

Is it appropriate to use a softmax activation with a categorical crossentropy loss?

I have a binary classification problem where I have 2 classes. A sample is either class 1 or class 2 - For simplicity, lets say they are exclusive from one another so it is definitely one or the other....
1 vote
1 answer
99 views

Which approach should I use to classify points above and below a sine function $y(x) = A + B \sin(Cx)$?

In a linear regression problem, a line can divide a data set into two categories. So, basically, points above the line belong to category 1, and points below the ...
  • 111
1 vote
1 answer
249 views

Why are CNN binary classifier output probability distributions often skewed?

I've been working on a lot of simple resnet18 binary classifiers lately and I've started to notice that the probability distributions are often skewed one way or the other. This figure shows one such ...
2 votes
1 answer
4k views

What is the definition of the hinge loss function?

I came across the hinge loss function for training a neural network model, but I did not know the analytical form for the same. I can write the mean squared error loss function (which is more often ...
  • 3,451
0 votes
1 answer
349 views

Can you use machine learning for data with binary outcomes?

I am totally new to artificial intelligence and neural networks and have a broad question that I hope is appropriate to ask here. I am an ecologist working in animal movement and I want to use AI to ...
  • 3
0 votes
1 answer
69 views

Semantic segmentation failing in small instance detection

I performed semantic segmentation with U-net. My dataset consists of grayscale images of defects. After training the dataset for I got an metric accuracy of only 0.3 - 0.4 IOU. Eventhough it is merely ...
6 votes
2 answers
598 views

How should we interpret this figure that relates the perceptron criterion and the hinge loss?

I am currently studying the textbook Neural Networks and Deep Learning by Charu C. Aggarwal. Chapter 1.2.1.2 Relationship with Support Vector Machines says the following: The perceptron criterion is ...
2 votes
1 answer
114 views

Why doesn't the set $\{ -2, +2 \}$ in $E(X) = (y − \text{sign}\{\overline{W} \cdot \overline{X} \}) \in \{ −2, +2 \}$ include $0$?

I am currently studying the textbook Neural Networks and Deep Learning by Charu C. Aggarwal. Chapter 1.2.1.2 Relationship with Support Vector Machines says the following: The perceptron criterion is ...
1 vote
1 answer
51 views

Should binary feature be in one or two columns in deep neural networks?

Let's assume I have a simple feedforward neural network whose input contains binary 0/1 features and output is also binary two classes. Is it better, worse, or maybe totally indifferent, for every ...
  • 1,220
2 votes
1 answer
106 views

Support Vector Machine Convert optimisation problem from argmax to argmin

I'm new to the AI Stackexchange and wasn't certain if this should go here or to Maths instead but thought the context with ML may be useful to understand my problem. I hope posting this question here ...
  • 21
2 votes
0 answers
445 views

How to use residual learning applied to fully connected networks?

Is there any reason why skip connections would not provide the same benefits to fully connected layers as it does for convolutional? I've read the ResNet paper and it says that the applications should ...
0 votes
1 answer
74 views

Image Classification for watermarks with poor results

Just starting learning things about tensorflow and NN. As an exercise I decided to create a dataset of images, watermarked and not, in order to binary classify these. First of all, the dataset ( you ...
2 votes
1 answer
637 views

Why am I getting a difference between training accuracy and accuracy calculated with Keras' predict_classes on a subset of the training data?

I'm trying to solve a binary classification problem with AlexNet. I split the original dataset into training and validation datasets using a 70/30 ratio. I have trained my neural network with a ...
  • 131
4 votes
2 answers
124 views

Does summing up word vectors destroy their meaning?

For example, I have a paragraph that I want to classify in a binary manner. But because the inputs have to have a fixed length, I need to ensure that every paragraph is represented by a uniform ...
  • 101
2 votes
1 answer
217 views

How to perform binary classification when one class is more predominant than the other?

Assuming we have big $m \times n$ input dataset, with $m \times 1$ output vector. It's a classification problem with only two possible values: either $1$ or $0$. Now, the problem is that almost all ...
  • 21
1 vote
1 answer
68 views

When doing binary classification with neural networks, how can I order the importance of the features for a class?

I have a simple neural network for binary classification. The input features include age, sex, economic situation, illness, disability, etc. The output is simply 1 and 0. I would like to order the ...
2 votes
1 answer
1k views

Which loss function should I use for binary classification?

I plan to create a neural network using Python, Keras, and TensorFlow. All the tutorials I have seen so far are concerned with image recognition. However, the goal of my program would be to take in 10+...
  • 23
1 vote
1 answer
97 views

Are there any advantages of using rules-based approaches versus models for detecting spam?

Suppose that we have unlabeled data. That is, all we have are a collection of emails and want to determine whether any of them is spam or not. Let's say we have $1,000$ rules to determine whether a ...