Machine learning types and training
導入済み
13:04
AIとは何か
猫と犬を見分けるルールを誰一人として書いた者はいない。「耳が尖っているしひげがあるなら」という条件をプログラムで入力した程序员もいない。それでもあなたの電話はそれを認識する…
英語のナレーション・英語と中国語の字幕を切り替え可能
このレッスンの内容
| English | 意味 |
|---|---|
| machine learning/məˈʃiːn ˈlɜːnɪŋ/ | 機械学習 |
| weights | Numbers that control how strongly inputs affect a network's outputs. |
| backpropagation/ˌbækprəpəˈɡeɪʃn/ | 逆伝播 |
| Supervised learning/ˈsuːpəvaɪzd ˈlɜːnɪŋ/ | A way of training a model using data with correct labels. |
| labels/ˈleɪblz/ | A symbolic name identifying an item; in assembly language, a name associated with an instruction or storage address. |
| model/ˈmɒdl/ | A simplified representation of a system used to explain, analyse or predict its behaviour. |
| classification/ˌklæsɪfɪˈkeɪʃn/ | 分類 |
| regression/rɪˈɡreʃn/ | A statistical method for modelling how a response variable is related to one or more explanatory variables. |
| Unsupervised learning/ʌnˈsuːpəvaɪzd ˈlɜːnɪŋ/ | A way of finding patterns in data without labels. |
| clustering/ˈklʌstərɪŋ/ | The process of grouping similar items without labels. |
| clusters/ˈklʌstəz/ | クラスター |
| Reinforcement learning/ˌriːɪnˈfɔːsmənt ˈlɜːnɪŋ/ | A way of learning actions through rewards to increase total reward over time. |
| agent/ˈeɪdʒənt/ | エージェント |
| environment/enˈvaɪrənmənt/ | The surrounding conditions that affect an organism, system or activity. |
| action/ˈækʃn/ | Something a system does when an event causes a change of state. |
| state/steɪt/ | The saved information needed to continue a program from its current point. |
| reward/rɪˈwɔːd/ | 報酬 |
| policy/ˈpɒlɪsi/ | ポリシー |
| trial and error | A way of learning by trying actions and using their results. |
| reward signal | A number that tells an agent how good an outcome was. |
| targets | The correct outputs that a network's outputs are trained to match. |
| gradient descent/ˈɡreɪdɪənt dɪˈsent/ | 勾配降下法 |
| Forward pass | Feed an input through the network and get its output. Compute the error using a loss function , which measures how far the output is from the target. |
| loss function/lɒs ˈfʌŋkʃn/ | 損失関数 |
| Backward pass | Propagate the error backwards through the layers to find each weight's gradient , the rate of change of the loss with respect to that weight. |
| layers/ˈleɪəz/ | Distinct levels arranged above, below or within one another in a structure or system. |
| gradient/ˈɡreɪdɪənt/ | The spatial rate and direction of change of a quantity; for a scalar field its gradient points towards the steepest increase. |
| learning rate/ˈlɜːnɪŋ reɪt/ | A setting that controls the size of parameter updates made during model training. |
| epoch/ˈiːpɒk/ | エポック |
| training set/ˈtreɪnɪŋ set/ | The collection of data used to train a model. |
人間が一度も指したことがない序盤を自ら習得したプログラム
- AlphaGo Zeroには囲碁のルールのみが与えられた。他は何も与えられなかった。人間の対局も、序盤書も、助言も不要だった。ランダムな手から始まり、自身と対戦した。
- 3日間で世界チャンピオンを破ったバージョンを上回った。その過程で、数世紀にわたる人間の序盤理論を再発見し、劣る部分を捨てた。
- 各ゲームの後に勝ったか負けたかという単一の数値から学習した。これは、百万枚のラベル付き写真を見せられて学習するのと全く異なる種類の学習である。
- この教訓は、機械学習の3つのパラダイム、各々が必要なデータ、およびネットワークの重みが逆伝播によって実際にどのように変更されるかである。
教師あり学習
- 教師あり学習はラベル付きのデータを用いて訓練する:「猫」や「犬」とタグ付けされた写真、スパムまたは非スパムと分類されたメール、売却価格付きの家屋など。
- モデルは入力からラベルへのマッピングを学習し、その後、見たことがない入力を提供してラベルを生成させる。
- 分類(classification)、すなわち出力がカテゴリである場合と、回帰(regression)、すなわち出力が数値である場合に二分される。
- そのコストはラベルにある:誰かがそれらを作成する必要があるため、百万枚の画像に対しては膨大な人手作業となる。

ラベル付き例を入力し、モデルを出力し、次にラベルなしの入力を与える

Supervised learning uses:
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Supervised learning trains on labelled examples (e.g. images tagged cat/dog).
教師なし学習
- 教師なし学習はラベルのないデータを与えられ、そこに構造を見つけるよう求められる。
- 最も一般的な用途はクラスタリングである:類似したアイテムをクラスターにグループ化すること(例:類似した商品を購入する顧客)。事前に関係なくグループを決定する人物はいない。
- それが強みであり弱みでもある:誰も予想していなかったグループ化を発見できるが、そのグループ化が何を意味するかをあなたに伝えることはできない。

