Normal distribution instead of Logistic distribution for classification2019 Community Moderator ElectionMulti-class classification as a hypothesis testing problemCoalitional effect in logistic regression and assessing explanarory variable contributionShifted feature distribution across different datasetsTransform a skewed distribution into a Gaussian distributionMaximum likelihood Estimation of three-parameter log-logistic distribution in REstimate the normal distribution of the mean of a normal distribution given a set of samples?Re: Logistic RegressionClass leaking on validation setOn Noise Contrastive Estimation, replace noise distribution with difficult examplesBinary classification based on pairwise relationshipsBinomial family in logistic regression

Adding span tags within wp_list_pages list items

How could an uplifted falcon's brain work?

Why are 150k or 200k jobs considered good when there are 300k+ births a month?

Approximately how much travel time was saved by the opening of the Suez Canal in 1869?

"to be prejudice towards/against someone" vs "to be prejudiced against/towards someone"

Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?

can i play a electric guitar through a bass amp?

What does it mean to describe someone as a butt steak?

Watching something be written to a file live with tail

What's the output of a record cartridge playing an out-of-speed record

Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)

Test if tikzmark exists on same page

The use of multiple foreign keys on same column in SQL Server

What defenses are there against being summoned by the Gate spell?

Dragon forelimb placement

Is a tag line useful on a cover?

To string or not to string

Pattern match does not work in bash script

Can a Warlock become Neutral Good?

Today is the Center

Why do falling prices hurt debtors?

How to write a macro that is braces sensitive?

Fencing style for blades that can attack from a distance

Do I have a twin with permutated remainders?



Normal distribution instead of Logistic distribution for classification



2019 Community Moderator ElectionMulti-class classification as a hypothesis testing problemCoalitional effect in logistic regression and assessing explanarory variable contributionShifted feature distribution across different datasetsTransform a skewed distribution into a Gaussian distributionMaximum likelihood Estimation of three-parameter log-logistic distribution in REstimate the normal distribution of the mean of a normal distribution given a set of samples?Re: Logistic RegressionClass leaking on validation setOn Noise Contrastive Estimation, replace noise distribution with difficult examplesBinary classification based on pairwise relationshipsBinomial family in logistic regression










2












$begingroup$


Logistic regression, based on the logistic function $sigma(x) =
frac11 + exp(-x)$
, can be seen as a hypothesis testing problem. Where the reference distribution is the standard Logistic distribution where the p.m.f is




$f(x) = fracexp(-x)[1 + exp(-x)]^2$




and the c.d.f is




$F(x) = sigma(x) = frac11 + exp(-x)$




The hypothesis to test is




$H_0: x text isn't positive hspace2.0cm H_1: x text is positive$




The test statistic is $F(x)$. We reject $H_0$ if $F(x) geq alpha$ where $alpha$ is the level of significance (in terms of hypothesis testing) or classification threshold (in terms of classification problem)



My question is that why they don't come up with the Standard normal distribution, which truly reflects the "distribution of nature", instead of Logistic distribution ?










share|improve this question









