Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Tokyo r 10_12

4 115 vues

Publié le

Publié dans : Technologie, Business
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici

Tokyo r 10_12

  1. 1. 最適化 前編アレ  ソレ  コレ @kenchan0130_aki
  2. 2. アレ ソレ コレRNUOPTだと420000円も!! 誰でも いま、Rをインストールしていると 最適化問題が 月額料金 0 円∼
  3. 3. 自己紹介• 学部4年生 → 院進学• 専攻は確率過程、信用リスク• Java、PHP、R(、Python)• インターンでwebサイトを立ち上げ中
  4. 4. 最適化とは• 関数・プログラム・製造物などを最適な状態に近づけること 引用:wikipedia 今回の場合、ある制約条件のもとで関数を 最大または最小にする解を探すこと = 最適化問題
  5. 5. さっそくRに用意されている関数を使って 最適化をしてみよう!
  6. 6. 関数の最適化を考える
  7. 7. fw (x) 80 100 120 140 160 -40 -20x 0 20 40
  8. 8. optimize(optimise)関数• 一変数関数の最大、最小値を求めることができる• maximum=TRUE で最大化(デフォルトはFALSE)• 黄金分割探索と逐次放物線補間の組み合わせ
  9. 9. 早速使ってみる
  10. 10. fw (x) 80 100 120 140 160 -40 -20x 0 20 40
  11. 11. fw (x) 80 100 120 140 160 -40 -20x 0 20 40
  12. 12. 100 120 140 160ん?最適化できたのか?fw (x) 80 -40 -20 0 20 40 x
  13. 13. 範囲を狭めてもう一度やってみる
  14. 14. どうも初期値に依存す るのではないか 100 120 140 160fw (x) 80 -40 -20 0 20 40 x
  15. 15. どうも初期値に依存す るのではないか 100 120 140 160fw (x) 80 -40 -20 0 20 40 x
  16. 16. どうも初期値に依存す るのではないか 100 120 140 160 どうも怪しいfw (x) 80 -40 -20 0 20 40 x
  17. 17. fw (x) 80 100 120 140 160 -40 -20x 0 20 40
  18. 18. fw (x) 80 100 120 140 160 -40 -20x 0 20 40
  19. 19. 100 120 140 160こうなるべきなんじゃないの? fw (x) 80 -40 -20 0 20 40 x
  20. 20. BFGS法は準ニュートン法 CG法は共役勾配法(メモリー使用量 が少ないため、大規模最適化に使え る可能性がある) L-BFGS-B法は制約条件を許す準ニュー トン法 optim関数 SANN法はシュミレーテッド・アニー リング法(あまり一般的ではない)• 多変数関数の最大、最小値を求めることができる• control=list( fnscale=(負の値) ) で最大化• Nelder-Mead、BFGS、CG、L-BFGS-B、SANN法が使える• 一変数に対しても使えなくはないが、既定の手法はう まく動作しない
  21. 21. 多変数の最適化ができるならさっきのoptimizeの初期値を推定できるのでは?
  22. 22. つまり二変数の最適化であると考えればいいのでは?
  23. 23. ということで、やってみた
  24. 24. fw (x) 80 100 120 140 160 -40 -20x 0 20 40
  25. 25. fw (x) 80 100 120 140 160 -40 -20x 0 20 40
  26. 26. fw (x) 80 100 120 140 160 -40 -20x 0 20 40 キタコレ
  27. 27. ちなみに、optim関数で推定した値は
  28. 28. optim関数• Nelder-mead、SANN法は、微分できない関数にも使用でき、初期値にそこまで敏感ではない• 上記の手法で得られた値を使用して、BFGS、CG法を使ってみるのも有
  29. 29. SANN法を使って一変数の最適化をやってみる
  30. 30. 得られた値を使用してBFGS法を試してみる
  31. 31. fw (x) 80 100 120 140 160 -40 -20x 0 20 40
  32. 32. たの か? optim関数 に最 が求 適解 まっ 本当• 原則として局所的最適値しか見つけられない• 計算における数値誤差もあったりする• 変数の数が多くなればなるほど、推定は難しくなる
  33. 33. nlm関数• ニュートン法タイプのアルゴリズムを用いて関数を最小化• 最大化したい場合は 関数の戻り値 ×(−1)• r-help記事によるとoptim関数より、しばしば良い結果を与えるらしい
  34. 34. いい結果がでるならやるしかない
  35. 35. $codeが1,2なら成功3,4,5,6なら失敗
  36. 36. fw (x) 80 100 120 140 160 -40 -20x 0 20 40
  37. 37. fw (x) 80 100 120 140 160 -40 -20x 0 20 40
  38. 38. 160どうもnlm関数は初期値周りの 140 最小値を探しているみたい 120fw (x) 100 80 -40 -20 0 20 40 x
  39. 39. nlminb関数• PORTルーチンを用いた最小化関数• 最大化したい場合は 関数の戻り値 ×(−1)• に包まれ(てしまっ)た最適化関数
  40. 40. fw (x) 80 100 120 140 160 -40 -20x 0 20 40
  41. 41. fw (x) 80 100 120 140 160 -40 -20x 0 20 40
  42. 42. 160ほぼ初期値の値が返ってきてしまう 140 120 fw (x) 100 80 -40 -20 0 20 40 x
  43. 43. まとめ• 非線形関数の最適化を行ってきた• 用途に応じて最適化関数は使い分ける必要有• 初期値選びで最適化が左右される• 関数が動いたからと言ってそれが最適解とは限らない
  44. 44. 参考文献• RjpWiki - 関数の最大・最小化 • http://www.okada.jp.org/RWiki/?%B4%D8%BF%F4%A4%CE%BA%C7%C2%E7%A1%A6%BA%C7%BE%AE%B2%BD• R基本統計関数マニュアル • http://cran.r-project.org/doc/contrib/manuals-jp/Mase-Rstatman.pdf• Stefano M. Iacus (2011) - Option Pricing and Estimation of Financial Models with R

×