Questions tagged [logistic-regression]

Refers generally to statistical procedures that utilize the logistic function, most commonly various forms of logistic regression

The logistic function is $$ f(x) = \frac{1}{1+e^{-x}}, $$ which maps real numbers to $(0,1)$. One common use of the logistic function is logistic regression, which is a standard method of quantifying the effect of a set of predictors $\{X_1, ..., X_p\}$ on a binary outcome, $Y$. The model can be written as $$ P(Y=1|X) = f(\beta_0 + \beta_1X_1 + ... + \beta_p X_p)$$ The logistic regression model has the nice property that the exponentiated regression coefficients can be interpreted as odds ratios associated with a one unit increase in the predictor.

A second use of the logistic function (but unrelated to logistic regression) is the logistic distribution, which has $f(x)$ as its quantile function.

706 questions
5
votes
1 answer

Why does my logistic regression predict all 0's?

I built a logistic regression in scikit-learn and all of my predicted values are 0, it can't be so. It must have at least some predictability power. I am trying to predict which flights are likely to be delayed. In my exploratory data analysis, I…
PlatinumMaths
  • 81
  • 2
  • 11
5
votes
2 answers

Logistic regression with high cardinality categorical variable

I have a logistic regression model where I care about predictive power solely over comprehensibility. I'm interested in predicting win rates in a video game. There are 133 characters. Each team picks 5 of them (no repeats). Each of these characters…
Lee Sin
  • 153
  • 4
5
votes
3 answers

For Logistic regression, why is that particular logistic function chosen as opposed to other logistic functions?

The logistic function used in logistic regression is: $\frac{e^{B_{0} + B_{1}x}}{1 + e^{B_{0} + B_{1}x}}$. Why is this particular one used?
yonasboson
  • 51
  • 1
4
votes
1 answer

About the maximum likelihood, when we convert the maximization problem into minimization, why we take the negative?

On page 12, we take $log$ on both side. $\max_{\boldsymbol{w}}L\boldsymbol({w})=\max_{w}\displaystyle\prod_{n=1}^Np(t^{(i)}|x^{(i)};\boldsymbol{w})$ $\ell(\boldsymbol{w})=-logL(\boldsymbol{w})$ $\ \ \ \ \ \ \ =-\displaystyle\sum_{i=1}^Nlog\…
user8314628
  • 165
  • 5
3
votes
2 answers

Logistic regression in python

I have done linear and multivariate regression so I understand what probability, cost and gradient descent functions are. I do not understand what the last 3 formulas mean and how they relate to each other. I don't expect anyone to explain them to…
Anya
  • 31
  • 1
3
votes
1 answer

Sigmoid function

How did we arrive at the sigmoid function for calculating probabilities? Why not use some other function that " squashes " the values to lie between [0, 1]. Maybe even just normalise the values so they all add up to one.
Vajjhala
  • 39
  • 3
3
votes
3 answers

Logistic regression and non-linear relationship

In the Titanic dataset, there are two features, "SibSp" and "Parch," which have an impact on the survival rate. For instance, the survival rate tends to increase when the values of "SibSp" range from 0 to 2, but it decreases from 2 onwards. I intend…
jxqbbb
  • 51
  • 2
3
votes
1 answer

How many minima does the residual sum of squares have for the logistic curve?

Suppose we had some data points $\{(x_i,y_i)\}$ where $x_i$ is a real number and $y_i$ is zero or one. We want to fit the logistic function to the data where the logistic function is $\hat{y}=\frac{1}{1+e^{-(\beta x +\beta_0)}}$. To do this we would…
sebastianspiegel
  • 891
  • 4
  • 11
  • 16
2
votes
1 answer

Logistic Regression Maximum Likelihood

Is it true that we assume our P(y|x;theta) to follow Bernoulli's distribution given y has binary output in Logistic Regression? Is there any specific reason why we consider Bernoulli's distribution? If 1) is true., What happens if we consider P(y|x;…
2
votes
2 answers

What is the purpose of Logit function? At what stage of model building process this logit function is used?

We have two prominent functions (or we can say equations) in logistic regression algorithm: 1. Logistic regression function. 2. Logit function. I would like to know: a. Which of these equation(s) is/are used in the logistic regression model…
SatishSK
  • 21
  • 2
2
votes
1 answer

Predicting Intent to do X with a confidence score or intent percentage score?

I have a data set like: did_purchase action_1_30d action_2_20d action_2_10d .... False 10 20 100 True ....etc Where did_purchase shows whether the customer purchased or not, and the columns indicate…
2
votes
0 answers

What Is The Difference Between Additive Natural Cubic Splines and Tensor Product Natural Cubic Splines?

Good day. Taking into account the picture shown, using tensor product is computationally expensive considering the fact that it has higher dimensions. I am just thinking why it is compared both additive and tensor products here (having the same…
kindgnice
  • 73
  • 4
2
votes
1 answer

Why does my cost function return double the expected value?

I tried to implement a function propagate() that computes the cost function and its gradient knowing that : Forward Propagation: You get X You compute $A = \sigma(w^T X + b) = (a^{(0)}, a^{(1)}, ..., a^{(m-1)}, a^{(m)})$ You calculate the cost…
2
votes
1 answer

Can I perform a Logistic regression on this data?

I have the data below: I want to explain the relationship between 'Milieu' who has two factors, and 'DAM'. As you may notice, the blue population's included in the red population. Can I apply a logistic regression?
2
votes
1 answer

Logistic Regression implementation does not converge

I am currently trying to implement logistic regression with iteratively reweightes LS, according to "Pattern Recognition and Machine Learning" by C. Bishop. In a first approach I tried to implement it in C#, where I used Gauss' algorithm to solve…
Paul K
  • 123
  • 4
1
2 3 4