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

An introduction of statistical learning

An introduction of statistical learning

Nakamura, Ryotaro

June 28, 2017
Tweet

More Decks by Nakamura, Ryotaro

Other Decks in Science

Transcript

  1. Table of contents Supervised Learning 1. Classification 2. Perceptron 3.

    Regression Unsupervised Learning 4. Clustering 1
  2. ύʔηϓτϩϯ, Ϟσϧ ઢܗͳϞσϧ f Λઃఆ͢Δ f (x, y) = w0

    + w1x + w2y f (x, y) > 0 ⇒ t = +1 f (x, y) < 0 ⇒ t = −1 −20 −10 0 10 20 30 x −30 −20 −10 0 10 20 y t = +1 t = -1 ଐੑ஋ t = ±1 Λ΋ͭσʔλ܈ ௚ઢ্ͷ఺ (x′, y′) ͸ f (x′, y′) = 0 ΛΈͨ͢ 5
  3. ύʔηϓτϩϯ, ධՁج४ʢޡࠩؔ਺ʣ ޡࠩؔ਺ E ͕࠷খʹͳΔ wi ΛٻΊΔ E = N

    ∑ i=1 {− (w0 + w1x + w2y) ti } = N ∑ i=1 (−f (xi , yi )ti ) • N ͸σʔλ਺ • ޡ෼ྨͩͱ −f (xi , yi )ti > 0 −20 −10 0 10 20 30 x −30 −20 −10 0 10 20 y t = +1 t = -1 ଐੑ஋ t = ±1 Λ΋ͭσʔλ܈ 6
  4. ϩδεςΟοΫճؼ, Ϟσϧ ύʔηϓτϩϯͱಉ͘͡ઢܗϞσϧ f Λઃఆ͢Δ f (x, y) = w0

    + w1x + w2y f (x, y) > 0 ⇒ t = +1 f (x, y) < 0 ⇒ t = −1 −30 −20 −10 0 10 20 30 x −20 −15 −10 −5 0 5 10 15 20 y t = +1 t = -1 f (x, y) ͕૿Ճ͢Δ޲͖ 7
  5. ϩδεςΟοΫճؼ, Ϟσϧ ͨͩ͠ɼ|f | ͕େ͖͍΄Ͳ t Ͱ͋Δ֬཰͕ߴ͍ͱ͢Δ ϩδεςΟοΫؔ਺ σ (α)

    = 1 1 + e−α Λಋೖ͠ɼ (x′, y′) ͕ t = 1 Ͱ͋Δ֬཰Λ 0 < σ ( f ( x′, y′ )) < 1 ͱ͢Δ −4 −3 −2 −1 0 1 2 3 4 α 0.0 0.2 0.4 0.6 0.8 1.0 σ (α) ϩδεςΟοΫؔ਺ͷάϥϑ 8
  6. ϩδεςΟοΫճؼ, ධՁج४ʢ࠷໬ਪఆʣ ܇࿅σʔλ͕ಘΒΕΔ֬཰ P Λ࠷େʹ͢Δ wi ΛٻΊΔ p(x, y) =

    σ(x0 + w1x + w2y) P = N ∏ i p (xi , yi )tn {1 − p (xi , yi )}1−tn ܇࿅σʔλ͸࠷΋ൃੜ֬཰͕ߴ͍σʔλͰ͋ΔͱԾఆ͍ͯ͠Δ 9
  7. ճؼ෼ੳ, ϞσϧͱධՁج४ʢ࠷খೋ৐ʣ σʔλ͕ M ࣍ଟ߲ࣜ f ʹै͏ͱͯ͠ɼೋ৐ޡࠩ ED Λ࠷খʹ͢Δ ύϥϝλ

    wi ΛબͿ f (x) = M ∑ m=0 wmxm ED = 1 2 N ∑ n=1 {f (xn) − tn}2 0 2 4 6 8 10 −15 −10 −5 0 5 ground truth degree 3 degree 4 degree 5 training points M ∈ {3, 4, 5} ͷଟ߲ࣜۙࣅྫ 10
  8. k ฏۉ๏ σʔλؒͷڑ཭ΛٻΊɼσʔλΛ k ݸͷΫϥελʹ෼͚Δ −2 −1 0 1 2

    3 0 1 2 3 4 5 σʔλू߹ −2 −1 0 1 2 3 0 1 2 3 4 5 cluster 1 cluster 2 cluster 3 centroids k = 3 ͷΫϥελ Ϋϥελ͝ͱʹ୅දσʔλΛܾΊɼ୅දͷۙ͘ͷσʔλू߹Ͱ ΫϥελΛ࡞Δ 11
  9. k ฏۉ๏ͷΞϧΰϦζϜ ೖྗ: σʔλू߹ D = { x(1), x(2), ·

    · · , x(|D|) } : Ϋϥελ਺ k ແ࡞ҝʹ m1, m2 · · · , mk ΛܾΊΔ until ऩଋ foreach x(i) ∈ D cmax = arg max c sim ( x(i), mc ) σʔλू߹ͷ෼ׂ insert x(i)into cmax end foreach ∀c, mc = 1 |c| ∑ x(i)∈c x(i) ୅දϕΫτϧΛ࠶ܭࢉ end until 12