Questions tagged [logistic-regression]

For questions about logistic regressions, a regression model where the dependent variable is categorical.

Filter by
Sorted by
Tagged with
0 votes
0 answers
28 views

Non random sampling for logistic regression

I recently joined a lab that designed a study like the following: x number of individuals with failed hearts were randomly chosen, and so were x number of people with healthy hearts. To determine the ...
sul man's user avatar
1 vote
0 answers
16 views

A question about the code for doing Cobweb diagram of Tent function

Here I am trying to do the Cobweb diagram for Tent function through MATLAB, and here is the code: ...
ZYX's user avatar
  • 684
0 votes
1 answer
46 views

Multiclass classification by hand - how to use gradient descent?

I am learning logistic regression. Having learnt something about binary classification, I came across this article on multiclass classification: Given a set of $9$ training data with $2$-dimensional ...
Awe Kumar Jha's user avatar
0 votes
1 answer
67 views

Lipschitz constant of $\log(1 + \exp(\lvert x \rvert ))$

Following the Wikipedia article we have that "An everywhere differentiable function $g : \mathbb{R} \mapsto \mathbb{R}$ is Lipschitz continuous (with $K = \sup \lvert g'(x)\rvert$) if and only if ...
independentvariable's user avatar
0 votes
0 answers
60 views

Representer theorem of L2 regularized logistic regression

Let $\left\{\left(x_i, y_i\right)\right\}_{i=1}^n$ be a set of training data, where $x_i \in \mathbb{R}^d$ for all $i$, and $y_i \in\{-1,1\}$. Consider the $l_2$ regularized logistic regression model ...
user1266252's user avatar
0 votes
0 answers
14 views

Logistic regression: why do +-2*std.error of predicted values differ from 95% confidence intervals of odds ratios?

I have a logistic regression model, where a binary response variable is being explained by a categorical variable which has three classes. When we look at the 95% confidence intervals of the odds ...
im-not-a-robot's user avatar
0 votes
0 answers
10 views

Can I use logistic regression models for all steps in a mediation analysis

I am learning mediation analysis now. I have a question about variable types for mediation analysis. Supposed I have a dependent variable, Y, an independent variable, X, and a mediating variable, M. ...
Fox_Summer's user avatar
3 votes
2 answers
89 views

Solving logistic regression equation for slope

I've calculated a logistic regression model involving two variables $X_1$ and $X_2$ and their interaction $X_1 \times X_2$ and obtained regression coefficients for each. The equation takes following ...
Johannes's user avatar
  • 135
0 votes
0 answers
10 views

What is the likelihood function for nominal logistic regression as per Dobson pg 181

On pg. 181 of Dobson, Intro to GLM, https://ocd.lcwu.edu.pk/cfiles/Statistics/EC/Stat-402/AnIntroductiontoGeneralizedLinearModelsbyAnnetteJ.DobsonAdrianGBarnettz-lib.org.pdf nominal logistic ...
DrWill's user avatar
  • 81
0 votes
0 answers
22 views

intuitive explanation/derivation of likelihood function for logistic regression

I'm struggling to wrap my head around the intuitiveness of the likelihood function for logistic regression shown below. If you could please explain why: A) you want to have a joint probability ...
John van Zalk's user avatar
0 votes
0 answers
43 views

Parameter estimation in logistic regression

I am trying to perform logistic regression using the following data: \begin{array}{c|c c c c c c c c} X & 1 & 2 & 2.5 & 3 & 4 & 5 & 6.5 & 8\\ \hline y & 0 & 0 &...
Adnan Ali's user avatar
  • 314
0 votes
0 answers
24 views

Why is the logit of estimated value of a dependent variable equated to a linear combination of the independent variables?

I am reading this book which derives the formula for logistic regression and it states that if Y_i is an estimated probability than ln(Y_i/(1-Y_i)) = a+bX1 +cX2... but I don't understand why these ...
John van Zalk's user avatar
0 votes
0 answers
31 views

Compute theoretical standard error of the fitted value for logistic regression

