(Sub)gradient of a function with vector dot products

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I am trying to understand the subgradient of a function for a time series, where for each time instance t:
$f_t: p in Delta_K mapsto ell_t(mathbfpcdot mathbfx_t )in mathbbR_+ $ the function evaluates the losses incurred by the weight vectors. Now from my understanding, if the loss function $ell_t$ is convex and differentiable, the function $f_t$ is convex and differentiable too. If I have a squared loss function of the form: $ell_t(haty_t)=(haty_t-y_t)^2$ where $haty_t=langle mathbfp, mathbfx_t rangle$ and $y_t$ is the revealed observation, how would the derivation of the loss function look like?
My basic math knowledge leads me to:



$ell_t(haty_t)=(haty_t-y_t)^2=haty_t^2-2haty_ty_t+y_t^2$



$ell_t(haty_t)'=2haty_t-2y_t=2(haty_t-y_t) $



Now i found in a paper, that the correct solution for $ell_t(haty_t)'$ might be: $2(haty_t-y_t) haty_t $



I don't understand where the additional $haty_t $ is coming from.







share|cite|improve this question

























    up vote
    0
    down vote

    favorite












    I am trying to understand the subgradient of a function for a time series, where for each time instance t:
    $f_t: p in Delta_K mapsto ell_t(mathbfpcdot mathbfx_t )in mathbbR_+ $ the function evaluates the losses incurred by the weight vectors. Now from my understanding, if the loss function $ell_t$ is convex and differentiable, the function $f_t$ is convex and differentiable too. If I have a squared loss function of the form: $ell_t(haty_t)=(haty_t-y_t)^2$ where $haty_t=langle mathbfp, mathbfx_t rangle$ and $y_t$ is the revealed observation, how would the derivation of the loss function look like?
    My basic math knowledge leads me to:



    $ell_t(haty_t)=(haty_t-y_t)^2=haty_t^2-2haty_ty_t+y_t^2$



    $ell_t(haty_t)'=2haty_t-2y_t=2(haty_t-y_t) $



    Now i found in a paper, that the correct solution for $ell_t(haty_t)'$ might be: $2(haty_t-y_t) haty_t $



    I don't understand where the additional $haty_t $ is coming from.







    share|cite|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am trying to understand the subgradient of a function for a time series, where for each time instance t:
      $f_t: p in Delta_K mapsto ell_t(mathbfpcdot mathbfx_t )in mathbbR_+ $ the function evaluates the losses incurred by the weight vectors. Now from my understanding, if the loss function $ell_t$ is convex and differentiable, the function $f_t$ is convex and differentiable too. If I have a squared loss function of the form: $ell_t(haty_t)=(haty_t-y_t)^2$ where $haty_t=langle mathbfp, mathbfx_t rangle$ and $y_t$ is the revealed observation, how would the derivation of the loss function look like?
      My basic math knowledge leads me to:



      $ell_t(haty_t)=(haty_t-y_t)^2=haty_t^2-2haty_ty_t+y_t^2$



      $ell_t(haty_t)'=2haty_t-2y_t=2(haty_t-y_t) $



      Now i found in a paper, that the correct solution for $ell_t(haty_t)'$ might be: $2(haty_t-y_t) haty_t $



      I don't understand where the additional $haty_t $ is coming from.







      share|cite|improve this question













      I am trying to understand the subgradient of a function for a time series, where for each time instance t:
      $f_t: p in Delta_K mapsto ell_t(mathbfpcdot mathbfx_t )in mathbbR_+ $ the function evaluates the losses incurred by the weight vectors. Now from my understanding, if the loss function $ell_t$ is convex and differentiable, the function $f_t$ is convex and differentiable too. If I have a squared loss function of the form: $ell_t(haty_t)=(haty_t-y_t)^2$ where $haty_t=langle mathbfp, mathbfx_t rangle$ and $y_t$ is the revealed observation, how would the derivation of the loss function look like?
      My basic math knowledge leads me to:



      $ell_t(haty_t)=(haty_t-y_t)^2=haty_t^2-2haty_ty_t+y_t^2$



      $ell_t(haty_t)'=2haty_t-2y_t=2(haty_t-y_t) $



      Now i found in a paper, that the correct solution for $ell_t(haty_t)'$ might be: $2(haty_t-y_t) haty_t $



      I don't understand where the additional $haty_t $ is coming from.









      share|cite|improve this question












      share|cite|improve this question




      share|cite|improve this question








      edited Jul 24 at 8:18
























      asked Jul 24 at 8:10









      UDE_Student

      1618




      1618

























          active

          oldest

          votes











          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: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          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%2f2861106%2fsubgradient-of-a-function-with-vector-dot-products%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2861106%2fsubgradient-of-a-function-with-vector-dot-products%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          What is the equation of a 3D cone with generalised tilt?

          Color the edges and diagonals of a regular polygon

          Relationship between determinant of matrix and determinant of adjoint?