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.

Filter by
Sorted by
Tagged with
3 votes
2 answers
501 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 ...
DSPinfinity's user avatar
0 votes
1 answer
74 views

Loss function of logistic Regression Geometric

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 do ...
Jacky02's user avatar
1 vote
0 answers
22 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 ...
Benjamin Jebb's user avatar
2 votes
2 answers
50 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 ...
J Doug's user avatar
  • 23
0 votes
0 answers
37 views

Relationship between TD control algorithm (SARSA) and logistic regression in two-armed bandit task

I have been looking for a way to model behavioral data (from rodents) in a nonstationary 2-armed bandit task. In this task the rodent can nose poke either on a left or a right port, and it will get a ...
Alex Legaria's user avatar
1 vote
0 answers
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 ...
artas2357's user avatar
  • 153
1 vote
0 answers
46 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/...
MABQ's user avatar
  • 11
1 vote
1 answer
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 ...
Marcos Almeida's user avatar
3 votes
1 answer
99 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) ...
MttRch's user avatar
  • 31
1 vote
0 answers
13 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 ...
Seewoo Lee's user avatar
2 votes
2 answers
293 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 ...
JJJohn's user avatar
  • 221
1 vote
0 answers
26 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}...
JJJohn's user avatar
  • 221
1 vote
0 answers
73 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 ...
JJJohn's user avatar
  • 221
2 votes
1 answer
695 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 ...
Muhammad Waqar Anwar's user avatar
0 votes
0 answers
76 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 ...
Hrushi's user avatar
  • 159
3 votes
1 answer
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 ...
The Pointer's user avatar
1 vote
1 answer
66 views

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

Does the image is logistic regression or SVM, and why?
user5520049's user avatar
0 votes
0 answers
94 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 ...
blue-sky's user avatar
  • 335
1 vote
1 answer
180 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 ...
a_former_scientist's user avatar
0 votes
1 answer
283 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 ...
Ajey's user avatar
  • 1
1 vote
0 answers
44 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 ...
Arpit's user avatar
  • 111
1 vote
1 answer
73 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 ...
Dan D.'s user avatar
  • 1,283
2 votes
1 answer
213 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 ...
calveeen's user avatar
  • 1,251
2 votes
1 answer
324 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 ...
kostas's user avatar
  • 31
2 votes
0 answers
60 views

Is logistic regression used for unconstrained or constrained optimisation problems?

Is logistic regression used for unconstrained or constrained optimization problems, and why?
Miko's user avatar
  • 21
2 votes
1 answer
82 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) ...
GYSHIDO's user avatar
  • 51
3 votes
3 answers
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 ...
user avatar
1 vote
1 answer
112 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. ...
ten do's user avatar
  • 145
2 votes
0 answers
73 views

How to define cost function for custom nonlinear functions?

For logistic regression, the Cost function is defined as: \begin{equation} Cost(h_{\theta}(x)-y) = -ylog(h_{\theta}(x))-(1-y)log(1-h_{\theta}(x)) \end{equation} I now have a nonlinear function \begin{...
yfliuuu's user avatar
  • 51
3 votes
0 answers
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 ...
GYSHIDO's user avatar
  • 51
1 vote
1 answer
134 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 ...
aiguy123's user avatar
1 vote
1 answer
76 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 ...
Ind's user avatar
  • 111
4 votes
2 answers
646 views

What are the differences between softmax regression and logistic regression (other than when the number of classes is 2)?

I read about softmax from this article. Apparently, these 2 are similar, except that the probability of all classes in softmax adds to 1. According to their last paragraph for ...
user avatar
5 votes
1 answer
933 views

Is logistic regression more free from the conditional independence assumption than naive Bayes?

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, \...
imflash217's user avatar