ทดสอบความเข้าใจ
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
คำถามต่อไปนี้จะช่วยให้คุณเข้าใจแนวคิดหลักของ ML ได้ดียิ่งขึ้น
ความสามารถในการคาดการณ์
โมเดลแมชชีนเลิร์นนิงที่มีการควบคุมดูแลได้รับการฝึกโดยใช้ชุดข้อมูลที่มีตัวอย่างที่ติดป้ายกำกับ โมเดลจะเรียนรู้วิธีคาดการณ์ป้ายกำกับจากฟีเจอร์ อย่างไรก็ตาม ฟีเจอร์บางรายการในชุดข้อมูลอาจไม่มีความสามารถในการคาดการณ์ ในบางกรณี มีเพียงไม่กี่ฟีเจอร์ที่ทำหน้าที่เป็นตัวบ่งชี้ของป้ายกำกับ ในชุดข้อมูลด้านล่าง ให้ใช้ราคาเป็นป้ายกำกับและคอลัมน์ที่เหลือเป็นฟีเจอร์
คุณคิดว่าฟีเจอร์ 3 รายการใดมีแนวโน้มที่จะเป็นตัวทำนายราคารถยนต์ได้ดีที่สุด
Make_model, year, miles
ข้อมูลผู้ผลิต/รุ่น ปี และระยะทางของรถยนต์มีแนวโน้มที่จะเป็นหนึ่งในตัวคาดการณ์ราคาที่แม่นยำที่สุด
Color, height, make_model
ความสูงและสีของรถไม่ใช่ตัวบ่งชี้ที่ชัดเจนสำหรับราคาของรถ
Miles, gearbox, make_model
กระปุกเกียร์ไม่ใช่ตัวทำนายราคาหลัก
Tire_size, wheel_base, year
ขนาดยางและฐานล้อไม่ใช่ตัวบ่งชี้ราคารถที่ชัดเจน
การเรียนรู้ที่มีการควบคุมดูแลและไม่มีการควบคุมดูแล
คุณจะใช้แนวทางที่มีการควบคุมดูแลหรือไม่มีการควบคุมดูแล ทั้งนี้ขึ้นอยู่กับปัญหา
เช่น หากทราบค่าหรือหมวดหมู่ที่ต้องการคาดการณ์ล่วงหน้า คุณจะใช้การเรียนรู้แบบควบคุม อย่างไรก็ตาม หากต้องการทราบว่าชุดข้อมูลของคุณมีการแบ่งกลุ่มหรือการจัดกลุ่มตัวอย่างที่เกี่ยวข้องหรือไม่ คุณจะใช้การเรียนรู้แบบไม่ควบคุม
สมมติว่าคุณมีชุดข้อมูลผู้ใช้สําหรับเว็บไซต์ช็อปปิ้งออนไลน์ และมีคอลัมน์ต่อไปนี้
หากต้องการทําความเข้าใจประเภทของผู้ใช้ที่เข้าชมเว็บไซต์ คุณจะใช้การเรียนรู้แบบควบคุมหรือไม่ควบคุม
การเรียนรู้ที่ไม่มีการควบคุมดูแล
เนื่องจากเราต้องการให้โมเดลจัดกลุ่มลูกค้าที่เกี่ยวข้อง เราจึงใช้การเรียนรู้แบบไม่ควบคุม หลังจากโมเดลจัดกลุ่มผู้ใช้แล้ว เราสร้างชื่อของเราเองสําหรับแต่ละกลุ่ม เช่น "ผู้มองหาส่วนลด" "ผู้มองหาดีล" "ผู้เลือกดู" "ผู้ภักดี" และ "ผู้เลือกดูไปเรื่อยๆ"
การเรียนรู้แบบควบคุมเนื่องจากฉันพยายามคาดคะเนว่าผู้ใช้จัดอยู่ในคลาสใด
ในการเรียนรู้แบบควบคุมดูแล ชุดข้อมูลต้องมีป้ายกำกับที่คุณพยายามคาดการณ์ ชุดข้อมูลไม่มีป้ายกํากับที่อ้างอิงถึงหมวดหมู่ของผู้ใช้
สมมติว่าคุณมีชุดข้อมูลการใช้พลังงานสําหรับบ้านที่มีคอลัมน์ต่อไปนี้
คุณจะใช้ ML ประเภทใดในการคาดการณ์กิโลวัตต์ชั่วโมงที่ใช้ต่อปีสำหรับบ้านหลังใหม่ที่สร้างขึ้น
การเรียนรู้ที่มีการควบคุมดูแล
การเรียนรู้แบบควบคุมดูแลจะฝึกจากตัวอย่างที่ติดป้ายกำกับ ในชุดข้อมูลนี้ "กิโลวัตต์ชั่วโมงที่ใช้ต่อปี" จะเป็นป้ายกํากับเนื่องจากเป็นค่าที่คุณต้องการให้โมเดลคาดการณ์ ฟีเจอร์ดังกล่าว ได้แก่ "พื้นที่ใช้สอย" "สถานที่ตั้ง" และ "ปีที่สร้าง"
การเรียนรู้ที่ไม่มีการควบคุมดูแล
การเรียนรู้ที่ไม่มีการควบคุมดูแลจะใช้ตัวอย่างที่ไม่มีป้ายกำกับ ในตัวอย่างนี้ "กิโลวัตต์ชั่วโมงที่ใช้ต่อปี" จะเป็นป้ายกํากับเนื่องจากเป็นค่าที่คุณต้องการให้โมเดลคาดการณ์
สมมติว่าคุณมีชุดข้อมูลเที่ยวบินที่มีคอลัมน์ต่อไปนี้
หากต้องการคาดการณ์ค่าตั๋วเครื่องบิน คุณจะใช้การถดถอยหรือการแยกประเภทไหม
การถดถอย
เอาต์พุตของโมเดลการถดถอยคือค่าตัวเลข
การจัดประเภท
เอาต์พุตของโมเดลการจัดประเภทคือค่าแบบไม่ต่อเนื่อง ซึ่งปกติจะเป็นคํา ในกรณีนี้ ค่าตั๋วเครื่องบินจะเป็นค่าตัวเลข
คุณฝึกโมเดลการจัดประเภทเพื่อจัดประเภทค่าตั๋วเครื่องบินเป็น "สูง" "ปานกลาง" หรือ "ต่ำ" จากชุดข้อมูลได้ไหม
ได้ แต่ก่อนอื่นเราต้องแปลงค่าตัวเลขในคอลัมน์ airplane_ticket_cost
เป็นค่าเชิงหมวดหมู่
คุณสร้างโมเดลการจัดประเภทจากชุดข้อมูลได้
คุณอาจทำสิ่งต่อไปนี้
- ดูค่าเฉลี่ยราคาตั๋วจากสนามบินต้นทางไปยังสนามบินปลายทาง
- กําหนดเกณฑ์ที่จะเป็น "สูง" "ปานกลาง" และ "ต่ำ"
- เปรียบเทียบต้นทุนที่คาดการณ์กับเกณฑ์และแสดงผลหมวดหมู่ที่ค่าอยู่
ไม่ได้ คุณไม่สามารถสร้างโมเดลการจัดประเภทได้ ค่า airplane_ticket_cost
เป็นตัวเลข ไม่ใช่เชิงหมวดหมู่
คุณสามารถสร้างโมเดลการจัดประเภทได้ง่ายๆ
ไม่ได้ โมเดลการจัดประเภทจะคาดการณ์เพียง 2 หมวดหมู่ เช่น spam
หรือ not_spam
โมเดลนี้จะต้องคาดการณ์ 3 หมวดหมู่
โมเดลการจัดประเภทสามารถคาดการณ์หมวดหมู่ได้หลายหมวดหมู่ โมเดลเหล่านี้เรียกว่าโมเดลการจัดประเภทแบบหลายคลาส
การฝึกอบรมและการประเมิน
หลังจากฝึกโมเดลแล้ว เราจะประเมินโมเดลโดยใช้ชุดข้อมูลที่มีตัวอย่างที่ติดป้ายกำกับ และเปรียบเทียบค่าที่คาดการณ์ของโมเดลกับค่าจริงของป้ายกำกับ
เลือก 2 คำตอบที่ดีที่สุดสำหรับคำถาม
หากการคาดการณ์ของโมเดลไม่ตรงกับความเป็นจริง คุณอาจทําอย่างไรได้บ้างเพื่อปรับปรุงการคาดการณ์ให้ดีขึ้น
ฝึกโมเดลอีกครั้ง แต่ใช้เฉพาะฟีเจอร์ที่คุณเชื่อว่ามีความสามารถคาดการณ์ได้ดีที่สุดสำหรับป้ายกำกับ
การฝึกโมเดลอีกครั้งโดยใช้ฟีเจอร์ที่น้อยลงแต่มีความสามารถคาดการณ์ได้มากขึ้นจะสร้างโมเดลที่ทําการคาดการณ์ได้ดีขึ้น
คุณไม่สามารถแก้ไขโมเดลที่มีการคาดการณ์ไม่ตรงความเป็นจริง
คุณสามารถแก้ไขโมเดลที่มีการคาดการณ์ไม่ถูกต้องได้ โมเดลส่วนใหญ่ต้องได้รับการฝึกหลายรอบจึงจะทำการคาดการณ์ที่มีประโยชน์ได้
ฝึกโมเดลอีกครั้งโดยใช้ชุดข้อมูลขนาดใหญ่และหลากหลายมากขึ้น
โมเดลที่ฝึกจากชุดข้อมูลซึ่งมีตัวอย่างมากกว่าและมีค่าที่หลากหลายกว่าจะทําการคาดการณ์ได้ดีกว่า เนื่องจากโมเดลมีวิธีแก้ปัญหาทั่วไปที่ดีกว่าสําหรับความสัมพันธ์ระหว่างฟีเจอร์กับป้ายกํากับ
ลองใช้วิธีการฝึกอบรมแบบอื่น เช่น หากใช้วิธีการที่มีการควบคุมดูแล ให้ลองใช้วิธีการที่ไม่มีการควบคุมดูแล
วิธีการฝึกอบรมแบบอื่นจะไม่ทําให้การคาดการณ์ดีขึ้น
ตอนนี้คุณก็พร้อมที่จะดำเนินการขั้นถัดไปในเส้นทาง ML แล้ว
คู่มือ People + AI หากคุณกำลังมองหาชุดวิธีการ แนวทางปฏิบัติแนะนำ และตัวอย่างที่นำเสนอโดย Googler, ผู้เชี่ยวชาญในอุตสาหกรรม และการวิจัยทางวิชาการสําหรับการใช้ ML
การกำหนดปัญหา หากคุณกําลังมองหาแนวทางที่ผ่านการทดสอบภาคสนามสําหรับการสร้างโมเดล ML และหลีกเลี่ยงข้อผิดพลาดที่พบบ่อย
หลักสูตรเร่งรัดเกี่ยวกับแมชชีนเลิร์นนิง หากคุณพร้อมที่จะเรียนรู้เพิ่มเติมเกี่ยวกับ ML อย่างละเอียดและลงมือปฏิบัติ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[null,null,["อัปเดตล่าสุด 2025-07-27 UTC"],[[["\u003cp\u003eThis page tests your understanding of core machine learning (ML) concepts through interactive questions.\u003c/p\u003e\n"],["\u003cp\u003eIt covers fundamental ML topics such as predictive power of features, supervised and unsupervised learning, and model training and evaluation.\u003c/p\u003e\n"],["\u003cp\u003eYou'll learn how to choose the right ML approach for different problems and assess the effectiveness of a trained model.\u003c/p\u003e\n"],["\u003cp\u003eLinks to further resources are provided to deepen your understanding of ML and its practical applications.\u003c/p\u003e\n"]]],[],null,["# Test Your Understanding\n\n\u003cbr /\u003e\n\nThe following questions help you solidify your understanding of core ML concepts.\n\nPredictive power\n----------------\n\nSupervised ML models are trained using datasets with labeled examples. The model\nlearns how to predict the label from the features. However, not every feature in\na dataset has predictive power. In some instances, only a few features act as\npredictors of the label. In the dataset below, use price as the label\nand the remaining columns as the features.\n\nWhich three features do you think are likely the greatest predictors for a car's price? \nMake_model, year, miles. \nA car's make/model, year, and miles are likely to be among the strongest predictors for its price. \nColor, height, make_model. \nA car's height and color are not strong predictors for a car's price. \nMiles, gearbox, make_model. \nThe gearbox isn't a main predictor of price. \nTire_size, wheel_base, year. \nTire size and wheel base aren't strong predictors for a car's price.\n\nSupervised and unsupervised learning\n------------------------------------\n\nBased on the problem, you'll use either a supervised or unsupervised approach.\nFor example, if you know beforehand the value or category you want to predict,\nyou'd use supervised learning. However, if you wanted to learn if your dataset\ncontains any segmentations or groupings of related examples, you'd use\nunsupervised learning.\n\nSuppose you had a dataset of users for an online shopping website, and it contained the following columns:\n\nIf you wanted to understand the types of users that visit the site, would you use supervised or unsupervised learning? \nUnsupervised learning. \nBecause we want the model to cluster groups of related customers, we'd use unsupervised learning. After the model clustered the users, we'd create our own names for each cluster, for example, \"discount seekers,\" \"deal hunters,\" \"surfers,\" \"loyal,\" and \"wanderers.\" \nSupervised learning because I'm trying to predict which class a user belongs to. \nIn supervised learning, the dataset must contain the label you're trying to predict. In the dataset, there is no label that refers to a category of user.\n\nSuppose you had an energy usage dataset for homes with the following columns:\n\nWhat type of ML would you use to predict the kilowatt hours used per year for a newly constructed house? \nSupervised learning. \nSupervised learning trains on labeled examples. In this dataset \"kilowatt hours used per year\" would be the label because this is the value you want the model to predict. The features would be \"square footage,\" \"location,\" and \"year built.\" \nUnsupervised learning. \nUnsupervised learning uses unlabeled examples. In this example, \"kilowatt hours used per year\" would be the label because this is the value you want the model to predict.\n\nSuppose you had a flight dataset with the following columns:\n\nIf you wanted to predict the cost of an airplane ticket, would you use regression or classification? \nRegression \nA regression model's output is a numeric value. \nClassification \nA classification model's output is a discrete value, normally a word. In this case, the cost of an airplane ticket is a numeric value. \nBased on the dataset, could you train a classification model to classify the cost of an airplane ticket as \"high,\" \"average,\" or \"low\"? \nYes, but we'd first need to convert the numeric values in the `airplane_ticket_cost` column to categorical values. \nIt's possible to create a classification model from the dataset. You would do something like the following:\n\n1. Find the average cost of a ticket from the departure airport to the destination airport.\n2. Determine the thresholds that would constitute \"high,\" \"average,\" and \"low\".\n3. Compare the predicted cost to the thresholds and output the category the value falls within. \nNo. It's not possible to create a classification model. The `airplane_ticket_cost` values are numeric not categorical. \nWith a little bit of work, you could create a classification model. \nNo. Classification models only predict two categories, like `spam` or `not_spam`. This model would need to predict three categories. \nClassification models can predict multiple categories. They're called multiclass classification models.\n\nTraining and evaluating\n-----------------------\n\nAfter we've trained a model, we evaluate it by using a dataset with labeled examples\nand compare the model's predicted value to the label's actual value.\n\nSelect the two best answers for the question. \nIf the model's predictions are far off, what might you do to make them better? \nRetrain the model, but use only the features you believe have the strongest predictive power for the label. \nRetraining the model with fewer features, but that have more predictive power, can produce a model that makes better predictions. \nYou can't fix a model whose predictions are far off. \nIt's possible to fix a model whose predictions are off. Most models require multiple rounds of training until they make useful predictions. \nRetrain the model using a larger and more diverse dataset. \nModels trained on datasets with more examples and a wider range of values can produce better predictions because the model has a better generalized solution for the relationship between the features and the label. \nTry a different training approach. For example, if you used a supervised approach, try an unsupervised approach. \nA different training approach would not produce better predictions.\n\nYou're now ready to take the next step in your ML journey:\n\n- [People + AI Guidebook](https://pair.withgoogle.com/guidebook/). If you're\n looking for a set of methods, best practices and examples presented by\n Googlers, industry experts, and academic research for using ML.\n\n- [Problem Framing](/machine-learning/problem-framing). If you're looking for\n a field-tested approach for creating ML models and avoiding common pitfalls\n along the way.\n\n- [Machine Learning Crash Course](/machine-learning/crash-course). If you're\n ready for an in-depth and hands-on approach to learning more about ML."]]