Bias Variance Decomposition for KL Divergence











up vote
1
down vote

favorite












While studying a slide deck, I encountered the following exercise:



We are to give a bias variance decomposition when the prediction is given as a probability distribution over $C$ classes.
Let $P = [P_1, . . . , P_C ]$ be the ground truth class distribution associated to a particular input pattern. Assume the random estimator of class probabilities $$bar{{P}} = [bar{{P}}_1, . . . , bar{{P}}_C ] $$ for the same input pattern. The error function is given by
the KL-divergence between the ground truth and the estimated probability distribution:
$$text{Error} = E[D_{KL}(P||bar{{P}})]$$



First, we would like to determine the mean of the class distribution estimator $bar{{P}}$. We define the mean as the distribution
that minimizes its expected KL divergence from the class distribution estimator, that is, the distribution
$R$ that optimizes
$$begin{matrix}min\R end{matrix} space E[ D_{KL}(R||bar{{P}})]$$



I have found a way to proof that this is:



$$ R = [R_1, . . . , R_C ] $$
$$ text{where} spacespace R_i = frac{{expspace E[log bar{P_i} ]}}{{sum_jexpspace E[log bar{P_j}]}} space space space ∀ space 1 ≤ i ≤ C.$$



We are now asked to proof that:



$$ Error(hat{P}) = Bias(hat{P}) + Var(hat{P}) $$



where



