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 ถูกกำหนดกฎของเกมโกะออกมาเพียงอย่างเดียว ไม่มีเกมมนุษย์ ไม่มีหนังสือเปิดเกม ไม่มีคำแนะนำ มันเล่นกับตัวเอง เริ่มจากการเดินสุ่ม
- ภายในสามวัน มันสามารถเหนือกว่าเวอร์ชันที่เคยชนะแชมป์โลกได้ ระหว่างทางมันค้นพบทฤษฎีเปิดเกมของมนุษย์มาหลายศตวรรษอีกครั้ง จากนั้นก็ทิ้งบางส่วนออกเพราะถือว่าด้อยกว่า
- มันเรียนรู้จากตัวเลขเดียวหลังแต่ละเกม: ชนะหรือแพ้ นั่นเป็นรูปแบบการเรียนรู้ที่แตกต่างกันอย่างสิ้นเชิงจากการถูกแสดงภาพที่มีป้ายกำกับนับล้าน
- บทเรียนนี้คือสามแนวคิดหลักของ การเรียนรู้ของเครื่อง, ข้อมูลที่แต่ละแบบต้องการ, และ น้ำหนัก ของเครือข่ายถูกเปลี่ยนอย่างไรโดย backpropagation
การเรียนรู้แบบมีผู้ควบคุม
- การเรียนรู้แบบมีผู้ควบคุม ฝึกบนข้อมูลที่มี ป้ายกำกับ: ภาพถ่ายที่มีแท็กว่า "แมว" หรือ "สุนัข", อีเมลที่ระบุว่าเป็นสแปมหรือไม่, บ้านที่มีราคาขาย
- โมเดลเรียนรู้การจับคู่จาก อินพุตไปยังฉลาก จากนั้นจึงได้รับอินพุตที่ไม่เคยเห็นมาก่อนและถูกขอให้สร้างฉลากนั้น
- แบ่งออกเป็น การจัดประเภท, ที่เอาต์พุตเป็นหมวดหมู่, และ การถดถอย, ที่เอาต์พุตเป็นตัวเลข
- ค่าใช้จ่ายของมันคือป้ายกำกับ: ต้องมีคนสร้างมันขึ้นมา ซึ่งสำหรับภาพหนึ่งล้านภาพคืองานของมนุษย์จำนวนมาก

ตัวอย่างที่มีป้ายกำกับเข้า, โมเดลออก, จากนั้นอินพุตที่ไม่มีป้ายกำกับ
Supervised learning uses:
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
Supervised learning trains on labelled examples (e.g. images tagged cat/dog).
การเรียนรู้แบบไม่มีผู้ควบคุม
- การเรียนรู้แบบไม่มีผู้ควบคุม ได้รับข้อมูลที่มี ไม่มีป้ายกำกับ และถูกขอให้หาโครงสร้างในนั้น
- การใช้ทั่วไปที่สุดคือ การจัดกลุ่ม: กลุ่ม INTO คลัสเตอร์ ของรายการที่คล้ายกัน เช่น ลูกค้าที่ซื้อสิ่งของคล้ายกัน โดยไม่มีใครตัดสินใจล่วงหน้าว่ากลุ่มควรเป็นอย่างไร
- นั่นคือจุดแข็งและจุดอ่อนของมัน: มันสามารถค้นพบการจัดกลุ่มที่ไม่มีใครคาดถึงได้ และมันไม่สามารถบอกคุณได้ว่าการจัดกลุ่มนั้น หมายถึงอะไร

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.
ตัวอย่างการคำนวณ: เลือกแนวคิด
- การสแกนทางการแพทย์หนึ่งหมื่นครั้ง โดยแต่ละครั้งมีการติดฉลากโดยแพทย์ว่าเป็นก้อนเนื้องอกหรือไม่ ใช้เพื่อฝึกระบบให้ระบุการสแกนใหม่ การเรียนรู้ภายใต้การควบคุม: ข้อมูลมีฉลากและงานคือการเรียนรู้จากอินพุตไปยังฉลาก โดยเฉพาะการจำแนกประเภท
- ร้านค้าต้องการทราบว่าลูกค้าแบ่งกลุ่มตามธรรมชาติหรือไม่ โดยไม่กำหนดกลุ่มล่วงหน้า. การเรียนรู้แบบไม่มีผู้สอน: ไม่มีฉลาก, ภารกิจคือการค้นพบโครงสร้าง, โดยเฉพาะการคลัสเตอร์
- แขนหุ่นยนต์ต้องเรียนรู้ในการวางชิ้นส่วน, ที่ตัดสินโดยความสำเร็จของการพยายามแต่ละครั้งเท่านั้น การเรียนรู้แบบเสริมแรง: เอเจนต์, ลำดับของการกระทำ, และผลตอบแทนแทนป้ายกำกับ
- ชื่อบนวคิดจากนั้นอธิบายเหตุผลจาก ข้อมูล: มีป้ายกำกับ, ไม่มีป้ายกำกับ, หรือสัญญาณผลตอบแทน
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
- การฝึกคือการปรับ น้ำหนัก เพื่อให้เอาต์พุตของเครือข่ายตรงกับเป้าหมาย วิธีคือ backpropagation กับ gradient descent
- Forward pass: ส่งอินพุตผ่านเครือข่ายและรับเอาต์พุต คำนวณความผิดพลาด โดยใช้ loss function, ซึ่งวัดว่าเอาต์พุตห่างจากเป้าหมายแค่ไหน
- Backward pass: กระจายความผิดพลาดย้อนกลับผ่านเลเยอร์เพื่อหา gradient ของน้ำหนักแต่ละตัว นั่นคือว่าน้ำหนักนั้นมีส่วนร่วมกับความผิดพลาดเท่าไหร่
- อัปเดต: เปลี่ยนน้ำหนักแต่ละตัวด้วยก้าวเล็กๆ ตัดกับ gradient ขนาดก้าวคือ learning rate

