# Questions tagged [logistic-regression]

For questions related to Logistic regression in the context of machine learning and AI. Logistic regression is a statistical classification model used for making categorical predictions.

35 questions
Filter by
Sorted by
Tagged with
28 views

### One Softmax or two separate logistic regressions for the task of classifying pictures as a/b and c/d

Simply put, the question 11 in chapter 4 of Aurélien Géron's book "Hands-on Machine Learning" asks: Suppose you want to classify pictures as outdoor/indoor and daytime/nighttime. Should you ...
• 23
26 views

### Neural Networks vs Logistic regression

I'm new to Neural Network and would like understand its essential parts and difference from simple logistic regression. Let's take an example of Coffee Roasting prediction (example from Andre NG ...
• 109
527 views

### Why can we have misclassifications for a perfect model in logistic regression?

I am reading the book: MACHINE LEARNING- A First Course for Engineers and Scientists, by Lindholm et.al. Chapter 3, page 50. Link: http://smlbook.org/book/sml-book-draft-latest.pdf Consider the ...
• 833
96 views

### In logistic regression, do I try to fit the graph perfectly or mimimize the error in the predicted probabilities?

In linear regression, I train the model so the graph runs best through the data points, so the geometric distance between f(x) and $y^i$ is minimized. Now, is it correct that in logistic regression I ...
1 vote
31 views

### Is it possible to apply entity fixed effects to a firth logit test?

All, Currently working with a large dataset (~1.6 million observations) with a relatively low number of rare events (~600ish). To summarize, I'm looking at the impact of 7 foreign-policy related ...
56 views

### Are there any toy classification problems that can't be solved with logistic regression, but can be solved with a NN with exactly one hidden node?

Basically, I'm wondering if there are any small and simple problems that are: complex enough to be unsolvable with a standard neural network without any hidden layer (ie. input -> output) simple ...
• 23
1 vote
13 views

### Is the loss calculation step in Logistic Regression even needed?

I was reading about Logistic Regression and trying to implement the model from scratch. Maybe I am wrong, but I have noticed that the loss calculation step is meaningless in training a Logistic ...
• 153
1 vote
51 views

### Data Imbalance in Contextual Bandit with Thompson Sampling

I'm working with the Online Logistic Regression Algorithm (Algorithm 3) of Chapelle and Li in their paper, "An Empirical Evaluation of Thompson Sampling" (https://papers.nips.cc/paper/2011/...
• 11
1 vote
42 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 ...
120 views

### Why does my regression-NN completely fail to predict some points?

I would like to train a NN in order to approximate an unknown function $y = f(x_1,x_2)$. I have a lot of measurements $y = [y_1,\dots,y_K]$ (with K that could be in the range of 10-100 thousands) ...
• 31
1 vote
14 views

### How does the distribution of the parameters change in logistic regression?

I have my own data to train a logistic regression model (for a multi-class classification task), and I want to know how the distribution of weight parameters changes after each update with gradient ...
• 173
403 views

### Does it make sense for a logistic regression model to perform better than a neural network on the Iris data set?

Per a review post, a simple Logistic Regression model on the Iris data set gets about 97% test accuracy on iris dataset whereas a neural network gets just 94%. The neural network model used in Keras ...
• 221
1 vote
28 views

### Is it possible to compute the logical AND and OR with logistic regression?

It's easy to build a perceptron that can compute the logical AND and OR functions of its binary inputs. Logistic regression could be used as a binary classifier. $$z^{(i)} = w^T x^{(i)} + b$$ \hat{y}...
• 221
1 vote
76 views

### Is the main difference between the logistic regression and the perceptron the activation function they use?

I went through a Stats StackExchange's post about the difference between logistic regression and perceptron, which is too long to get the key point. I'd like to consider the question in terms of the ...
• 221
752 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 ...
85 views

### How do we interpret the images of weights in logistic regression

The following images are a) The weights of a logistic regression model trained on MNIST. b) The sign of the weights of a logistic regression How do these images represent the weights? Would be ...
• 159
87 views

### What is meant by "the number of examples is reduced", and why is this the case?

I am currently studying the paper Learning and Evaluating Classifiers under Sample Selection Bias by Bianca Zadrozny. In section 3.2. Logistic Regression, the author says the following: 3.2. Logistic ...
• 579
1 vote
68 views