$$Error(hat{P}) = E[D_{KL}(P || hat{P})$$



$$Bias(hat{P}) = D_{KL}(P || R)$$
$$Var(hat{P}) = E[D_{KL}(R || hat{P})$$



I started by writing out the KL Divergence:
$$Bias(hat{P}) + Var(hat{P}) = sum_{i=1}^{C} left (P_i log left (frac{P_i}{R_i} right ) right) + E left [ sum_{i=1}^{c} left (R_i log left (frac{R_i}{hat{P}_i} right ) right ) right ]$$



But I don't know how to continue from here on.










share|cite|improve this question


























    up vote
    1
    down vote

    favorite












    While studying a slide deck, I encountered the following exercise:



    We are to give a bias variance decomposition when the prediction is given as a probability distribution over $C$ classes.
    Let $P = [P_1, . . . , P_C ]$ be the ground truth class distribution associated to a particular input pattern. Assume the random estimator of class probabilities $$bar{{P}} = [bar{{P}}_1, . . . , bar{{P}}_C ] $$ for the same input pattern. The error function is given by
    the KL-divergence between the ground truth and the estimated probability distribution:
    $$text{Error} = E[D_{KL}(P||bar{{P}})]$$



    First, we would like to determine the mean of the class distribution estimator $bar{{P}}$. We define the mean as the distribution
    that minimizes its expected KL divergence from the class distribution estimator, that is, the distribution
    $R$ that optimizes
    $$begin{matrix}min\R end{matrix} space E[ D_{KL}(R||bar{{P}})]$$



    I have found a way to proof that this is:



    $$ R = [R_1, . . . , R_C ] $$
    $$ text{where} spacespace R_i = frac{{expspace E[log bar{P_i} ]}}{{sum_jexpspace E[log bar{P_j}]}} space space space ∀ space 1 ≤ i ≤ C.$$



    We are now asked to proof that:



    $$ Error(hat{P}) = Bias(hat{P}) + Var(hat{P}) $$



    where



    $$Error(hat{P}) = E[D_{KL}(P || hat{P})$$



    $$Bias(hat{P}) = D_{KL}(P || R)$$
    $$Var(hat{P}) = E[D_{KL}(R || hat{P})$$



    I started by writing out the KL Divergence:
    $$Bias(hat{P}) + Var(hat{P}) = sum_{i=1}^{C} left (P_i log left (frac{P_i}{R_i} right ) right) + E left [ sum_{i=1}^{c} left (R_i log left (frac{R_i}{hat{P}_i} right ) right ) right ]$$



    But I don't know how to continue from here on.










    share|cite|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      While studying a slide deck, I encountered the following exercise:



      We are to give a bias variance decomposition when the prediction is given as a probability distribution over $C$ classes.
      Let $P = [P_1, . . . , P_C ]$ be the ground truth class distribution associated to a particular input pattern. Assume the random estimator of class probabilities $$bar{{P}} = [bar{{P}}_1, . . . , bar{{P}}_C ] $$ for the same input pattern. The error function is given by
      the KL-divergence between the ground truth and the estimated probability distribution:
      $$text{Error} = E[D_{KL}(P||bar{{P}})]$$



      First, we would like to determine the mean of the class distribution estimator $bar{{P}}$. We define the mean as the distribution
      that minimizes its expected KL divergence from the class distribution estimator, that is, the distribution
      $R$ that optimizes
      $$begin{matrix}min\R end{matrix} space E[ D_{KL}(R||bar{{P}})]$$



      I have found a way to proof that this is:



      $$ R = [R_1, . . . , R_C ] $$
      $$ text{where} spacespace R_i = frac{{expspace E[log bar{P_i} ]}}{{sum_jexpspace E[log bar{P_j}]}} space space space ∀ space 1 ≤ i ≤ C.$$



      We are now asked to proof that:



      $$ Error(hat{P}) = Bias(hat{P}) + Var(hat{P}) $$



      where



      $$Error(hat{P}) = E[D_{KL}(P || hat{P})$$



      $$Bias(hat{P}) = D_{KL}(P || R)$$
      $$Var(hat{P}) = E[D_{KL}(R || hat{P})$$



      I started by writing out the KL Divergence:
      $$Bias(hat{P}) + Var(hat{P}) = sum_{i=1}^{C} left (P_i log left (frac{P_i}{R_i} right ) right) + E left [ sum_{i=1}^{c} left (R_i log left (frac{R_i}{hat{P}_i} right ) right ) right ]$$



      But I don't know how to continue from here on.










      share|cite|improve this question













      While studying a slide deck, I encountered the following exercise:



      We are to give a bias variance decomposition when the prediction is given as a probability distribution over $C$ classes.
      Let $P = [P_1, . . . , P_C ]$ be the ground truth class distribution associated to a particular input pattern. Assume the random estimator of class probabilities $$bar{{P}} = [bar{{P}}_1, . . . , bar{{P}}_C ] $$ for the same input pattern. The error function is given by
      the KL-divergence between the ground truth and the estimated probability distribution:
      $$text{Error} = E[D_{KL}(P||bar{{P}})]$$



      First, we would like to determine the mean of the class distribution estimator $bar{{P}}$. We define the mean as the distribution
      that minimizes its expected KL divergence from the class distribution estimator, that is, the distribution
      $R$ that optimizes
      $$begin{matrix}min\R end{matrix} space E[ D_{KL}(R||bar{{P}})]$$



      I have found a way to proof that this is:



      $$ R = [R_1, . . . , R_C ] $$
      $$ text{where} spacespace R_i = frac{{expspace E[log bar{P_i} ]}}{{sum_jexpspace E[log bar{P_j}]}} space space space ∀ space 1 ≤ i ≤ C.$$



      We are now asked to proof that:



      $$ Error(hat{P}) = Bias(hat{P}) + Var(hat{P}) $$



      where



      $$Error(hat{P}) = E[D_{KL}(P || hat{P})$$



      $$Bias(hat{P}) = D_{KL}(P || R)$$
      $$Var(hat{P}) = E[D_{KL}(R || hat{P})$$



      I started by writing out the KL Divergence:
      $$Bias(hat{P}) + Var(hat{P}) = sum_{i=1}^{C} left (P_i log left (frac{P_i}{R_i} right ) right) + E left [ sum_{i=1}^{c} left (R_i log left (frac{R_i}{hat{P}_i} right ) right ) right ]$$



      But I don't know how to continue from here on.







      statistics variance






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Nov 28 at 23:39









      BlockchainDieter

      61




      61






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          We want to proof following statement:
          $$Error(hat{P}) = Bias(hat{P}) + Var(hat{P}) = E[D_{KL}(P || hat{P})].$$



          $$Error(hat{P}) = E[D_{KL}(P || hat{P})]$$
          $$= E[sum_{i=1}^{N}P_{i} log(frac{P_{i}}{hat{P_{i}}})] \$$
          $$= E[E[log(P) - log(hat{P})]] \$$
          $$= E[E[log(P) - log(R) + log(R) - log(hat{P})]] \$$
          $$= E[E[log(P) - log(R)] + E[log(R) - log(hat{P})]] \$$
          $$= E[log(P) - log(R)] + E[E[log(R) - log(hat{P})]] \$$
          $$= sum_{i=1}^{N}P_{i} log(frac{P_{i}}{R_{i}}) + E[sum_{i=1}^{N}R_{i}
          log(frac{R_{i}}{hat{P_{i}}})]$$

          $$= D_{KL}(P || R) + E[D_{KL}(R || hat{P})] \
          = Bias(hat{P}) + Var(hat{P}) $$






          share|cite|improve this answer








          New contributor




          arsaljalib is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.


















            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: "69"
            };
            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',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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
            },
            noCode: true, onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3017916%2fbias-variance-decomposition-for-kl-divergence%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








            up vote
            1
            down vote













            We want to proof following statement:
            $$Error(hat{P}) = Bias(hat{P}) + Var(hat{P}) = E[D_{KL}(P || hat{P})].$$



            $$Error(hat{P}) = E[D_{KL}(P || hat{P})]$$
            $$= E[sum_{i=1}^{N}P_{i} log(frac{P_{i}}{hat{P_{i}}})] \$$
            $$= E[E[log(P) - log(hat{P})]] \$$
            $$= E[E[log(P) - log(R) + log(R) - log(hat{P})]] \$$
            $$= E[E[log(P) - log(R)] + E[log(R) - log(hat{P})]] \$$
            $$= E[log(P) - log(R)] + E[E[log(R) - log(hat{P})]] \$$
            $$= sum_{i=1}^{N}P_{i} log(frac{P_{i}}{R_{i}}) + E[sum_{i=1}^{N}R_{i}
            log(frac{R_{i}}{hat{P_{i}}})]$$

            $$= D_{KL}(P || R) + E[D_{KL}(R || hat{P})] \
            = Bias(hat{P}) + Var(hat{P}) $$






            share|cite|improve this answer








            New contributor




            arsaljalib is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.






















              up vote
              1
              down vote













              We want to proof following statement:
              $$Error(hat{P}) = Bias(hat{P}) + Var(hat{P}) = E[D_{KL}(P || hat{P})].$$



              $$Error(hat{P}) = E[D_{KL}(P || hat{P})]$$
              $$= E[sum_{i=1}^{N}P_{i} log(frac{P_{i}}{hat{P_{i}}})] \$$
              $$= E[E[log(P) - log(hat{P})]] \$$
              $$= E[E[log(P) - log(R) + log(R) - log(hat{P})]] \$$
              $$= E[E[log(P) - log(R)] + E[log(R) - log(hat{P})]] \$$
              $$= E[log(P) - log(R)] + E[E[log(R) - log(hat{P})]] \$$
              $$= sum_{i=1}^{N}P_{i} log(frac{P_{i}}{R_{i}}) + E[sum_{i=1}^{N}R_{i}
              log(frac{R_{i}}{hat{P_{i}}})]$$

              $$= D_{KL}(P || R) + E[D_{KL}(R || hat{P})] \
              = Bias(hat{P}) + Var(hat{P}) $$






              share|cite|improve this answer








              New contributor




              arsaljalib is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.




















                up vote
                1
                down vote










                up vote
                1
                down vote









                We want to proof following statement:
                $$Error(hat{P}) = Bias(hat{P}) + Var(hat{P}) = E[D_{KL}(P || hat{P})].$$



                $$Error(hat{P}) = E[D_{KL}(P || hat{P})]$$
                $$= E[sum_{i=1}^{N}P_{i} log(frac{P_{i}}{hat{P_{i}}})] \$$
                $$= E[E[log(P) - log(hat{P})]] \$$
                $$= E[E[log(P) - log(R) + log(R) - log(hat{P})]] \$$
                $$= E[E[log(P) - log(R)] + E[log(R) - log(hat{P})]] \$$
                $$= E[log(P) - log(R)] + E[E[log(R) - log(hat{P})]] \$$
                $$= sum_{i=1}^{N}P_{i} log(frac{P_{i}}{R_{i}}) + E[sum_{i=1}^{N}R_{i}
                log(frac{R_{i}}{hat{P_{i}}})]$$

                $$= D_{KL}(P || R) + E[D_{KL}(R || hat{P})] \
                = Bias(hat{P}) + Var(hat{P}) $$






                share|cite|improve this answer








                New contributor




                arsaljalib is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                We want to proof following statement:
                $$Error(hat{P}) = Bias(hat{P}) + Var(hat{P}) = E[D_{KL}(P || hat{P})].$$



                $$Error(hat{P}) = E[D_{KL}(P || hat{P})]$$
                $$= E[sum_{i=1}^{N}P_{i} log(frac{P_{i}}{hat{P_{i}}})] \$$
                $$= E[E[log(P) - log(hat{P})]] \$$
                $$= E[E[log(P) - log(R) + log(R) - log(hat{P})]] \$$
                $$= E[E[log(P) - log(R)] + E[log(R) - log(hat{P})]] \$$
                $$= E[log(P) - log(R)] + E[E[log(R) - log(hat{P})]] \$$
                $$= sum_{i=1}^{N}P_{i} log(frac{P_{i}}{R_{i}}) + E[sum_{i=1}^{N}R_{i}
                log(frac{R_{i}}{hat{P_{i}}})]$$

                $$= D_{KL}(P || R) + E[D_{KL}(R || hat{P})] \
                = Bias(hat{P}) + Var(hat{P}) $$







                share|cite|improve this answer








                New contributor




                arsaljalib is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|cite|improve this answer



                share|cite|improve this answer






                New contributor




                arsaljalib is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered Dec 2 at 13:32









                arsaljalib

                111




                111




                New contributor




                arsaljalib is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                arsaljalib is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                arsaljalib is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Mathematics 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.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • 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.


                    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%2fmath.stackexchange.com%2fquestions%2f3017916%2fbias-variance-decomposition-for-kl-divergence%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

                    Bressuire

                    Cabo Verde

                    Gyllenstierna