ชุดข้อมูล: ป้ายกำกับ
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ส่วนนี้จะเน้นที่ป้ายกำกับ
ป้ายกำกับโดยตรงเทียบกับป้ายกำกับพร็อกซี
ลองพิจารณาป้ายกำกับ 2 ประเภทต่อไปนี้
- ป้ายกำกับโดยตรง ซึ่งเป็นป้ายกำกับที่ตรงกับสิ่งที่โมเดลพยายามคาดการณ์ กล่าวคือ การคาดการณ์ที่โมเดลพยายามทำอยู่จะแสดงเป็นคอลัมน์ในชุดข้อมูลของคุณ
เช่น คอลัมน์ชื่อ
bicycle owner
จะเป็นป้ายกำกับโดยตรงสำหรับโมเดลการแยกประเภทแบบ 2 ค่าที่คาดการณ์ว่าบุคคลมีจักรยานหรือไม่
- ป้ายกำกับพร็อกซี่ ซึ่งเป็นป้ายกำกับที่คล้ายกับ (แต่ไม่ใช่แบบเดียวกัน) กับสิ่งที่โมเดลพยายามคาดการณ์
เช่น ผู้ที่สมัครรับนิตยสาร Bicycle Bizarre อาจมีจักรยาน (แต่ก็อาจไม่มี)
โดยทั่วไปแล้ว ป้ายกํากับโดยตรงจะดีกว่าป้ายกํากับพร็อกซี หากชุดข้อมูลมีป้ายกำกับโดยตรงที่เป็นไปได้ คุณควรใช้ป้ายกำกับนั้น
แต่บางครั้งป้ายกำกับโดยตรงอาจไม่พร้อมใช้งาน
ป้ายกํากับพร็อกซีเป็นค่าประมาณที่ไม่สมบูรณ์ของป้ายกํากับโดยตรง อย่างไรก็ตาม ป้ายกํากับพร็อกซีบางรายการเป็นค่าโดยประมาณที่ใกล้เคียงมากพอที่จะมีประโยชน์ โมเดลที่ใช้ป้ายกํากับพร็อกซีจะมีประโยชน์เพียงใดก็ขึ้นอยู่กับความเชื่อมโยงระหว่างป้ายกํากับพร็อกซีกับการคาดการณ์
โปรดทราบว่าป้ายกำกับทุกรายการต้องแสดงเป็นตัวเลขทศนิยมในเวกเตอร์องค์ประกอบ (เนื่องจากแมชชีนเลิร์นนิงนั้นโดยพื้นฐานแล้วเป็นเพียงการรวมการดำเนินการทางคณิตศาสตร์จำนวนมากเข้าด้วยกัน) บางครั้งอาจมีป้ายกำกับโดยตรง แต่ไม่สามารถแสดงเป็นตัวเลขทศนิยมในเวกเตอร์ลักษณะได้ง่าย ในกรณีนี้ ให้ใช้ป้ายกํากับพร็อกซี
แบบฝึกหัด: ทดสอบความเข้าใจ
บริษัทของคุณต้องการดำเนินการต่อไปนี้
ส่งคูปอง ("แลกจักรยานเก่ารับส่วนลด 15% สำหรับจักรยานใหม่") ไปยังเจ้าของจักรยาน
ดังนั้นโมเดลของคุณจึงต้องมีลักษณะดังนี้
คาดการณ์ว่าใครเป็นเจ้าของจักรยาน
ขออภัย ชุดข้อมูลไม่มีคอลัมน์ชื่อ bike owner
แต่ชุดข้อมูลมีคอลัมน์ชื่อ recently bought a bicycle
recently bought a bicycle
เป็นป้ายกํากับพร็อกซีที่ดีหรือไม่ดีสําหรับโมเดลนี้
ป้ายกำกับพร็อกซีที่ดี
คอลัมน์ recently bought a bicycle
เป็นป้ายกํากับพร็อกซีที่ค่อนข้างดี ท้ายที่สุดแล้ว ผู้คนส่วนใหญ่ที่ซื้อจักรยานตอนนี้ก็มีจักรยานอยู่แล้ว อย่างไรก็ตาม recently bought a
bicycle
ก็ไม่ได้สมบูรณ์แบบเหมือนกับป้ายกํากับพร็อกซีอื่นๆ ทั้งหมด แม้ว่าจะดีมากก็ตาม ท้ายที่สุดแล้ว ผู้ซื้ออาจไม่ได้เป็นผู้ที่ใช้ (หรือเป็นเจ้าของ) สินค้านั้นเสมอไป
เช่น บางครั้งผู้คนซื้อจักรยานเป็นของขวัญ
ป้ายกำกับพร็อกซีไม่ดี
recently bought a bicycle
ไม่ได้สมบูรณ์แบบ (จักรยานบางคันซื้อเป็นของขวัญและมอบให้ผู้อื่น) เช่นเดียวกับป้ายกำกับพร็อกซีทั้งหมด อย่างไรก็ตาม recently bought a bicycle
ยังคงเป็นตัวบ่งชี้ที่ดีว่ามีคนเป็นเจ้าของจักรยาน
ข้อมูลที่มนุษย์สร้างขึ้น
ข้อมูลบางอย่างเป็นข้อมูลที่มนุษย์สร้างขึ้น กล่าวคือ มนุษย์อย่างน้อย 1 คนตรวจสอบข้อมูลบางอย่างและระบุค่า ซึ่งมักจะเป็นค่าสำหรับป้ายกำกับ เช่น นักอุตุนิยมวิทยาอย่างน้อย 1 คนอาจตรวจสอบรูปภาพท้องฟ้าและระบุประเภทของเมฆ
หรือข้อมูลบางอย่างจะสร้างขึ้นโดยอัตโนมัติ กล่าวคือ ซอฟต์แวร์ (อาจเป็นโมเดลแมชชีนเลิร์นนิงอื่น) จะกําหนดค่า เช่น โมเดลแมชชีนเลิร์นนิงอาจตรวจสอบรูปภาพท้องฟ้าและระบุประเภทของเมฆโดยอัตโนมัติ
ส่วนนี้จะอธิบายข้อดีและข้อเสียของข้อมูลที่มนุษย์สร้างขึ้น
ข้อดี
- ผู้ให้คะแนนที่เป็นมนุษย์สามารถทำงานได้หลากหลายประเภท ซึ่งแม้แต่โมเดลแมชชีนเลิร์นนิงที่ซับซ้อนก็อาจทำได้ยาก
- กระบวนการนี้บังคับให้เจ้าของชุดข้อมูลพัฒนาเกณฑ์ที่ชัดเจนและสอดคล้องกัน
ข้อเสีย
- โดยปกติแล้ว คุณจะต้องจ่ายเงินให้ผู้ให้คะแนน ดังนั้นข้อมูลที่สร้างโดยมนุษย์จึงอาจมีราคาแพง
- เกิดเป็นมนุษย์ย่อมต้องมีผิดพลาด ดังนั้น ผู้ประเมินหลายคนอาจต้องประเมินข้อมูลเดียวกัน
ลองตอบคำถามเหล่านี้เพื่อพิจารณาความต้องการ
- ผู้ประเมินต้องมีความเชี่ยวชาญเพียงใด (เช่น ผู้ประเมินต้องรู้ภาษาใดภาษาหนึ่งไหม คุณต้องการนักภาษาศาสตร์สำหรับบทสนทนาหรือแอปพลิเคชัน NLP ไหม)
- คุณต้องการตัวอย่างที่มีป้ายกำกับกี่รายการ คุณต้องการผลิตภัณฑ์ดังกล่าวเร็วเพียงใด
- คุณมีงบประมาณเท่าไร
ตรวจสอบผู้ให้คะแนนที่เป็นเจ้าหน้าที่อีกครั้งเสมอ ตัวอย่างเช่น ติดป้ายกำกับตัวอย่าง 1,000 รายการด้วยตนเอง แล้วดูว่าผลลัพธ์ของคุณตรงกับผลลัพธ์ของผู้ประเมินคนอื่นๆ อย่างไร
หากพบความคลาดเคลื่อน อย่าเพิ่งคิดว่าคะแนนของคุณถูกต้อง โดยเฉพาะในกรณีที่มีการพิจารณาคุณค่าเข้ามาเกี่ยวข้อง หากผู้ให้คะแนนทำผิดพลาด ให้ลองเพิ่มวิธีการเพื่อช่วยผู้ให้คะแนนแล้วลองอีกครั้ง
คลิกไอคอนเครื่องหมายบวกเพื่อดูข้อมูลเพิ่มเติมเกี่ยวกับข้อมูลที่มนุษย์สร้างขึ้น
การตรวจสอบข้อมูลด้วยตนเองเป็นแนวทางปฏิบัติที่ดีไม่ว่าคุณจะรับข้อมูลมาอย่างไรก็ตาม Andrej Karpathy เคยทำสิ่งนี้ใน ImageNet และเขียนเกี่ยวกับประสบการณ์นี้
โมเดลสามารถฝึกโดยใช้ป้ายกำกับแบบอัตโนมัติและแบบมนุษย์ผสมกัน อย่างไรก็ตาม โดยทั่วไปแล้ว ป้ายกำกับชุดเพิ่มเติมที่มนุษย์สร้างขึ้น (ซึ่งอาจล้าสมัย) สำหรับโมเดลส่วนใหญ่นั้นไม่คุ้มค่ากับความซับซ้อนและการดูแลรักษาเพิ่มเติม
อย่างไรก็ตาม บางครั้งป้ายกำกับที่มนุษย์สร้างขึ้นอาจให้ข้อมูลเพิ่มเติมที่ไม่มีในป้ายกำกับอัตโนมัติ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-02-26 UTC
[null,null,["อัปเดตล่าสุด 2025-02-26 UTC"],[[["\u003cp\u003eThis document explains the differences between direct and proxy labels for machine learning models, highlighting that direct labels are preferred but often unavailable.\u003c/p\u003e\n"],["\u003cp\u003eIt emphasizes the importance of carefully evaluating proxy labels to ensure they are a suitable approximation of the target prediction.\u003c/p\u003e\n"],["\u003cp\u003eHuman-generated data, while offering flexibility and nuanced understanding, can be expensive and prone to errors, requiring careful quality control.\u003c/p\u003e\n"],["\u003cp\u003eMachine learning models can utilize a combination of automated and human-generated labels, but the added complexity of maintaining human-generated labels often outweighs the benefits.\u003c/p\u003e\n"],["\u003cp\u003eRegardless of the label source, manual data inspection and comparison with human ratings are crucial for identifying potential issues and ensuring data quality.\u003c/p\u003e\n"]]],[],null,["# Datasets: Labels\n\nThis section focuses on [**labels**](/machine-learning/glossary#label).\n\nDirect versus proxy labels\n--------------------------\n\nConsider two different kinds of labels:\n\n- **Direct labels** , which are labels identical to the prediction your model is trying to make. That is, the prediction your model is trying to make is exactly present as a column in your dataset. For example, a column named `bicycle owner` would be a direct label for a binary classification model that predicts whether or not a person owns a bicycle.\n- **Proxy labels**, which are labels that are similar---but not identical---to the prediction your model is trying to make. For example, a person subscribing to Bicycle Bizarre magazine probably---but not definitely---owns a bicycle.\n\nDirect labels are generally better than proxy labels. If your dataset\nprovides a possible direct label, you should probably use it.\nOftentimes though, direct labels aren't available.\n\nProxy labels are always a compromise---an imperfect approximation of\na direct label. However, some proxy labels are close enough approximations\nto be useful. Models that use proxy labels are only as useful as the\nconnection between the proxy label and the prediction.\n\nRecall that every label must be represented as a floating-point number\nin the [**feature vector**](/machine-learning/glossary#feature-vector)\n(because machine learning is fundamentally just a huge amalgam of mathematical\noperations). Sometimes, a direct label exists but can't be easily represented as\na floating-point number in the feature vector. In this case, use a proxy label.\n\n### Exercise: Check your understanding\n\nYour company wants to do the following:\n\u003e Mail coupons (\"Trade in your old bicycle for\n\u003e 15% off a new bicycle\") to bicycle owners.\n\nSo, your model must do the following:\n\u003e Predict which people own a bicycle.\n\nUnfortunately, the dataset doesn't contain a column named `bike owner`.\nHowever, the dataset does contain a column named `recently bought a bicycle`. \nWould `recently bought a bicycle` be a good proxy label or a poor proxy label for this model? \nGood proxy label \nThe column `recently bought a bicycle` is a relatively good proxy label. After all, most of the people who buy bicycles now own bicycles. Nevertheless, like all proxy labels, even very good ones, `recently bought a\nbicycle` is imperfect. After all, the person buying an item isn't always the person using (or owning) that item. For example, people sometimes buy bicycles as a gift. \nPoor proxy label \nLike all proxy labels, `recently bought a bicycle` is imperfect (some bicycles are bought as gifts and given to others). However, `recently bought a bicycle` is still a relatively good indicator that someone owns a bicycle.\n\nHuman-generated data\n--------------------\n\nSome data is **human-generated**; that is, one or more humans examine some\ninformation and provide a value, usually for the label. For example,\none or more meteorologists could examine pictures of the sky and identify\ncloud types.\n\nAlternatively, some data is **automatically-generated**. That is, software\n(possibly, another machine learning model) determines the value. For example, a\nmachine learning model could examine sky pictures and automatically identify\ncloud types.\n\nThis section explores the advantages and disadvantages of human-generated data.\n\nAdvantages\n\n- Human raters can perform a wide range of tasks that even sophisticated machine learning models may find difficult.\n- The process forces the owner of the dataset to develop clear and consistent criteria.\n\nDisadvantages\n\n- You typically pay human raters, so human-generated data can be expensive.\n- To err is human. Therefore, multiple human raters might have to evaluate the same data.\n\nThink through these questions to determine your needs:\n\n- How skilled must your raters be? (For example, must the raters know a specific language? Do you need linguists for dialogue or NLP applications?)\n- How many labeled examples do you need? How soon do you need them?\n- What's your budget?\n\n**Always double-check your human raters**. For example, label 1000 examples\nyourself, and see how your results match other raters' results.\nIf discrepancies surface, don't assume your ratings are the correct ones,\nespecially if a value judgment is involved. If human raters have introduced\nerrors, consider adding instructions to help them and try again.\n\n#### Click the plus icon to learn more about human-generated data.\n\nLooking at your data by hand is a good exercise regardless of how you\nobtained your data. Andrej Karpathy did this on\n[ImageNet\nand wrote about the experience](http://karpathy.github.io/2014/09/02/what-i-learned-from-competing-against-a-convnet-on-imagenet).\n\nModels can train on a mix of automated and human-generated labels. However,\nfor most models, an extra set of human-generated labels (which can become stale)\nare generally not worth the extra complexity and maintenance.\nThat said, sometimes the human-generated labels can provide extra\ninformation not available in the automated labels.\n\n*** ** * ** ***\n\n| **Key terms:**\n|\n| - [Label](/machine-learning/glossary#label)\n- [Feature vector](/machine-learning/glossary#feature-vector) \n[Help Center](https://support.google.com/machinelearningeducation)"]]