Suche senden
Hochladen
Ml4se 2 2_slideshare
•
0 gefällt mir
•
1,420 views
Daisuke Shimada
Folgen
ITエンジニアのための機械学習理論入門 第2章 最小二乗法 2.2 オーバーフィッティングの検出
Weniger lesen
Mehr lesen
Software
Diashow-Anzeige
Melden
Teilen
Diashow-Anzeige
Melden
Teilen
1 von 28
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
Dockerことはじめ
Dockerことはじめ
Daisuke Shimada
ITエンジニアのための機械学習理論入門8.1ベイズ推定
ITエンジニアのための機械学習理論入門8.1ベイズ推定
Daisuke Shimada
ブロックチェーンの基礎を学び、未来に活かす。
ブロックチェーンの基礎を学び、未来に活かす。
Daisuke Shimada
ロジスティック回帰の考え方・使い方 - TokyoR #33
ロジスティック回帰の考え方・使い方 - TokyoR #33
horihorio
既存システムに対するブロックチェーン適用の検証と考察
既存システムに対するブロックチェーン適用の検証と考察
Daisuke Shimada
ネタ募集箱を支える技術 開発環境編
ネタ募集箱を支える技術 開発環境編
Daisuke Shimada
悩めるWindowsインストーラ制作者の道しるべ
悩めるWindowsインストーラ制作者の道しるべ
Daisuke Shimada
悩めるWindowsユーザーの為のコマンドライン入門
悩めるWindowsユーザーの為のコマンドライン入門
Daisuke Shimada
Empfohlen
Dockerことはじめ
Dockerことはじめ
Daisuke Shimada
ITエンジニアのための機械学習理論入門8.1ベイズ推定
ITエンジニアのための機械学習理論入門8.1ベイズ推定
Daisuke Shimada
ブロックチェーンの基礎を学び、未来に活かす。
ブロックチェーンの基礎を学び、未来に活かす。
Daisuke Shimada
ロジスティック回帰の考え方・使い方 - TokyoR #33
ロジスティック回帰の考え方・使い方 - TokyoR #33
horihorio
既存システムに対するブロックチェーン適用の検証と考察
既存システムに対するブロックチェーン適用の検証と考察
Daisuke Shimada
ネタ募集箱を支える技術 開発環境編
ネタ募集箱を支える技術 開発環境編
Daisuke Shimada
悩めるWindowsインストーラ制作者の道しるべ
悩めるWindowsインストーラ制作者の道しるべ
Daisuke Shimada
悩めるWindowsユーザーの為のコマンドライン入門
悩めるWindowsユーザーの為のコマンドライン入門
Daisuke Shimada
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Weitere ähnliche Inhalte
Empfohlen
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Empfohlen
(20)
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Ml4se 2 2_slideshare
1.
ITエンジニアのための 機械学習理理論論⼊入⾨門 第2章 最⼩小⼆二乗法: 機械学習理理論論の第⼀一歩 2.2 オーバーフィッティングの検出
2.
本章のGoal オーバーフィッティング を避け、最適な次数Mを決定 する⽅方法を学びます
3.
2.2 オーバーフィッティングの検出 (おさらい) 「2.1.4 サンプルコードによる確認」では 以下のようなグラフを描くことができました。
4.
2.2.1 トレーニングセットとテストセット 次数Mを9にすると、 与えられたトレーニ ングセットを完全に 再現でき、平⽅方根 平均⼆二乗誤差を0に することができた! 完璧だ!
5.
2.2.1 トレーニングセットとテストセット 次数Mを9にすると、 与えられたトレーニ ングセットを完全に 再現でき、平⽅方根 平均⼆二乗誤差を0に することができた! 完璧だ! _⼈人⼈人⼈人⼈人⼈人⼈人⼈人⼈人⼈人⼈人_ > そんなことはない
<  ̄Y^Y^Y^Y^Y^Y^Y ̄
6.
2.2.1 トレーニングセットとテストセット このデータは、 「たまたまこの時に 得られた値」であり、 次にデータを取得し た時に同じ値が得ら れるわけではない。
7.
2.2.1 トレーニングセットとテストセット このデータは、 「たまたまこの時に 得られた値」であり、 次にデータを取得し た時に同じ値が得ら れるわけではない。 実際得られる値はバラバラ
8.
2.2.1 トレーニングセットとテストセット 次数が異異なるグラフを⾒見見⽐比べて、より最適そうな ⽅方はどちらか?を判断すればいいのでしょうか? M=3っぽいなぁ。
9.
2.2.1 トレーニングセットとテストセット 次数が異異なるグラフを⾒見見⽐比べて、より最適そうな ⽅方はどちらか?を判断すればいいのでしょうか? _⼈人⼈人⼈人⼈人⼈人⼈人⼈人⼈人⼈人⼈人_ > そんなことはない
<  ̄Y^Y^Y^Y^Y^Y^Y ̄
10.
2.2.1 トレーニングセットとテストセット 次数が異異なるグラフを⾒見見⽐比べて、より最適そうな ⽅方はどちらか?を判断すればいいのでしょうか? 1. 複雑なデータを扱う場合はグラフを書くのが困難。 2.
そもそも正解の曲線(下図の点線: y=sin(2πx)) は誰にもわかっていない。
11.
2.2.1 トレーニングセットとテストセット ここで重要になってくるのが、仮説と検証。 現実的にはデータは限られているので、利利⽤用可能 なすべてのデータをトレーニングセットとテスト セットに分けておく。 仮説 トレーニングセット 検証 テストセット 学習結果 機械学習を実施 学習結果を評価
12.
2.2.2 テストセットによる検証結果
13.
2.2.2 テストセットによる検証結果 トレーニングセットは 次数を⼤大きくするほど 誤差が減少する。 テストセットは ある次数から誤差 が減少しない。 (モデルの汎化能 ⼒力力は⾼高まらない)
14.
2.2.2 テストセットによる検証結果 トレーニングセットは 次数を⼤大きくするほど 誤差が減少する。 テストセットは ある次数から誤差 が減少しない。 (モデルの汎化能 ⼒力力は⾼高まらない) トレーニングセット だけに特化した最適化 が⾏行行われる状況を オーバーフィッティング (過学習)と呼ぶ。
15.
2.2.3 クロスバリデーションによる汎化能⼒力力の検証 1. 前ページのグラフから、M=4あたりでオーバー フィッティングが発⽣生している事がわかる。 M=4であたりからオー バーフィッティングが 発⽣生しはじめている。
16.
2.2.3 クロスバリデーションによる汎化能⼒力力の検証 1. 前ページのグラフから、M=4あたりでオーバー フィッティングが発⽣生している事がわかる。 2.
トレーニングセットがあればあるほど精度度は⾼高 まるが、現実的にはなかなかそうもいかないこ とが多い。
17.
2.2.3 クロスバリデーションによる汎化能⼒力力の検証 1. 前ページのグラフから、M=4あたりでオーバー フィッティングが発⽣生している事がわかる。 2.
トレーニングセットがあればあるほど精度度は⾼高 まるが、現実的にはなかなかそうもいかないこ とが多い。 3. 機械学習で重要なことは、トレーニングセット に含まれるデータをテストセットに混ぜて使⽤用 してはいけない。これは全く意味が無い。
18.
2.2.3 クロスバリデーションによる汎化能⼒力力の検証 検証対象のデータ量量が少なく、データの 選び⽅方によって⼤大きな誤差が⽣生じる可能性が ある場合には、貴重なデータを無駄なく 使いつつ、適切切な検証を⾏行行うことができる クロスバリデーション(交差検証)法を⽤用いる。 ちなみに、サンプルプログラムのように データが⼤大量量に⽤用意できる場合の⼿手法は テストサンプル法と呼ぶ。
19.
2.2.3 クロスバリデーションによる汎化能⼒力力の検証
20.
クロスバリデーション法について クロスバリデーション法の⼿手順 1. 元のデータをn個のブロックに分ける。 (サンプル数に対して適切切に決める) 2.
各ブロックに含まれるデータ量量は同程度度になるように調整する。 3. 各ブロックは層化されていることが望ましい。 1 2 3 n ・ ・ ・ 1 2 3 n ・ ・ ・ 1 2 3 n ・ ・ ・ 1 2 3 n ・ ・ ・ ・・・ 1回目 2回目 3回目 n回目
21.
クロスバリデーション法について 4. 1つ⽬目のブロックをテストデータ、それ以外をトレーニングデータ としてモデルの構築と精度度の算出する。 5. 次に2つ⽬目のブロックを(同上。
(これをnブロック⽬目まで繰り返す。) 6. 最後に各回の精度度の平均を、モデルの推定精度度とする。 1 2 3 n ・ ・ ・ 1 2 3 n ・ ・ ・ 1 2 3 n ・ ・ ・ 1 2 3 n ・ ・ ・ ・・・ 1回目 2回目 3回目 n回目 精度1 精度2 精度3 精度n 推定精度 平均
22.
クロスバリデーション法について ここでn回⽬目に構築された決定⽊木(データセット)を とし、 その精度度を とすると、 交差検証による推定精度度
は次の式で与えられる。
23.
層化 (Stratification) クロスバリデーション法でもテストサンプル 法でも、元データを分割する場合には層化 (Stratification)を⾏行行う。 層化とは、元データからサンプリングをする 際にサンプリングデータの分布が元データと 同じになるようにすること。
24.
2.2.4 データ数によるオーバーフィッティングの変化 例例題では、トレーニングセットのNが10 なのでパラメータ数が10個以上あれば すべてのデータを正確に再現できる。 (これがオーバーフィッティング) Nを増やせば過学習 しないんじゃない?
25.
2.2.4 データ数によるオーバーフィッティングの変化 #------------# # Parameters
# #------------# N=10 # サンプルを取得する位置 x の個数 M=[0,1,3,9] # 多項式の次数 02-‐square_error.py 15行目から19行目 例えば100にしてみる。
26.
2.2.4 データ数によるオーバーフィッティングの変化 だいたい⼀一緒!
27.
2.2.4 データ数によるオーバーフィッティングの変化 トレーニング セットの誤差が 減少していない!
28.
まとめ 1. 機械学習は与えられたデータに基いて最適な パラメータを決定する仕組み。 2. 得られた結果が「未来の値を予測する」こと に役⽴立立つかどうかが重要。 3.
検証対象の元データが少ない場合はクロスバ リデーション法により効率率率よく精度度を⾼高める。 4. データ数が多ければ多いほどオーバーフィッ ティングは起こりにくく、精度度は⾼高まる。
Jetzt herunterladen