$endgroup$
















    2












    $begingroup$


    Logistic regression, based on the logistic function $sigma(x) =
    frac11 + exp(-x)$
    , can be seen as a hypothesis testing problem. Where the reference distribution is the standard Logistic distribution where the p.m.f is




    $f(x) = fracexp(-x)[1 + exp(-x)]^2$




    and the c.d.f is




    $F(x) = sigma(x) = frac11 + exp(-x)$




    The hypothesis to test is




    $H_0: x text isn't positive hspace2.0cm H_1: x text is positive$




    The test statistic is $F(x)$. We reject $H_0$ if $F(x) geq alpha$ where $alpha$ is the level of significance (in terms of hypothesis testing) or classification threshold (in terms of classification problem)



    My question is that why they don't come up with the Standard normal distribution, which truly reflects the "distribution of nature", instead of Logistic distribution ?










    share|improve this question









    $endgroup$














      2












      2








      2


      1



      $begingroup$


      Logistic regression, based on the logistic function $sigma(x) =
      frac11 + exp(-x)$
      , can be seen as a hypothesis testing problem. Where the reference distribution is the standard Logistic distribution where the p.m.f is




      $f(x) = fracexp(-x)[1 + exp(-x)]^2$




      and the c.d.f is




      $F(x) = sigma(x) = frac11 + exp(-x)$




      The hypothesis to test is




      $H_0: x text isn't positive hspace2.0cm H_1: x text is positive$




      The test statistic is $F(x)$. We reject $H_0$ if $F(x) geq alpha$ where $alpha$ is the level of significance (in terms of hypothesis testing) or classification threshold (in terms of classification problem)



      My question is that why they don't come up with the Standard normal distribution, which truly reflects the "distribution of nature", instead of Logistic distribution ?










      share|improve this question









      $endgroup$




      Logistic regression, based on the logistic function $sigma(x) =
      frac11 + exp(-x)$
      , can be seen as a hypothesis testing problem. Where the reference distribution is the standard Logistic distribution where the p.m.f is




      $f(x) = fracexp(-x)[1 + exp(-x)]^2$




      and the c.d.f is




      $F(x) = sigma(x) = frac11 + exp(-x)$




      The hypothesis to test is




      $H_0: x text isn't positive hspace2.0cm H_1: x text is positive$




      The test statistic is $F(x)$. We reject $H_0$ if $F(x) geq alpha$ where $alpha$ is the level of significance (in terms of hypothesis testing) or classification threshold (in terms of classification problem)



      My question is that why they don't come up with the Standard normal distribution, which truly reflects the "distribution of nature", instead of Logistic distribution ?







      classification logistic-regression distribution






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 27 at 7:40









      HOANG GIANGHOANG GIANG

      425




      425




















          1 Answer
          1






          active

          oldest

          votes


















          1












          $begingroup$

          Nice comparison.



          Generally, we are allowed to experiment with as many distributions as we want, and find the one that suits our purpose. However, the normality assumption leads to an intractable derivation consisting of the notorious erf function.



          Let's first pinpoint what is $x$ in the context of logistic regression. Logistic regression model can be written as:
          $$P(y=1|boldsymbolx)=frac11+e^-boldsymbolw^tboldsymbolx=F(boldsymbolw^tboldsymbolx)$$
          So your $x$ is actually $z=boldsymbolw^tboldsymbolx$. This means, although it is reasonable to assume that predicate $boldsymbolx$ comes from a normal distribution, the same argument does not hold for a linear combination of its dimensions, i.e. $z$. In other words, the normal assumption is not as natural for $z$ as for $boldsymbolx$.



          But still, let's see what happens with normal assumption. The problem that we face here is analytical intractability. More specifically, to fit a similar model to observations using Maximum Likelihood, we need (1) derivative of cumulative distribution function (CDF) with respect to each parameter $w_i$, and (2) value of CDF for a given $z$ (see this lecture section 12.2.1 for more details).



          For logistic distribution, the required gradient would be:
          $$beginalign*
          fracpartial F(boldsymbolx;boldsymbolw)partial w_i&=fracpartial (1+e^-boldsymbolw^tboldsymbolx)^-1partial w_i= x_i e^-boldsymbolw^tboldsymbolx(1+e^-boldsymbolw^tboldsymbolx)^-2 =x_if(boldsymbolx;boldsymbolw)
          endalign*$$



          However for normal distribution, CDF is the erf function which does not have an exact formula, though, its gradient is tractable. Assuming $z sim mathcalN(0, 1)$, the gradient would be:
          $$beginalign*
          fracpartial F(boldsymbolx;boldsymbolw)partial w_i&=fracpartial left(frac12+frac12texterfleft(fraczsqrt2right)right)partial w_i=fracx_isqrt2 pi e^-frac(boldsymbolw^tboldsymbolx)^22=x_if(boldsymbolx;boldsymbolw)
          endalign*$$



          In summary, the normality assumption is not as justified for $z=boldsymbolw^tboldsymbolx$ as for $boldsymbolx$, and it leads to an intractable CDF. Therefore, we continue using the good old logistic regression!



          Here is a visual comparison of normal and logistic CDFs:





          taken from a post by Enrique Pinzon, which implies a large analytical cost for a small difference!






          share|improve this answer











          $endgroup$













            Your Answer





            StackExchange.ifUsing("editor", function ()
            return StackExchange.using("mathjaxEditing", function ()
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            );
            );
            , "mathjax-editing");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "557"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f48066%2fnormal-distribution-instead-of-logistic-distribution-for-classification%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1












            $begingroup$

            Nice comparison.



            Generally, we are allowed to experiment with as many distributions as we want, and find the one that suits our purpose. However, the normality assumption leads to an intractable derivation consisting of the notorious erf function.



            Let's first pinpoint what is $x$ in the context of logistic regression. Logistic regression model can be written as:
            $$P(y=1|boldsymbolx)=frac11+e^-boldsymbolw^tboldsymbolx=F(boldsymbolw^tboldsymbolx)$$
            So your $x$ is actually $z=boldsymbolw^tboldsymbolx$. This means, although it is reasonable to assume that predicate $boldsymbolx$ comes from a normal distribution, the same argument does not hold for a linear combination of its dimensions, i.e. $z$. In other words, the normal assumption is not as natural for $z$ as for $boldsymbolx$.



            But still, let's see what happens with normal assumption. The problem that we face here is analytical intractability. More specifically, to fit a similar model to observations using Maximum Likelihood, we need (1) derivative of cumulative distribution function (CDF) with respect to each parameter $w_i$, and (2) value of CDF for a given $z$ (see this lecture section 12.2.1 for more details).



            For logistic distribution, the required gradient would be:
            $$beginalign*
            fracpartial F(boldsymbolx;boldsymbolw)partial w_i&=fracpartial (1+e^-boldsymbolw^tboldsymbolx)^-1partial w_i= x_i e^-boldsymbolw^tboldsymbolx(1+e^-boldsymbolw^tboldsymbolx)^-2 =x_if(boldsymbolx;boldsymbolw)
            endalign*$$



            However for normal distribution, CDF is the erf function which does not have an exact formula, though, its gradient is tractable. Assuming $z sim mathcalN(0, 1)$, the gradient would be:
            $$beginalign*
            fracpartial F(boldsymbolx;boldsymbolw)partial w_i&=fracpartial left(frac12+frac12texterfleft(fraczsqrt2right)right)partial w_i=fracx_isqrt2 pi e^-frac(boldsymbolw^tboldsymbolx)^22=x_if(boldsymbolx;boldsymbolw)
            endalign*$$



            In summary, the normality assumption is not as justified for $z=boldsymbolw^tboldsymbolx$ as for $boldsymbolx$, and it leads to an intractable CDF. Therefore, we continue using the good old logistic regression!



            Here is a visual comparison of normal and logistic CDFs:





            taken from a post by Enrique Pinzon, which implies a large analytical cost for a small difference!






            share|improve this answer











            $endgroup$

















              1












              $begingroup$

              Nice comparison.



              Generally, we are allowed to experiment with as many distributions as we want, and find the one that suits our purpose. However, the normality assumption leads to an intractable derivation consisting of the notorious erf function.



              Let's first pinpoint what is $x$ in the context of logistic regression. Logistic regression model can be written as:
              $$P(y=1|boldsymbolx)=frac11+e^-boldsymbolw^tboldsymbolx=F(boldsymbolw^tboldsymbolx)$$
              So your $x$ is actually $z=boldsymbolw^tboldsymbolx$. This means, although it is reasonable to assume that predicate $boldsymbolx$ comes from a normal distribution, the same argument does not hold for a linear combination of its dimensions, i.e. $z$. In other words, the normal assumption is not as natural for $z$ as for $boldsymbolx$.



              But still, let's see what happens with normal assumption. The problem that we face here is analytical intractability. More specifically, to fit a similar model to observations using Maximum Likelihood, we need (1) derivative of cumulative distribution function (CDF) with respect to each parameter $w_i$, and (2) value of CDF for a given $z$ (see this lecture section 12.2.1 for more details).



              For logistic distribution, the required gradient would be:
              $$beginalign*
              fracpartial F(boldsymbolx;boldsymbolw)partial w_i&=fracpartial (1+e^-boldsymbolw^tboldsymbolx)^-1partial w_i= x_i e^-boldsymbolw^tboldsymbolx(1+e^-boldsymbolw^tboldsymbolx)^-2 =x_if(boldsymbolx;boldsymbolw)
              endalign*$$



              However for normal distribution, CDF is the erf function which does not have an exact formula, though, its gradient is tractable. Assuming $z sim mathcalN(0, 1)$, the gradient would be:
              $$beginalign*
              fracpartial F(boldsymbolx;boldsymbolw)partial w_i&=fracpartial left(frac12+frac12texterfleft(fraczsqrt2right)right)partial w_i=fracx_isqrt2 pi e^-frac(boldsymbolw^tboldsymbolx)^22=x_if(boldsymbolx;boldsymbolw)
              endalign*$$



              In summary, the normality assumption is not as justified for $z=boldsymbolw^tboldsymbolx$ as for $boldsymbolx$, and it leads to an intractable CDF. Therefore, we continue using the good old logistic regression!



              Here is a visual comparison of normal and logistic CDFs:





              taken from a post by Enrique Pinzon, which implies a large analytical cost for a small difference!






              share|improve this answer











              $endgroup$















                1












                1








                1





                $begingroup$

                Nice comparison.



                Generally, we are allowed to experiment with as many distributions as we want, and find the one that suits our purpose. However, the normality assumption leads to an intractable derivation consisting of the notorious erf function.



                Let's first pinpoint what is $x$ in the context of logistic regression. Logistic regression model can be written as:
                $$P(y=1|boldsymbolx)=frac11+e^-boldsymbolw^tboldsymbolx=F(boldsymbolw^tboldsymbolx)$$
                So your $x$ is actually $z=boldsymbolw^tboldsymbolx$. This means, although it is reasonable to assume that predicate $boldsymbolx$ comes from a normal distribution, the same argument does not hold for a linear combination of its dimensions, i.e. $z$. In other words, the normal assumption is not as natural for $z$ as for $boldsymbolx$.



                But still, let's see what happens with normal assumption. The problem that we face here is analytical intractability. More specifically, to fit a similar model to observations using Maximum Likelihood, we need (1) derivative of cumulative distribution function (CDF) with respect to each parameter $w_i$, and (2) value of CDF for a given $z$ (see this lecture section 12.2.1 for more details).



                For logistic distribution, the required gradient would be:
                $$beginalign*
                fracpartial F(boldsymbolx;boldsymbolw)partial w_i&=fracpartial (1+e^-boldsymbolw^tboldsymbolx)^-1partial w_i= x_i e^-boldsymbolw^tboldsymbolx(1+e^-boldsymbolw^tboldsymbolx)^-2 =x_if(boldsymbolx;boldsymbolw)
                endalign*$$



                However for normal distribution, CDF is the erf function which does not have an exact formula, though, its gradient is tractable. Assuming $z sim mathcalN(0, 1)$, the gradient would be:
                $$beginalign*
                fracpartial F(boldsymbolx;boldsymbolw)partial w_i&=fracpartial left(frac12+frac12texterfleft(fraczsqrt2right)right)partial w_i=fracx_isqrt2 pi e^-frac(boldsymbolw^tboldsymbolx)^22=x_if(boldsymbolx;boldsymbolw)
                endalign*$$



                In summary, the normality assumption is not as justified for $z=boldsymbolw^tboldsymbolx$ as for $boldsymbolx$, and it leads to an intractable CDF. Therefore, we continue using the good old logistic regression!



                Here is a visual comparison of normal and logistic CDFs:





                taken from a post by Enrique Pinzon, which implies a large analytical cost for a small difference!






                share|improve this answer











                $endgroup$



                Nice comparison.



                Generally, we are allowed to experiment with as many distributions as we want, and find the one that suits our purpose. However, the normality assumption leads to an intractable derivation consisting of the notorious erf function.



                Let's first pinpoint what is $x$ in the context of logistic regression. Logistic regression model can be written as:
                $$P(y=1|boldsymbolx)=frac11+e^-boldsymbolw^tboldsymbolx=F(boldsymbolw^tboldsymbolx)$$
                So your $x$ is actually $z=boldsymbolw^tboldsymbolx$. This means, although it is reasonable to assume that predicate $boldsymbolx$ comes from a normal distribution, the same argument does not hold for a linear combination of its dimensions, i.e. $z$. In other words, the normal assumption is not as natural for $z$ as for $boldsymbolx$.



                But still, let's see what happens with normal assumption. The problem that we face here is analytical intractability. More specifically, to fit a similar model to observations using Maximum Likelihood, we need (1) derivative of cumulative distribution function (CDF) with respect to each parameter $w_i$, and (2) value of CDF for a given $z$ (see this lecture section 12.2.1 for more details).



                For logistic distribution, the required gradient would be:
                $$beginalign*
                fracpartial F(boldsymbolx;boldsymbolw)partial w_i&=fracpartial (1+e^-boldsymbolw^tboldsymbolx)^-1partial w_i= x_i e^-boldsymbolw^tboldsymbolx(1+e^-boldsymbolw^tboldsymbolx)^-2 =x_if(boldsymbolx;boldsymbolw)
                endalign*$$



                However for normal distribution, CDF is the erf function which does not have an exact formula, though, its gradient is tractable. Assuming $z sim mathcalN(0, 1)$, the gradient would be:
                $$beginalign*
                fracpartial F(boldsymbolx;boldsymbolw)partial w_i&=fracpartial left(frac12+frac12texterfleft(fraczsqrt2right)right)partial w_i=fracx_isqrt2 pi e^-frac(boldsymbolw^tboldsymbolx)^22=x_if(boldsymbolx;boldsymbolw)
                endalign*$$



                In summary, the normality assumption is not as justified for $z=boldsymbolw^tboldsymbolx$ as for $boldsymbolx$, and it leads to an intractable CDF. Therefore, we continue using the good old logistic regression!



                Here is a visual comparison of normal and logistic CDFs:





                taken from a post by Enrique Pinzon, which implies a large analytical cost for a small difference!







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 27 at 20:21

























                answered Mar 27 at 14:11









                EsmailianEsmailian

                2,639318




                2,639318



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Data Science Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    Use MathJax to format equations. MathJax reference.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f48066%2fnormal-distribution-instead-of-logistic-distribution-for-classification%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Adding axes to figuresAdding axes labels to LaTeX figuresLaTeX equivalent of ConTeXt buffersRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizeNumerical conditional within tikz keys?adding axes to shapesAlign axes across subfiguresAdding figures with a certain orderLine up nested tikz enviroments or how to get rid of themAdding axes labels to LaTeX figures

                    Tähtien Talli Jäsenet | Lähteet | NavigointivalikkoSuomen Hippos – Tähtien Talli

                    Do these cracks on my tires look bad? The Next CEO of Stack OverflowDry rot tire should I replace?Having to replace tiresFishtailed so easily? Bad tires? ABS?Filling the tires with something other than air, to avoid puncture hassles?Used Michelin tires safe to install?Do these tyre cracks necessitate replacement?Rumbling noise: tires or mechanicalIs it possible to fix noisy feathered tires?Are bad winter tires still better than summer tires in winter?Torque converter failure - Related to replacing only 2 tires?Why use snow tires on all 4 wheels on 2-wheel-drive cars?