ระบบ ML การผลิต: คำถามที่ควรถาม
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
บทเรียนนี้มุ่งเน้นที่คำถามที่คุณควรถามเกี่ยวกับข้อมูลและโมเดลในระบบเวอร์ชันที่ใช้งานจริง
ฟีเจอร์แต่ละอย่างมีประโยชน์ไหม
คุณควรตรวจสอบโมเดลอย่างต่อเนื่องเพื่อนำฟีเจอร์ที่มีส่วนช่วยน้อยหรือไม่ช่วยเลยต่อความสามารถในการคาดการณ์ของโมเดลออก หากข้อมูลอินพุตสำหรับฟีเจอร์นั้นเปลี่ยนแปลงอย่างฉับพลัน ลักษณะการทํางานของโมเดลก็อาจเปลี่ยนแปลงอย่างฉับพลันด้วยในลักษณะที่ไม่พึงประสงค์
และลองพิจารณาคำถามที่เกี่ยวข้องต่อไปนี้ด้วย
- ประโยชน์ของฟีเจอร์นั้นคุ้มค่ากับค่าใช้จ่ายในการรวมหรือไม่
การเพิ่มฟีเจอร์อื่นๆ ลงในโมเดลเป็นสิ่งที่น่าดึงดูดใจเสมอ ตัวอย่างเช่น สมมติว่าคุณพบฟีเจอร์ใหม่ที่การใส่ฟีเจอร์นี้เข้าไปทําให้การคาดการณ์ของโมเดลดีขึ้นเล็กน้อย การคาดการณ์ที่ดีขึ้นเล็กน้อยดูดีกว่าการคาดการณ์ที่แย่ลงเล็กน้อยอย่างแน่นอน แต่ฟีเจอร์เพิ่มเติมก็เพิ่มภาระการดูแลรักษาด้วย
แหล่งข้อมูลของคุณเชื่อถือได้ไหม
คำถามที่ควรถามเกี่ยวกับความน่าเชื่อถือของข้อมูลที่คุณป้อน
- สัญญาณจะพร้อมใช้งานเสมอหรือมาจากแหล่งที่มาที่ไม่เชื่อถือได้ เช่น
- สัญญาณมาจากเซิร์ฟเวอร์ที่ขัดข้องเนื่องจากมีภาระงานมากหรือไม่
- สัญญาณมาจากผู้ใช้ที่ลาพักร้อนทุกเดือนสิงหาคมใช่ไหม
- ระบบที่คำนวณข้อมูลอินพุตของโมเดลมีการเปลี่ยนแปลงไหม หากใช่ ให้ทำดังนี้
- บ่อยแค่ไหน
- คุณจะทำอย่างไรเมื่อระบบดังกล่าวมีการเปลี่ยนแปลง
ลองสร้างสําเนาข้อมูลที่คุณได้รับจากกระบวนการต้นทางของคุณเอง จากนั้นให้เลื่อนข้อมูลต้นทางไปยังเวอร์ชันถัดไปก็ต่อเมื่อคุณแน่ใจว่าปลอดภัยแล้ว
โมเดลของคุณเป็นส่วนหนึ่งของลูปการตอบกลับหรือไม่
บางครั้งโมเดลอาจส่งผลต่อข้อมูลการฝึกของตนเอง ตัวอย่างเช่น ผลลัพธ์จากโมเดลบางรายการจะกลายเป็นฟีเจอร์อินพุต (โดยตรงหรือโดยอ้อม) ของโมเดลเดียวกันนั้น
บางครั้งโมเดลหนึ่งอาจส่งผลต่อโมเดลอื่น ตัวอย่างเช่น ลองพิจารณา 2 รูปแบบในการคาดการณ์ราคาหุ้น ดังนี้
- โมเดล ก ซึ่งเป็นโมเดลการคาดการณ์ที่ไม่ดี
- รูปแบบ ข.
เนื่องจากโมเดล ก มีข้อบกพร่อง จึงตัดสินใจซื้อหุ้นในหุ้น ข โดยไม่ได้ตั้งใจ การซื้อเหล่านั้นทำให้ราคาของหุ้น X เพิ่มขึ้น โมเดล ข. ใช้ราคาของหุ้น ก. เป็นฟีเจอร์อินพุต ดังนั้นโมเดล ข. จึงอาจสรุปค่าของหุ้น ก. ผิดพลาดได้ ดังนั้น โมเดล ข จึงสามารถซื้อหรือขายหุ้นของหุ้น X ตามลักษณะการทำงานที่ผิดพลาดของโมเดล ก ในทางกลับกัน ลักษณะการทํางานของโมเดล ข. อาจส่งผลต่อโมเดล ก. ซึ่งอาจทริกเกอร์ความคลั่งไคล้ดอกทิวลิปหรือราคาหุ้นของบริษัท ก. ลดลง
แบบฝึกหัด: ทดสอบความเข้าใจ
โมเดลใดต่อไปนี้ 3 รายการที่อาจมีลูปความคิดเห็น
โมเดลการคาดการณ์การเข้าชมที่คาดการณ์ความแออัดที่ทางออกของทางหลวงใกล้ชายหาดโดยใช้ขนาดฝูงชนที่ชายหาดเป็นหนึ่งในฟีเจอร์
ผู้มาเที่ยวทะเลบางรายมีแนวโน้มที่จะวางแผนการเดินทางตามการคาดการณ์การเข้าชม หากมีผู้คนจำนวนมากที่ชายหาดและคาดว่าการจราจรจะหนาแน่น ผู้คนจํานวนมากอาจเปลี่ยนแผนการเดินทาง ซึ่งอาจทําให้จำนวนผู้มาเที่ยวชายหาดลดลง ส่งผลให้การคาดการณ์การเข้าชมลดลง ซึ่งอาจทําให้จำนวนผู้มาเที่ยวเพิ่มขึ้น และวงจรนี้ก็จะวนซ้ำ
รูปแบบการแนะนำหนังสือซึ่งจะแนะนำนวนิยายที่ผู้ใช้อาจชอบโดยอิงจากความนิยม (เช่น จำนวนครั้งที่มีการซื้อหนังสือ)
การแนะนำหนังสือมีแนวโน้มที่จะกระตุ้นการซื้อ และยอดขายที่เพิ่มขึ้นเหล่านี้จะส่งกลับไปยังโมเดลเป็นอินพุต ซึ่งทำให้ระบบมีแนวโน้มที่จะแนะนำหนังสือเล่มเดิมเหล่านี้ในอนาคต
รูปแบบการจัดอันดับมหาวิทยาลัยที่ประเมินโรงเรียนบางส่วนตามการคัดเลือก โดยพิจารณาจากเปอร์เซ็นต์ของนักเรียนที่สมัครและได้รับคัดเลือก
การจัดอันดับของโมเดลอาจกระตุ้นความสนใจเพิ่มเติมให้กับโรงเรียนที่ได้รับการจัดอันดับสูงสุด ซึ่งจะเพิ่มจำนวนใบสมัครที่ได้รับ หากโรงเรียนเหล่านี้ยังคงรับนักเรียนในจำนวนเดิมต่อไป ความเลือกสรรจะเพิ่มขึ้น (เปอร์เซ็นต์ของนักเรียนที่ได้รับการรับเข้าจะลดลง) ซึ่งจะช่วยเพิ่มอันดับของโรงเรียนเหล่านี้ ซึ่งจะยิ่งทำให้ผู้มีโอกาสเป็นนักเรียนสนใจมากขึ้น และอื่นๆ
โมเดลผลการเลือกตั้งที่คาดการณ์ผู้ชนะในการเลือกตั้งนายกเทศมนตรีโดยการสํารวจผู้ลงคะแนนเสียง 2% หลังจากปิดการสำรวจแล้ว
หากโมเดลไม่เผยแพร่การคาดการณ์จนกว่าจะมีการจัดการเลือกตั้ง การคาดการณ์ของโมเดลจะส่งผลต่อพฤติกรรมของผู้เลือกเสียงไม่ได้
โมเดลมูลค่าที่อยู่อาศัยที่คาดการณ์ราคาบ้านโดยใช้ขนาด (พื้นที่เป็นตารางเมตร) จำนวนห้องนอน และสถานที่ตั้งทางภูมิศาสตร์เป็นฟีเจอร์
บ้านไม่สามารถเปลี่ยนแปลงสถานที่ตั้ง ขนาด หรือจํานวนห้องนอนได้อย่างรวดเร็วเพื่อตอบสนองต่อการคาดการณ์ราคา จึงทําให้ลูปความคิดเห็นไม่เกิดขึ้น อย่างไรก็ตาม อาจมีความสัมพันธ์ระหว่างขนาดและจํานวนห้องนอน (บ้านหลังใหญ่มีแนวโน้มที่จะมีพื้นที่ใช้สอยมากกว่า) ซึ่งอาจต้องแยกกันวิเคราะห์
โมเดลแอตทริบิวต์ใบหน้าที่ตรวจจับว่าบุคคลในรูปภาพยิ้มหรือไม่ ซึ่งได้รับการฝึกเป็นประจำในฐานข้อมูลภาพสต็อกที่อัปเดตโดยอัตโนมัติทุกเดือน
ไม่มีการป้อนกลับในขั้นตอนนี้ เนื่องจากการคาดการณ์ของโมเดลไม่มีผลต่อฐานข้อมูลรูปภาพ อย่างไรก็ตาม เวอร์ชันของข้อมูลอินพุตเป็นข้อกังวลในเรื่องนี้ เนื่องจากอัปเดตรายเดือนเหล่านี้อาจส่งผลต่อโมเดลในลักษณะที่ไม่คาดคิด
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[null,null,["อัปเดตล่าสุด 2025-07-27 UTC"],[[["\u003cp\u003eContinuously monitor models in production to evaluate feature importance and potentially remove unnecessary ones, ensuring prediction quality and resource efficiency.\u003c/p\u003e\n"],["\u003cp\u003eData reliability is crucial; consider data source stability, potential changes in upstream data processes, and create local data copies to control versioning and mitigate risks.\u003c/p\u003e\n"],["\u003cp\u003eBe aware of feedback loops where a model's predictions influence future input data, potentially leading to unexpected behavior or biased outcomes, especially in interconnected systems.\u003c/p\u003e\n"],["\u003cp\u003eRegularly assess your model by asking if features are truly helpful and if their value outweighs the costs of inclusion, aiming for a balance between prediction accuracy and maintainability.\u003c/p\u003e\n"],["\u003cp\u003eEvaluate if your model is susceptible to a feedback loop and take steps to isolate it if you find it is.\u003c/p\u003e\n"]]],[],null,["This lesson focuses on the questions you should ask about your data\nand model in production systems.\n\nIs each feature helpful?\n\nYou should continuously monitor your model to remove features that contribute\nlittle or nothing to the model's predictive ability. If the input data for\nthat feature abruptly changes, your model's behavior might also abruptly\nchange in undesirable ways.\n\nAlso consider the following related question:\n\n- Does the usefulness of the feature justify the cost of including it?\n\nIt is always tempting to add more features to the model. For example,\nsuppose you find a new feature whose addition makes your model's predictions\nslightly better. Slightly better predictions certainly seem better than\nslightly worse predictions; however, the extra feature adds to your\nmaintenance burden.\n\nIs your data source reliable?\n\nSome questions to ask about the reliability of your input data:\n\n- Is the signal always going to be available or is it coming from an unreliable source? For example:\n - Is the signal coming from a server that crashes under heavy load?\n - Is the signal coming from humans that go on vacation every August?\n- Does the system that computes your model's input data ever change? If so:\n - How often?\n - How will you know when that system changes?\n\nConsider creating your own copy of the data you receive from the\nupstream process. Then, only advance to the next version of the upstream\ndata when you are certain that it is safe to do so.\n\nIs your model part of a feedback loop?\n\nSometimes a model can affect its own training data. For example, the\nresults from some models, in turn, become (directly or indirectly) input\nfeatures to that same model.\n\nSometimes a model can affect another model. For example, consider two\nmodels for predicting stock prices:\n\n- Model A, which is a bad predictive model.\n- Model B.\n\nSince Model A is buggy, it mistakenly decides to buy stock in Stock X.\nThose purchases drive up the price of Stock X. Model B uses the price\nof Stock X as an input feature, so Model B can come to some false\nconclusions about the value of Stock X. Model B could, therefore,\nbuy or sell shares of Stock X based on the buggy behavior of Model A.\nModel B's behavior, in turn, can affect Model A, possibly triggering a\n[tulip mania](https://wikipedia.org/wiki/Tulip_mania) or a slide in\nCompany X's stock.\n\nExercise: Check your understanding \nWhich **three** of the following models are susceptible to a feedback loop? \nA traffic-forecasting model that predicts congestion at highway exits near the beach, using beach crowd size as one of its features. \nSome beachgoers are likely to base their plans on the traffic forecast. If there is a large beach crowd and traffic is forecast to be heavy, many people may make alternative plans. This may depress beach turnout, resulting in a lighter traffic forecast, which then may increase attendance, and the cycle repeats. \nA book-recommendation model that suggests novels its users may like based on their popularity (i.e., the number of times the books have been purchased). \nBook recommendations are likely to drive purchases, and these additional sales will be fed back into the model as input, making it more likely to recommend these same books in the future. \nA university-ranking model that rates schools in part by their selectivity---the percentage of students who applied that were admitted. \nThe model's rankings may drive additional interest to top-rated schools, increasing the number of applications they receive. If these schools continue to admit the same number of students, selectivity will increase (the percentage of students admitted will go down). This will boost these schools' rankings, which will further increase prospective student interest, and so on... \nAn election-results model that forecasts the winner of a mayoral race by surveying 2% of voters after the polls have closed. \nIf the model does not publish its forecast until after the polls have closed, it is not possible for its predictions to affect voter behavior. \nA housing-value model that predicts house prices, using size (area in square meters), number of bedrooms, and geographic location as features. \nIt is not possible to quickly change a house's location, size, or number of bedrooms in response to price forecasts, making a feedback loop unlikely. However, there is potentially a correlation between size and number of bedrooms (larger homes are likely to have more rooms) that may need to be teased apart. \nA face-attributes model that detects whether a person is smiling in a photo, which is regularly trained on a database of stock photography that is automatically updated monthly. \nThere is no feedback loop here, as model predictions don't have any impact on the photo database. However, versioning of the input data is a concern here, as these monthly updates could potentially have unforeseen effects on the model. \n[Help Center](https://support.google.com/machinelearningeducation)"]]