My question is related to this question (and its answer). This has been pointed in the comment - I think the answer is not what OP asked - the answer first use R to compute linear regression, and then ...
maskeran's user avatar
  • 511
0 votes
0 answers
20 views

Cross-Entropy Loss for Logistic Regression

my book has the following short section about Logistic Regression: What can be done with a single sigmoid unit? Logistic regression! For a binary classification problem let us define the cross-entropy ...
xotix's user avatar
  • 887
1 vote
1 answer
41 views

coefficients of the linear model $y=β_0+β_1x_1+β_2x_2$ that minimises the sum of squares error [closed]

Consider the following sample: $$(x_{11}, x_{12}, y_1) = (1, 3, 4), $$$$(x_{21}, x_{22}, y_2) = (2, 1, 5),$$$$ (x_{31}, x_{32}, y_3) = (3, 0, 7),$$$$ (x_{41}, x_{42}, y_4) = (4, −2, 6).$$ How can I ...
1Mathsss's user avatar
0 votes
0 answers
39 views

Normality of deviance residuals in GLMs

For a generalised linear model, the deviance is defined as $$D(\boldsymbol{Y} | \hat{\boldsymbol{\mu}}) = 2 \phi \sum_{i=1}^n \{\ell(y_i|y_i) - \ell(y_i|\hat{\mu}_i)\} = \sum_{i=1}^n d_i.$$ Here $\ell$...
Balkys's user avatar
  • 729
0 votes
2 answers
78 views

logistic regression model to calculate the log odds

Let’s say that you have estimated the following logistic regression model to calculate the log odds of a $4$ year old child being obese $(y = 1)$ using the independent variable weight in kgs $(x)$: ...
1Mathsss's user avatar
0 votes
0 answers
58 views

How to show that Fischer Matrix can be obtained from Hessian of Logistic Loss Function

I am solving a progressive question where I need to prove several things. Given, $$ f(\theta) = \frac{1}{m}\sum_{i=1}^m\log(1 + exp(-y_ix_i^T\theta))\text{ , }\sigma(s) = \frac{1}{1 + exp(-s)} $$ Here ...
Hokkyokusei's user avatar
0 votes
1 answer
68 views

Gradient & Hessian for log sigmoid function

I have a log sigmoid loss function, $$ l(\textbf w) = \frac{-1}{n}\sum{\log(\sigma(y_i\textbf w^T\textbf x_i))} $$ where $y_i$ is the class label which could be 1 or -1, $\textbf w^T$ is the vector ...
0110's user avatar
  • 9
0 votes
0 answers
10 views

Size of sample to extend regression model

I have the results of a constructed logistic regression model in which the objective function is $Y = Y(X_1, ..., X_k)$. By result I mean here the values in the interval $[0,1]$ obtained by the ...
WawMathematician's user avatar
0 votes
0 answers
37 views

How does non-negative constrained optimization work?

I am dealing with a machine learning problem in which a logistic regression model is trained with under-bound constrained optimization for model interpretability purposes. In a simple 2-dimensional ...
hypothesisusable's user avatar
2 votes
0 answers
100 views

An inequality regarding sums of sigmoid/logistic functions

Let $\sigma(x)=1/(1+e^{-x})$ denote the sigmoid/logistic function and let $a,b,c,d>0$ such that $a\geq c$ and $a+b=c+d$. Prove that $$ \sigma(2a-b)-\sigma(2c-d)\geq \sigma(2a+b)-\sigma(2c+d). $$ ...
Tyler LaBonte's user avatar
0 votes
0 answers
20 views

Logistic regression (reciprocal of logistic regression coefficient interpretation)

Suppose if a dependent variable is having a disease (1) and not having a disease (0). similarly , independent variable is smoking and not smoking. here , not smoking as reference group. Again, if ...
Prasanna's user avatar
0 votes
1 answer
43 views

Intrinsic Growth Rate of Beverton-Holt Model

I am reading ahead in some lecture notes that give the Beverton-Holt model with zero harvest: $r_t=\dfrac{ar_{t-1}}{b+r_{t-1}}$. It states that under a standard assumption of $a>b>0$, the '...
b.b.89's user avatar
  • 115
