topic Logistic Regression in New York User Group
https://community.dataiku.com/t5/New-York-User-Group/Logistic-Regression/m-p/13553#M38
<P>Hello all, </P><P>I posted a question in the community and Maureen responded, but then left me with more questions as I was confused, but she has not been able to respond again and I was hoping someone here could elaborate for me. </P><P>Here is my question: </P><P>Thank you <A href="https://community.dataiku.com/t5/user/viewprofilepage/user-id/5351" target="_blank">@MaureenP</A>. I appreciate your explanation. I have not heard of the Log of the Odds ratio before. I presume that this number is similar, in that a variables log of the Odds Ration if positive, is the % of the increase in the likelihood of 1 or True and a negative is the % decrease in the likelihood of 1 or True.</P><P>In the attached example, does it read that there is a 60% increased likelihood in retention for that variable and a 30% decreased likelihood in retention for the next variable.</P><P>Here is the link to the my reply to her <A href="https://community.dataiku.com/t5/Using-Dataiku-DSS/Logistic-regression-output/m-p/12756#M5658" target="_blank">https://community.dataiku.com/t5/Using-Dataiku-DSS/Logistic-regression-output/m-p/12756#M5658</A></P><P> </P><P>Thank you so much for any help. I am still learning the differences between Dataiku and SPSS/Excel.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2021-01-06 at 3.35.50 PM.png" style="width: 400px;"><img src="https://community.dataiku.com/t5/image/serverpage/image-id/2613iD67D4BBD41C8194B/image-size/medium?v=v2&px=400" role="button" title="Screen Shot 2021-01-06 at 3.35.50 PM.png" alt="Screen Shot 2021-01-06 at 3.35.50 PM.png" /></span></P><P> </P>Fri, 22 Jan 2021 18:37:43 GMTcwentz2021-01-22T18:37:43ZLogistic Regression
https://community.dataiku.com/t5/New-York-User-Group/Logistic-Regression/m-p/13553#M38
<P>Hello all, </P><P>I posted a question in the community and Maureen responded, but then left me with more questions as I was confused, but she has not been able to respond again and I was hoping someone here could elaborate for me. </P><P>Here is my question: </P><P>Thank you <A href="https://community.dataiku.com/t5/user/viewprofilepage/user-id/5351" target="_blank">@MaureenP</A>. I appreciate your explanation. I have not heard of the Log of the Odds ratio before. I presume that this number is similar, in that a variables log of the Odds Ration if positive, is the % of the increase in the likelihood of 1 or True and a negative is the % decrease in the likelihood of 1 or True.</P><P>In the attached example, does it read that there is a 60% increased likelihood in retention for that variable and a 30% decreased likelihood in retention for the next variable.</P><P>Here is the link to the my reply to her <A href="https://community.dataiku.com/t5/Using-Dataiku-DSS/Logistic-regression-output/m-p/12756#M5658" target="_blank">https://community.dataiku.com/t5/Using-Dataiku-DSS/Logistic-regression-output/m-p/12756#M5658</A></P><P> </P><P>Thank you so much for any help. I am still learning the differences between Dataiku and SPSS/Excel.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2021-01-06 at 3.35.50 PM.png" style="width: 400px;"><img src="https://community.dataiku.com/t5/image/serverpage/image-id/2613iD67D4BBD41C8194B/image-size/medium?v=v2&px=400" role="button" title="Screen Shot 2021-01-06 at 3.35.50 PM.png" alt="Screen Shot 2021-01-06 at 3.35.50 PM.png" /></span></P><P> </P>Fri, 22 Jan 2021 18:37:43 GMThttps://community.dataiku.com/t5/New-York-User-Group/Logistic-Regression/m-p/13553#M38cwentz2021-01-22T18:37:43ZRe: Logistic Regression
https://community.dataiku.com/t5/New-York-User-Group/Logistic-Regression/m-p/15685#M45
<P>Hi <LI-USER uid="5114"></LI-USER> ,</P>
<P>Thank you for reaching out.</P>
<P>The screenshot that you sent looks like the <A href="https://doc.dataiku.com/dss/latest/machine-learning/supervised/results.html#feature-importance-and-regression-coefficients" target="_self">regression coefficients tab.</A><BR /><BR />Logisitic regression coefficients are a bit tricky to interpret. I'll try to give a simple explanation. In order to understand the log of the odds, let us first define the <A href="https://en.wikipedia.org/wiki/Odds#Statistical_usage" target="_self">relation between the probability and the odds</A>:</P>
<BLOCKQUOTE>
<P class="p1">The odds (in favor) of an <SPAN class="s1">event</SPAN> or a <SPAN class="s1">proposition</SPAN> is the ratio of the probability that the event will happen to the probability that the event will not happen</P>
<HR /></BLOCKQUOTE>
<P>For example, the odds that a day in the week is a weekend day are 2:5, where 2 is the number of weekend days and 5 is the others. This can be translated in terms of probability to 2 / (2 + 5) = 2 / 7. In general if the odds ratio is <STRONG><EM>S:F</EM></STRONG> and the probability is <STRONG><EM>p</EM></STRONG>, we have:<STRONG><EM> p = S / (S + F)</EM></STRONG> or <STRONG><EM>S/F = p / (1-p)</EM></STRONG><BR /><BR />The log of the odds in the previous example is log(2/5). In the general case, if we define the probability as <STRONG><EM>p</EM></STRONG>, the log of the odds is <STRONG><EM>L = log(p/(1-p))</EM></STRONG>. <BR /><BR />Now coming back to the interpretation of the logistic regression, the coefficients that you see are indeed the contribution of a variable to the prediction's log of the odds <STRONG><EM>L = log(p/(1-p)) = sum(coefficients*variables)</EM></STRONG>. From this value, you can deduce the probability as <STRONG><EM>p = exp(L)/(1 + exp(L))</EM></STRONG></P>Mon, 12 Apr 2021 11:04:48 GMThttps://community.dataiku.com/t5/New-York-User-Group/Logistic-Regression/m-p/15685#M45MehdiH2021-04-12T11:04:48ZRe: Logistic Regression
https://community.dataiku.com/t5/New-York-User-Group/Logistic-Regression/m-p/15688#M46
<P><LI-USER uid="3930"></LI-USER> Thank you!</P><P>I do understand this a little more, however, without doing any math and just looking at the coefficients tab, could it be said that the number is a weight or amount, negative or positive, to the contribution to the event happening? I'm trying to understand how to word this for the audience it is intended for, the non-data person. </P>Mon, 12 Apr 2021 13:02:50 GMThttps://community.dataiku.com/t5/New-York-User-Group/Logistic-Regression/m-p/15688#M46cwentz2021-04-12T13:02:50ZRe: Logistic Regression
https://community.dataiku.com/t5/New-York-User-Group/Logistic-Regression/m-p/15690#M47
<P>The "handwaving" explanation would be that the coefficients measure the contribution of the variable in the target probability.</P>
<P>The higher the coefficient the more it increases the probability. </P>
<P>However, you need to do a bit of math (basically <STRONG style="font-family: inherit;"><EM>exp(coef)/(1 + exp(coef)) </EM></STRONG>) to get an approximate idea of the influence of the coefficient in the probability</P>Mon, 12 Apr 2021 13:20:54 GMThttps://community.dataiku.com/t5/New-York-User-Group/Logistic-Regression/m-p/15690#M47MehdiH2021-04-12T13:20:54Z