ลงเนินทีละก้าวเล็กๆ
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.
Epochs และทำไม Learning Rate จึงสำคัญ
- การวนรอบผ่านชุดข้อมูลฝึกสอนทั้งหมดหนึ่งครั้งเรียกว่า epoch การฝึกจะซ้ำหลายรอบจนกว่าค่าความผิดพลาดจะหยุดลดลง
- หาก Learning rate ใหญ่ เกินไป จะข้ามจุดต่ำสุดและทำให้ค่าความผิดพลาดกระโดดไปมา; ถ้า เล็ก เกินไป การฝึกจะใช้เวลานานเกินจำเป็น
- หลังการฝึกแล้ว การใช้โมเดลเป็นการ forward pass เพียงอย่างเดียว นี่คือเหตุผลที่เครือข่ายที่ถูกฝึกแล้วตอบคำถามได้ทันที แม้ว่าการฝึกจะใช้เวลาถึงวัน

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.
คะแนนที่หลุดหายไป
- ยืนยัน Paradigm จาก ข้อมูล: มีป้ายกำกับหมายถึง supervised, ไม่มีป้ายกำกับหมายถึง unsupervised, มีสัญญาณรางวัลหมายถึง reinforcement
- Reinforcement learning ไม่มี labels การเรียก reward ของมันว่า label คือความสับสนแบบคลาสสิก
- Backpropagation คือ forward, error, backward, update, ทำซ้ำ การบอกแค่ว่า "มันปรับน้ำหนัก" เป็นเพียงคำตอบครึ่งเดียว
- Learning rate คือขนาดของแต่ละก้าว ไม่ใช่ความเร็วในการฝึกหรือจำนวน epoch
คุณเข้าใจแล้ว
- supervised เรียนรู้จาก input ไปหา label จาก labelled data เพื่อ classification หรือ regression · unsupervised ค้นหารูปแบบเช่น clusters ใน unlabelled data · reinforcement มี agent ที่เรียนรู้ policy จาก rewards ผ่านการลองผิดลองถูก
- เลือก paradigm จากสิ่งที่ข้อมูลให้มา ไม่ใช่จากความยากของงาน
- backpropagation: forward pass หนึ่งครั้ง, ค่า error จาก loss function, backward pass ที่ให้ gradient ของแต่ละ weight, แล้วทำการอัปเดตขนาดที่กำหนดโดย learning rate
- การฝึกทำซ้ำหลาย epochs; การใช้โมเดลที่ถูกฝึกแล้วเป็นการ forward pass ครั้งเดียว
เกิดปัญหาอะไรขึ้น? เฉพาะทีมเว็บไซต์เท่านั้นที่เห็นข้อมูลนี้
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