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

Go言語でオンライン外れ値検出エンジンSmartSifterを実装した/smartsifter_in_golang

 Go言語でオンライン外れ値検出エンジンSmartSifterを実装した/smartsifter_in_golang

monochromegane

March 28, 2018
Tweet

More Decks by monochromegane

Other Decks in Technology

Transcript

  1. ࡾ୐༔հ / Pepabo R&D Institute, GMO Pepabo, Inc. 2018.03.28 Fukuoka.go#10

    GoݴޠͰΦϯϥΠϯ֎Ε஋ݕग़ ΤϯδϯSmartSifterΛ࣮૷ͨ͠
  2. 3

  3. • ೖྗσʔλ͔Βσʔλൃੜ෼෍ͷ֬཰ϞσϧΛֶश͠ɼͦͷϞσϧΛجʹɼσʔ λͷҟৗ౓߹͍ɼ·ͨ͸ϞσϧͷҟৗͳมԽ౓߹͍ΛείΞϦϯά͢Δɽ 7 ౷ܭతҟৗݕ஌ ग़య: σʔλϚΠχϯάʹΑΔҟৗݕ஌ (ࢁ੢݈࢘) ೖྗ ֬཰Ϟσϧ

    ݕग़ର৅ ֎Ε஋ݕग़ ଟ࣍ݩϕΫτϧ ಠཱϞσϧ ֎Ε஋ มԽ఺ݕग़ ଟ࣍ݩ࣌ܥྻ ࣌ܥྻϞσϧ ࣌ܥྻͷٸܹͳมԽ σʔλϚΠχϯάʹΑΔҟৗݕ஌ (ࢁ੢݈࢘) ʹ͓͚Δҟৗݕ஌ͷ෼ྨʢൈਮʣ
  4. • ΦϯϥΠϯ֎Ε஋ݕग़Τϯδϯ • ࣌ؒ͝ͱʹมԽ͍ͯ͘͠σʔλൃੜػߏʹରͯ͠దԠతʹֶश͠ɼείΞϦϯ ά͢Δ • ֶशͱείΞϦϯάΛσʔλೖྗ͝ͱʹஞ࣍ΦϯϥΠϯͰߦ͏ 12 SmartSifter On-line

    Unsupervised Outlier Detection Using Finite Mixtures with Discounting Learning Algorithms. Proposed by Yamanishi, K., Takeuchi, J., Williams, G. et al. (2004) Refs: http://cs.fit.edu/~pkc/id/related/yamanishi-kdd00.pdf
  5. SmartSifter 13 ( x , y ) SDLE (Sequentially Discounting

    Laplace Estimation) SDEM (Sequentially Discounting Expectation and Miximizing) or SPDU (Sequentially Discounting Prototype Updating) Log loss or Hellinger score ཭ࢄ஋ϕΫτϧ x ࿈ଓ஋ϕΫτϧ y p( x ) p( y | x ) ※ SDLEʹΑͬͯಉఆ͞Ε֤ͨηϧ͝ͱʹϞσϧ͕ଘࡏ͢Δ p( x ) p ( y | x ) SDEM (Sequentially Discounting Expectation and Miximizing) or SPDU (Sequentially Discounting Prototype Updating) SDEM (Sequentially Discounting Expectation and Miximizing) or SPDU (Sequentially Discounting Prototype Updating) SDEM (Sequentially Discounting Expectation and Miximizing) or SPDU (Sequentially Discounting Prototype Updating) ϞσϧΛߋ৽ ֘౰͢Δηϧʹ֘౰͢ΔϞσϧΛߋ৽ Ψ΢εࠞ߹෼෍ ώετάϥϜີ౓ SL(xt, yt) = log p (t 1) (xt, yt)
  6. monochromegane/go-smartsifter 17 r := 0.1 // Discounting parameter. alpha :=

    1.5 // Hyper parameter for continuous variables. beta := 1.0 // Hyper parameter for categorical variables. cellNum := 0 // Only continuous variables. mixtureNum := 2 // Number of mixtures for GMM. dim := 2 // Number of dimentions for GMM. ss := smartsifter.NewSmartSifter(r, alpha, beta, cellNum, mixtureNum, dim) logLoss := ss.Input(nil, []float64{0.1, 0.2}, true) fmt.Println("Score using logLoss: %f\n", logLoss)