Skip to main content

Questions tagged [logistic-regression]

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

Filter by
Sorted by
Tagged with
3 votes
1 answer
49 views

How to map identity to a sigmoid?

Is there a way of smoothly defining a function that transforms the identity function to a sigmoid for a fixed range (say $[0,1]$)? What I want is to define a function $f(x,k)$ such that $f(0,k)=0,f(0....
sam wolfe's user avatar
  • 3,435
0 votes
0 answers
11 views

Is there a way to modelize a partial predictor in a classification problem with an unbalanced target?

I would like to share with you a classification issue I faced during the modelling process. I have to create a model for an unbalanced binary target by 4 predictors where one of them has 45% of wrong ...
rambo17's user avatar
1 vote
0 answers
14 views

Collaborative Planning, Forecasting, and Replenishment (CPFR) model

I'm trying to understand better the CPFR model but I can't find anywhere a numerical example of this. I'm looking for a numerical example with solution for Collaborative Planning, Forecasting, and ...
1Mathsss's user avatar
0 votes
0 answers
13 views

Hypothesis testing of Precision-Recall curve AUCs

In recent times, I have been about learning classification models (e.g., logistic regression) and how to evaluate them. While learning about the Precision-Recall (PR) curves, it occurred to me that ...
Yat-Hon's user avatar
  • 21
0 votes
0 answers
18 views

Why we use Binarycrossentropy as loss function of logistic regression model?

Let's say we have a logistic regression model: $$z = \vec w \cdot \vec x + b$$ $$a_1 = g(z) = \frac{1}{1+e^{-z}} = P(y=1|\vec x)$$ $$a_2 = 1-a_1 = P(y=0|\vec x)$$ $$loss = -yln(a_1)-(1-y)ln(1-a_1) $$ ...
samsamradas's user avatar
1 vote
0 answers
68 views

Matrix Calculus, finding the weights of a 2 layered non-linear neural network, with sigmoid activation functions

I'm working on a method to calculate weights of a non-linear 2 layer neural network in 1 step, instead of working with the propagation algorithm. I have chosen to make the non-linearity a sigmoid ...
mailerbot mailerbot's user avatar
0 votes
0 answers
19 views

Econometrics Question - Causal effect in a non-randomized trial

I am trying to establish a specification of a binary choice model (logit/probit) that dictates treatment assignment. The context (and subsequent cross-sectional data) is related to a government that ...
econstudent's user avatar
0 votes
0 answers
5 views

Logistic Regression Coefficient Interpretation

Hello I'm working on the interpretation of logistic regression. I am not sure whether I understand it fully. Can you help me with it? Really appreciate it. This is my sample data. I want to study ...
Fox_Summer's user avatar
0 votes
0 answers
32 views

Gradient descent on a convex function without a minimizer

From what I've seen, most of the proofs of convergence for gradient descent on convex functions assume that there exists at least one minimizer, i.e. for a convex $f: \mathbb{R} \rightarrow \mathbb{R}^...
mtcrawshaw's user avatar
2 votes
1 answer
30 views

Logistic regression notation confusion

I am studying logistic regression but I am confused about why we can do this: $$P(y=1|x;\theta) = h_\theta(x)$$ $$P(y=0|x;\theta) = 1- h_\theta(x)$$ how these two become: $$P(y|x_i\theta) = h(x)^y (1-...
samsamradas's user avatar
1 vote
1 answer
19 views

Regarding Loss function of binary logistic regression using the sigmoid function

I have a the following likelihood function: $L(w)=\frac{1}{n}\sum_{t}\log(p(y_{t}/x_{t};\omega))$ and the following probability density: $p(y_{t} = 1/x_{t};\omega) = \sigma(w^{T}x_{t})$ $p(y_{t} = 0/...
Daniel Cohen's user avatar
-1 votes
1 answer
46 views

Understanding when probability distributions are in the exponential family. [closed]

I'm starting to study Generalized Linear Models and I need help understanding how to show that a distribution is part of the exponential family. I know that in general, a distribution is a member of ...
j.jerrod.taylor's user avatar
1 vote
0 answers
27 views

What is meant by the inverse of a CDF? Logit vs. Logistic Regression.

There is seemingly a difference whether one approaches the "logit" from statistics / econometrics: $$F^{-1}(\pi) = \log\left(\frac{\pi}{1-\pi}\right) = \text{logit}(\pi)$$ (I) Or from the ...
Marlon Brando's user avatar
0 votes
0 answers
10 views

Moderate Effect Interpretation

Hello I'm studying the moderate effect of one continuous variable, family income, on the relationship between gender (dummy variable) and whether attending school (dummy variable). For the first ...
Fox_Summer's user avatar
0 votes
0 answers
11 views

Logit panel with Simulated Maximum Likelihood

I'm testing a very basic logit panel model in matlab. The setup is as follows: We observe a binary variable $y_{it} = 1(\beta_0 + \beta_{it}x_{it} + \varepsilon_{it} > 0)$ where i is individual and ...
Mark F's user avatar
  • 33
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
  • 1,131
0 votes
1 answer
79 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
122 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
72 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
17 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
17 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
105 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
14 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
24 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
51 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
27 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
55 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
  • 573
0 votes
0 answers
43 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
43 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
80 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
  • 759
0 votes
2 answers
98 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
67 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
82 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
11 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
38 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
114 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
26 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
2 votes
1 answer
1k 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 by $$...
Marcel's user avatar
  • 21
1 vote
0 answers
37 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
26 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
366 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
128 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
22 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
107 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
361 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
54 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
77 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

1
2 3 4 5 6