Upgrade to Pro — share decks privately, control downloads, hide ads and more …

T.Inoue

88366570def4d17e48ce121ec62bc714?s=47 takavid
August 19, 2017

 T.Inoue

8/19 ARモデルについて

88366570def4d17e48ce121ec62bc714?s=128

takavid

August 19, 2017
Tweet

Transcript

  1. [Math & Coding #01] ؠ೾σʔλαΠΤϯε vol.6 Λωλʹू·Ζ͏ ࣌ܥྻղੳ AR ʹ͍ͭͯ

    Ҫ্ ਹ࢙ NAIST IS 2017/08/19
  2. ࣗݾ঺հ ▷ Ҫ্ɹਹ࢙ (Πϊ΢Τ λΧγ) ▷ ಸྑઌ୺Պֶٕज़େֶӃେֶ ৘ใՊֶݚڀՊ म࢜ 1

    ೥ ▷ ݚڀ෼໺ : ػցֶश ݚڀ಺༰ : ࣌ܥྻղੳΛ༻͍ͨਓྲྀ༧ଌ ▷ झຯ : ϥϯχϯά ࣭໰ɾҙݟ͸ࣗ͝༝ʹ͓ئ͍͠·͢ʂ
  3. ͦ΋ͦ΋࣌ܥྻղੳͱ͸? • ࣌ܥྻ : ͋Δݱ৅ͷ࣌ؒతͳมԽΛɺ ࿈ଓతʹ (·ͨ͸ҰఆִؒΛஔ͍ͯෆ࿈ଓʹ) ؍ଌͯ͠ಘΒΕͨ஋ͷܥྻͷ͜ͱ i.e. גՁ

  4. ͦ΋ͦ΋࣌ܥྻղੳͱ͸? • ࣌ܥྻ : ͋Δݱ৅ͷ࣌ؒతͳมԽΛɺ ࿈ଓతʹ (·ͨ͸ҰఆִؒΛஔ͍ͯෆ࿈ଓʹ) ؍ଌͯ͠ಘΒΕͨ஋ͷܥྻͷ͜ͱ i.e. גՁ

    → ࣌ܥྻղੳ͸࣌ܥྻσʔλ͔Βओʹσʔλͷഎޙʹ͋Δཧ࿦Λ ݟग़͔͢, ༧ଌΛߦ͏΋ͷͰ͋Δ. (Wikipedia ΑΓ)
  5. AR ͱ͸? ࣗݾճؼϞσϧ Auto Regressive model (AR) • ࠷ۙ͸ػցֶश෼໺Ͱਓؾͳख๏ͷҰͭ •

    ܭྔܦࡁͷ෼໺Ͱ΋࢖ΘΕ͍ͯΔϞσϧ • ARMA Ϟσϧͷಛผͳέʔε
  6. AR ͰͰ͖Δ͜ͱ • աڈͷ࣌ܥྻσʔλΛֶश͢Δ͜ͱʹΑΓকདྷͷ஋Λ༧ଌͰ͖Δ • σʔλؒͷજࡏతؔ܎ੑΛ֬ೝͰ͖Δ y = ax

  7. AR ͰͰ͖Δ͜ͱ • աڈͷ࣌ܥྻσʔλΛֶश͢Δ͜ͱʹΑΓকདྷͷ஋Λ༧ଌͰ͖Δ • σʔλؒͷજࡏతؔ܎ੑΛ֬ೝͰ͖Δ y = ax ↑

    ೖྗ
  8. AR ͰͰ͖Δ͜ͱ • աڈͷ࣌ܥྻσʔλΛֶश͢Δ͜ͱʹΑΓকདྷͷ஋Λ༧ଌͰ͖Δ • σʔλؒͷજࡏతؔ܎ੑΛ֬ೝͰ͖Δ y = ax ↑

    ೖྗ ↑ ग़ྗ
  9. ARϞσϧ xt = a1xt−1 + a2xt−2 + ··· + aMxt−M

    = M ∑ m=1 amxt−m = aT · xt ೋ৐ޡࠩ E Λ࠷খԽ E = T ∑ t=M+1 (xt − aT · xt)2 = (y − X · a)2 = eM+1 2 + eM+2 2 + ··· + eT 2 = eT · e
  10. ARϞσϧ ɹ      xM+1 xM+2 .

    . . xT      y –      xM xM−1 ··· x1 xM+1 xM ··· x2 . . . . . . . . . . . . xT−1 xT−2 ··· xT−M      X · ɹ      a1 a2 . . . aM      a
  11. ԋश1 Q : ࠷దͳ a1 ΛٻΊΔ

  12. ԋश1 Q : ࠷దͳ a1 ΛٻΊΔ xt = a1xt−1

  13. ԋश1 Q : ࠷దͳ a1 ΛٻΊΔ xt = a1xt−1 E

    = 5 ∑ t=2 (xt − a1xt−1 )2
  14. ԋश1ղઆ xt = a1xt−1 E = 5 ∑ t=2 (xt

    − a1xt−1 )2 dE da1 = 2 5 ∑ t=2 (xt − a1xt−1 )(−xt−1 ) = 0 a1 = 5 ∑ t=2 xtxt−1 5 ∑ t=2 x2 t−1 ≃ 0.8
  15. ԋश2 Q : ࠷దͳ a ΛٻΊΔ ࠶ܝ : ೋ৐ޡࠩ E

    Λ࠷খԽ E= T ∑ t=M+1 (xt − aT · xt)2 = (y − X · a)2 = eM+1 2 + eM+2 2 + ··· + eT 2 = eT · e hint! (X · a)T = aT · XT
  16. ԋश2ղઆ Q : ࠷దͳ a ΛٻΊΔ d da {(y −

    X · a)T · (y − X · a)} = 0 ⇔ d da {(yT − aT · XT) · (y − X · a)} = 0 ⇔ d da {(yT · y − yT · X · a − aT · XT · y + aT · XT · X · a)} = 0 ⇔ 0 − XT · y − XT · y + XT · X · a + aT · XT · X = 0 ⇔ −XT · y − XT · y + XT · X · a + XT · X · a = 0 ⇔ 2XT · X · a = 2XT · y ⇔ a = (XT · X)−1(XT · y)
  17. ࣮༻ྫ1 ౦ژӺ 5km पลͷਓޱΛਪଌ͢Δ AR Ϟσϧ

  18. ࣮༻ྫ2 ϚΠΫϩιϑτͷגՁͷ࢝஋Λਪଌ͢Δ VAR Ϟσϧ (ϚΠΫϩιϑτͱΞϚκϯͷσʔλΛ࢖༻)