### Does the image is logistic regression or SVM, and why? [closed]

Does the image is logistic regression or SVM, and why?
• 121
96 views

### How to frame this problem using RL?

How should this problem be framed in the domain of RL for preventing users from exceeding their bank account balance and being overdrawn? For example, a user has 1000 in an account, and proceeds to ...
• 335
1 vote
198 views

### Back propagation approach to logistic regression: why is cost diverging but accuracy increasing?

Background I have tried to fit a logistic regression model - written using a forward / back propagation approach (as part of Andrew Ng's deep learning course) - to a very non-linear data set (see ...
303 views

### Hyper-plane in logistic regression vs linear regression for same number of features

Geometric interpretation of Logistic Regression and Linear regression is considered here. I was going through Logistic regression and Linear regression. In the optimization equation of both following ...
• 1
1 vote
46 views

### Given the same features, do logistic regression and neural networks produce the same output?

I have a binary classification problem. I have variables (features) var1, var2, var3, ..., var14. Using these variables (aka features) in a logistic regression, I get their weights. If I use the same ...
• 111
1 vote
76 views

### How could logistic loss be used as loss function for an ANN?

Normally, in practice, people use those loss functions with minima, e.g. $L_1$ mean absolute loss, $L_2$ mean squared error, etc. All those come with a minimum to optimize to. However, there's ...
• 1,293
244 views

### Why is the hypothesis function $h_{\theta}(x)$ equivalent to $E[y | x; \theta]$ in generalised linear models?

Reading through the CS229 lecture notes on generalised linear models, I came across the idea that a linear regression problem can be modelled as a Gaussian distribution, which is a form of the ...
• 1,281
437 views

### How does the weight update formula for logistic regression work?

I am trying to use Logistic Regression to make a spam filter, but I am having trouble understanding the weight update part. I have processed my email dataset, and I have an attribute vector of the top ...
• 31
64 views

### Is logistic regression used for unconstrained or constrained optimisation problems?

Is logistic regression used for unconstrained or constrained optimization problems, and why?
• 21
89 views

### Is it compulsary to normalize the dataset if doing so can negatively impact a Binary Logistic regression performance?

I am using raw data set with 4 feature variables (Total Cholesterol, Systolic Blood Pressure, Diastolic Blood Pressure, and Cigraeette count) to do a Binominal Classification (find stroke likelihood) ...
• 51
3k views

### Why not use the MSE instead of the current logistic regression?

When watching the machine learning course on Coursera by Andrew Ng, in the logistic regression week, the cost function was a bit more complex than the one for linear regression, but definitely not ...
1 vote
124 views

### Is there a Logistic Regression classifier that can perfectly classify the given data in this problem?

I have the following problem. A bank wants to decide whether a customer can be given a loan, based on two features related to (i) the monthly salary of the customer, and (ii) his/her account balance. ...
• 145
74 views

### How to define cost function for custom nonlinear functions?

For logistic regression, the Cost function is defined as: $$Cost(h_{\theta}(x)-y) = -ylog(h_{\theta}(x))-(1-y)log(1-h_{\theta}(x))$$ I now have a nonlinear function \begin{...
• 51
2k views

### What is the right formula for weight update rule in Logistic Regression using stochastic gradient descent

Apologies for the lengthy title. My question is about the weight update rule for logistic regression using stochastic gradient descent. I have just started experimenting on Logistic Regression. I ...
• 51
1 vote
162 views

### How many parameter would there be in a logistic regression model used to classify reviews into "good" or "bad"?

Suppose we want to classify a review as good ($1$) or bad ($0$). We have a training data set of $10,000$ reviews. Also, suppose we have a vocabulary of $100,000$ words $w_1, \dots, w_{100,000}$. So ...
• 31
1 vote
81 views

### Are these steps to get a final linear regression model correct?

I am new to machine learning. I know Logistic Regression (LR) is a supervised learning technique. Therefore, we need training data to train the model. I tried to understand the basic steps to get the ...
• 111
To my understanding, logistic regression is an extension of naive Bayes. Suppose $X = \{x_1, x_2, \dots, x_N \}$ and $Y = \{0, 1\}$, each $x_i$ is i.i.d and \$P(x_i \mid Y=y_k) \sim \mathcal{N}(\mu, \...