1 vote
0 answers
42 views

Best equation for monotonic process that levels off

I'm trying to model a process that has an horizontal asymptote when x goes to infinity, and that is (almost) monotonically increasing. It does not necessarily (but probably) decrease in the rate of ...
gabriel's user avatar
  • 41
0 votes
0 answers
27 views

Incorporating logistic function as a constraint in optimization problem

I have learned a sigmoid function $\sigma(\theta^Tx)$ using logistic regression. Where, $\theta \in R_+^n$ are the weights and $x \in R_+^n$ is a feature vector. How can I incorporate a linear or ...
Avalpreet Singh's user avatar
2 votes
1 answer
721 views

Calculating L-smoothness constant for logistic regression.

I am trying to find the $L$-smoothness constant of the following function (logistic regression cost function) in order to run gradient descent with an appropriate stepsize. The function is given as $f(...
Marcel's user avatar
  • 21
1 vote
0 answers
35 views

Properties of the bifurcation diagram for the logistic function

Once the bifurcation diagram has been plotted ($x_{n+1}=rx_n(1-x_n)$), there are 3 elements or properties that I don't know haw to explain, and I have not found any article where they are explored. ...
Minerva González García's user avatar
0 votes
0 answers
17 views

logistic regression residual analysis

residual vs fitted QQ-plot scale-location residual vs leverage I'm a student who just started a data analysis exercise at Kaggle (the data used in this model is Titanic data that you know as well)Need ...
K 2T's user avatar
  • 1
0 votes
0 answers
21 views

Logistic regression, when is a "True Positive"?

I have the following table, (LR = Logistic Regression; BA = Biological activity): ...
Another.Chemist's user avatar
1 vote
0 answers
38 views

Maximal accuracy of logistic regression on the n-parity problem

Consider the standard logistic regression ('LR') function, $ y = \sigma(w^T \cdot x + b) $, where $\sigma$ is the logistic function ('sigmoid'). When checking the accuracy, we will consider the argmax ...
Ido4848's user avatar
  • 567
2 votes
1 answer
317 views

Multinomial Logistic Regression likelihood

Suppose we have the following parametric model for logistic regression: $$\phi_{i} = \frac{\exp{(a^{T}x_{[i]}})}{\sum_{k = 1} ^{M} \exp{(a^{T}x_{[k]})}}$$for $i = 1, \dots, M$ and that the parameter ...
Iamtrying's user avatar
  • 167
1 vote
1 answer
110 views

Show that the random vector follows a multinomial distribution and find it's parameters.

I am trying to show the following in the below setup, I have written my answers and approach below. I am having a hard time understanding the second and last part, especially the last part. Consider ...
user601297's user avatar
  • 1,106
0 votes
0 answers
19 views

Interpret the logistic regression coefficient.

I am running a logistic regression model in r to study the link between customer procrastination and whether customers repurchased. The dependent variable is whether customers will repurchase the item....
Fox_Summer's user avatar
1 vote
0 answers
97 views

logit and probit models

Basic background Hi, I'm relatively new to statistics and mathematics stack exchange so please bear with me. I'm trying to learn about the probit and logit models where the observables $y$ can only ...
MOOSE's user avatar
  • 11
1 vote
1 answer
304 views

Derive the derivative of cost function of logistic regression.

I am trying to derive the derivative of the loss function of a logistic regression model. Instead of 0 and 1, y can only hold the value of 1 or -1, so the loss function is a little bit different. ...
KATAL's user avatar
  • 13
0 votes
0 answers
50 views

Normal equations for logistic regression

In machine learning, linear regression is often used for prediction and logistic regression for classification. Both may be implemented through gradient descent. Additionaly, linear regression has ...
Jaume Oliver Lafont's user avatar
0 votes
0 answers
72 views

Why in logistic regression for every threshold the decision boundary is a hyperplane?

I'm a beginner in machine learning study and I can't figure it out an exercise: The function h(x) = θ(w ̃x) is used to approximate ...
Lucas Lazari's user avatar
2 votes
1 answer
266 views

How to explain covariance in logistic regression + analogy to linear regression

Introduction Linear model In linear regression we predict continuous variable $Y \in R^n$ with use of $n \times p$ deterministic plan matrix $X$ and theoretical model (let's ignore intercept ...
Brzoskwinia's user avatar
0 votes
0 answers
21 views

Condition logit model: Weighted mean of ratios of coefficients of subgroups does NOT equal the ratios of coefficients of the whole sample, why?

I am well aware that when one splits the sample into subgroups (e.g. sex, country, whatever), and then estimates any logistic regression model, the coefficients are not comparable between (otherwise ...
Aku-Ville Lehtimäki's user avatar
1 vote
0 answers
341 views

Intuition of Negative entropy as a Fenchel conjugate of logistic cost function

Let us first recall the logistic cost function $$f_1(x)=\log(1+e^x)$$ and the negative entropy function $$f_2(y)=y\log(y)+(1-y)\log(1-y).$$ Here $\log$ denotes the natural logarithm and $x\in \mathbb ...
Leonard Neon's user avatar
  • 1,354
0 votes
0 answers
39 views

How do you transform a Derivative to a Recurrence Equation?

In the logistic equation, they say $\frac{dx}{dt} = rx(1-x)$ is equal to $x_{n+1} = rx_{n}(1-x_{n})$. How do they do that? And if you were to transform $\frac{dx}{dt} = 2$ to the recurrence equation, ...
user800956's user avatar
-1 votes
1 answer
171 views

Machine learning - Cost function for non linear functions [closed]

The cost function is some indication of the 'cost'/how the predicted value differs from the actual value. In linear regression, this can be measured using MSE. In the case of the logistic function, ...
makala's user avatar
  • 135
7 votes
0 answers
2k views

Proof that the MLE of logistic regression doesn't have a closed-form solution

It is well known that the maximum likelihood estimator of logistic regression does not admit a closed form solution, at least in the general case where the predictors are not binary or categorical. ...
Jamie Ballingall's user avatar
0 votes
1 answer
351 views

explanation for cross entropy for logistic regression

as far as I know, cross entropy of two distributions is: $$ C(p,q) = -\sum_{s \in classes}p(s)\log(q(s)) $$ however, the loss function for logistic regression (called "crossentropy loss") it'...
user avatar
0 votes
1 answer
44 views

What is the best way to estimate the parameters of a logistic regresion model?

I recently read about logistic regression model. $$y=\frac{1}{1+e^{-(\beta_0+\beta_1x)}}$$ where y is a categorical variable with either 0 or 1 output. What seems to be perplexing to me is, I can see ...
Aleph's user avatar
  • 153
2 votes
1 answer
61 views

How to determine labeled balls for logistic regression

I am studying this paper about logistic regression. In section 4.2 (Randomly Generated Problems) on page 1534, they say "Features of positive (negative) examples are independent and identically ...
Saeed's user avatar
  • 175
0 votes
1 answer
119 views

Working out the derivative of the log-likelihood for group LASSO

I'm following the working of the sparse group LASSO in the paper 'A Sparse-Group LASSO' by Simon. For the linear case, we have the problem given as $$\text{min}_\beta \frac{1}{2}||y-\sum_{l=1}^m X^{(l)...
Sparsity's user avatar
  • 119
0 votes
1 answer
67 views

Mathematical derivation from Deep learning book

In https://www.deeplearningbook.org/contents/mlp.html p. 179 this derivation is made but lacks details that I need to understand it: $P(y)= \frac{exp(yz)}{\sum_{y’=0}^{1}exp(y’z)} = \sigma((2y-1)z)$ ...
SheppLogan's user avatar
1 vote
0 answers
112 views

Logistic Regression Problem

You are testing a new drug and have gathered binary data on whether the drug performed its desired effects. From the control trial, $102$ people saw improvement with a placebo and $241$ did not. With ...
jason's user avatar
  • 65

1
2 3 4 5 6