Unsupervised learning is used to:
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
With no labels, unsupervised learning discovers patterns/clusters in the data.
強化学習
- 強化学習には、環境内で行動するエージェントが存在する。各行動は状態を変化させ、報酬を返すが、その報酬が長期間ゼロであることもある。
- エージェントは、時間の経過における総報酬を最大化する戦略であるポリシーを学習する。ラベル付きの例は一切用いず、試行錯誤によって学習する。
- 正しい一手は最終的な結果によって初めて判明する意思決定の連続である問題に適している:ゲーム、ロボット制御、自動運転車。まさにAlphaGo Zeroの場合である。
In reinforcement learning, the agent learns by:
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
The agent tries actions, receives rewards, and learns a policy that maximises long-term reward.
In reinforcement learning the agent learns a ____ that maximises its total reward over time.
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
It learns by trial and error from rewards, with no labelled examples at all, which is why it suits sequences of decisions.
worked example: パラダイムの選択
- Ten thousand medical scans, each labelled by a doctor as showing a tumour or not, are used to train a system to flag new scans. Supervised: the data has labels and the task is to learn input to label, specifically a classification.
- ある店舗は、顧客が自然なグループに分かれるかどうかを知りたいが、事前にグループを決定したいと考えていない。 教師なし学習:ラベルは存在せず、タスクは構造の発見、特にクラスタリングである。
- ロボットアームは部品を配置するのを学び、各試みが成功したかどうかだけで評価される。 強化学習:エージェント、一連の行動、そしてラベルではなく報酬がある。
- パラダイムの名前を挙げ、データ(ラベル付き、ラベルなし、あるいは報酬信号)に基づいて正当性を説明せよ。
AI learning type lab
Classify AI examples by the type of learning or concern involved.
Match each ML paradigm to its data.
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
Supervised = labels; unsupervised = no labels; reinforcement = reward feedback.
Match each situation to the machine-learning paradigm it needs.
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
Labels, no labels, or a reward. The data decides the paradigm, not the difficulty of the task.
逆伝播による訓練
- 訓練とは、ネットワークの出力がターゲットに一致するように重みを調整することである。その手法は勾配降下法を用いた逆伝播である。
- 順伝播:入力をネットワークに渡して出力を得る。損失関数を用いて誤差を計算し、出力がターゲットからどれだけ離れているかを測る。
- 逆伝播:その誤差を層を遡って伝播させ、各重みの勾配、つまりその重みが誤差にどれだけ寄与したかを見つける。
- 更新:各重みを勾配の逆方向へわずかなステップ分変更する。そのステップサイズが学習率である。

下り坂を、小さなステップを一つずつ踏みしめて

Backpropagation trains a network by:
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
The error flows from the output back through the network (chain rule) so every weight's gradient is found, then weights step downhill.
Put one round of backpropagation training in order.
難易度 3/5 · 200 コイン + 今日初回達成時の小ボーナス
Forward, error, backward, update, repeated over many epochs until the error stops falling.
エポックと学習率の重要性
- 全トレーニングデータセットを一度通すことをエポックと呼ぶ。エラーが減少しなくなるまで、多くのエポックにわたってトレーニングを繰り返す。
- 学習率が大きすぎると最小値を見越して overshoot(オーバーシュート)し、エラーが振動する。小さすぎると、必要な時間より遥かに長い時間を要する。
- トレーニング後、モデルを使用するのはフォワードパスのみであるため、トレーニングに数日かかったとしても、 trained network(学習済みネットワーク)は即座に回答できる。

In gradient descent the learning rate sets how big a step each weight update takes — too large overshoots the minimum, too small makes training slow.
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Backpropagation finds each weight's gradient; the learning rate scales how far down that gradient the weight moves.
Which statements about training are correct? Select すべて that apply.
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
The learning rate is the size of each weight update. That is why training can take days while a prediction takes milliseconds.
見落としやすいポイント
- データからパラダイムを正当化せよ:ラベルがある場合はsupervised(教師あり)、ない場合はunsupervised(教師なし)、報酬信号がある場合はreinforcement(強化学習)。
- 強化学習にはラベルがない。その報酬をラベルと呼ぶことは、古典的な混同である。
- バックプロパゲーションはフォワード、エラー、バックワード、更新の繰り返しである。「重みを調整するだけ」と名指しするだけでは、半分の答えに過ぎない。
- 学習率とは各ステップの大きさであり、トレーニングの速度やエポックの数ではない。
理解できましたか
- **supervised(教師あり)はlabelled(ラベル付き)**データから入力とラベルの対応を学び、**classification(分類)**や回帰を行う · **unsupervised(教師なし)はunlabelled(ラベルなし)データ内のclusters(クラスター)**のような構造を見つける · **reinforcement(強化学習)はagent(エージェント)がrewards(報酬)に基づいて試行錯誤しながらpolicy(政策)**を学ぶ
- タスクの難易度ではなく、データが提供している内容からパラダイムを選択せよ。
- バックプロパゲーション:フォワードパス、loss function(損失関数)によるエラー、各重みの勾配を与えるバックワードパス、そしてlearning rate(学習率)によって決まる大きさでの更新。
- トレーニングは多くのエポックで繰り返され、学習済みモデルの使用は1回のフォワードパスである。
何が問題でしたか?この内容はサイトの運営チームだけが確認します。
Try it in the lab 32
All labs →- Teach a Perceptron
- Train a Network on Your Drawings
- Teach a Robot by Reward
- Build a Decision Tree
- Nearest Neighbours
- Roll Down the Loss
- Find the Groups
- Find the Shortest Route
- See Like a Computer
- Guess the Next Word
- Is the Computer Fair?
- Build an Expert System
- Evolve a Catapult
- Catch the Spam
- Think Ahead
- Inside a Neural Network
- Learning or Remembering? Overfitting
- Search the Maze
- What Should I Watch? A Recommender
- Teach a Car to Drive
- Matchbox Learner
- Build a Chatbot
- Fewer Colours
- Mood Meter
- Spot the Fraud
- Hear the Word
- Follow the Ants
- Plan the Delivery Round
- Squash the Data
- Explore or Exploit? Learning by Trying
- Mark the Model
- Ask Many Models