SlideShare a Scribd company logo
NN基礎
Koki Natsume
目次
・はじめに
・NN
・学習
・まとめ、次回予告
※言語はPython3系で書きます。
自己紹介
名前:棗 光幹
好きな言語:JavaScript(Node.js)、Golang
分野:バックエンド開発、人工知能開発
冴えカノ2期楽しみ
はじめに
今回の目標
NN基礎!!!
歴史的な流れ
パーセプトロン・NNの誕生(1940年代)
AIの冬
誤差逆伝播法・CNN(1980〜90年代)
AI二度目の冬
DBNやビックデータ(2000年代)
深層学習の良さが認知され始めた! 👈イマココ!
👈今日やるのはここ
NN
・人間の脳の神経回路(ニューロン)の仕組みを真似したアルゴリズム
・パーセプトロンに自動重みパラメータ追加機能を付け加えようなもの
パーセプトロン
複数の信号を「入力」として受け取り一つの信号を「出力」するアルゴリズム。
単層パーセプトロンこそNNの単位となる。
※この図はb(バイアス:ニューロンの発火のしやすさ
をコントロールするもの)なし。
入力を活性化関数で評価する。
ちなみに活性化関数とは、
入力された値を境にして出力が切り替わる関数。
隠れ層or出力層
隠れ層活性化関数
y = f (b + w1*x1 + w2*x2 + … + wn*xn)
y = f(x)の f が活性化関数となる。
yx
f()よく用いられる隠れ層活性化関数
シグモイド関数
f(x) = 1 / ( 1 + exp(-x) )
最近はReLU関数というのも用いられる
出力層活性化関数
よく用いられる出力層活性化関数
恒等関数(回帰問題)
入力をそのまま出力する。
ソフトマックス関数(分類問題)
以下のように指数関数を指数関数の総和で割る。
y = exp(x) / sum( exp(x) )
x y
x1
x2
x3
y1
y2
y3
3層のニューラルネットワーク
学習
訓練データから適切な重みパラメータ(w)を自動で取得する事。
損失関数という指標を用いて、その値ができるだけ小さくなるように重みパラ
メータを探す。
また、その小さな損失関数の値を探し出すための手法として勾配法を用いる。
機械学習との違い
機械学習の場合
データ
ニューラルネットワークの場合
データ
特微量 機械学習 答え
ニューラルネットワーク 答え
つまり、特微量も機械が学習する!
損失関数
2乗和誤差
E = 0.5*sum( (y-t)**2 )
交差エントロピー誤差
E = - sum( t * log(y + delta) )
勾配法
勾配とは
すべての変数(例えば、x0,x1)の偏微分をベクトルとしてまとめたもの.例えば、( ∂f/∂x0, ∂f/x1,
∂f/∂x2 )
勾配は各場所(座標)においてその関数の値をもっとも減らす方向を示す。
※最小値を求める場合、正確には勾配降下法という。
その勾配方向へ進むことで徐々に関数の値を減らすのを勾配法という。
x0 = x0 - n*( ∂f/∂x0 )
x1 = x1 - n *( ∂f/∂x1 )
※nは、学習率(どれだけ学習すべきか、どれだけパラメータを更新するかを決めること)という。
0.1や 0.01など前もって決めておく。
学習アルゴリズムはつまり
1. ミニバッチで選ばれたデータを選び出す。
2. ミニバッチの損失関数を減らすために、各重みパラメータの勾配を求める。
3. 重みパラメータを勾配方向微少量だけ更新する。
4. 1.2.3を繰り返す。
ということ。
まとめ・次回予告
・ニューラルネットワークは活性化関数を用いてあれこれする。
・学習は損失関数を指標にして、その損失関数の値が小さくなるように重みパ
ラメータを更新する。重みパラメータの更新は勾配法を用いて行う。
次回予告
誤差逆伝播法!

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 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 ChatGPTEverything 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 EngineeringsProduct 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 HealthHow 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.pdfAI 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 CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO 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)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 2024How 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 InsightsSocial 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 2024Trends 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 summary5 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 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 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 IntentGoogle'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 How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime 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 managementThe 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...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
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 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 ChatGPTEverything 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 EngineeringsProduct 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 HealthHow 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.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO 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)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 2024How 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 InsightsSocial 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 2024Trends 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 summary5 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 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 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 IntentGoogle'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 How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe 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...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

機械学習勉強会2017/2/19(nn基礎)