Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Bài học này tập trung vào những câu hỏi bạn nên đặt về dữ liệu và mô hình trong các hệ thống sản xuất.
Mỗi tính năng có hữu ích không?
Bạn nên liên tục theo dõi mô hình để xoá những tính năng đóng góp ít hoặc không đóng góp gì vào khả năng dự đoán của mô hình. Nếu dữ liệu đầu vào cho tính năng đó thay đổi đột ngột, thì hành vi của mô hình cũng có thể thay đổi đột ngột theo những cách không mong muốn.
Ngoài ra, hãy cân nhắc câu hỏi liên quan sau:
Tính hữu ích của tính năng này có xứng đáng với chi phí để đưa vào không?
Bạn luôn muốn thêm nhiều tính năng vào mô hình. Ví dụ: giả sử bạn tìm thấy một tính năng mới, việc thêm tính năng này vào sẽ giúp dự đoán của mô hình tốt hơn một chút. Dữ liệu dự đoán chính xác hơn một chút chắc chắn sẽ tốt hơn dữ liệu dự đoán kém chính xác hơn một chút; tuy nhiên, tính năng bổ sung này sẽ làm tăng gánh nặng bảo trì.
Nguồn dữ liệu của bạn có đáng tin cậy không?
Một số câu hỏi cần đặt ra về độ tin cậy của dữ liệu đầu vào:
Tín hiệu có luôn có sẵn hay không, hay tín hiệu đó đến từ một nguồn không đáng tin cậy? Ví dụ:
Tín hiệu có đến từ một máy chủ gặp sự cố khi có tải nặng không?
Tín hiệu này có phải là do những người đi nghỉ vào tháng 8 không?
Hệ thống tính toán dữ liệu đầu vào của mô hình có thay đổi không? Nếu có:
Tần suất là bao nhiêu?
Làm cách nào để bạn biết khi hệ thống đó thay đổi?
Hãy cân nhắc việc tạo bản sao của dữ liệu mà bạn nhận được từ quy trình thượng nguồn. Sau đó, chỉ chuyển sang phiên bản tiếp theo của dữ liệu thượng nguồn khi bạn chắc chắn rằng việc này là an toàn.
Mô hình của bạn có phải là một phần của vòng phản hồi không?
Đôi khi, một mô hình có thể ảnh hưởng đến dữ liệu huấn luyện của chính mô hình đó. Ví dụ: kết quả từ một số mô hình sẽ trở thành (trực tiếp hoặc gián tiếp) các tính năng đầu vào cho chính mô hình đó.
Đôi khi, một mô hình có thể ảnh hưởng đến mô hình khác. Ví dụ: hãy xem xét hai mô hình dự đoán giá cổ phiếu:
Mô hình A là một mô hình dự đoán không tốt.
Mô hình B.
Vì Model A bị lỗi nên quyết định mua cổ phiếu trong Stock X một cách nhầm lẫn. Những giao dịch mua đó làm tăng giá của Cổ phiếu X. Mô hình B sử dụng giá của Cổ phiếu X làm một đặc điểm đầu vào, vì vậy, Mô hình B có thể đưa ra một số kết luận sai về giá trị của Cổ phiếu X. Do đó, Mô hình B có thể mua hoặc bán cổ phiếu của Cổ phiếu X dựa trên hành vi lỗi của Mô hình A. Đổi lại, hành vi của Mô hình B có thể ảnh hưởng đến Mô hình A, có thể kích hoạt một cơn sốt hoa tulip hoặc sự sụt giảm trong cổ phiếu của Công ty X.
Bài tập: Kiểm tra mức độ hiểu bài
Ba mô hình nào sau đây dễ bị vòng phản hồi?
Mô hình dự báo lưu lượng truy cập dự đoán tình trạng tắc nghẽn tại các lối ra xa lộ gần bãi biển, sử dụng số lượng người trên bãi biển làm một trong các đặc điểm của mô hình.
Một số người đi biển có thể dựa vào thông tin dự báo về lưu lượng truy cập để lên kế hoạch. Nếu có một đám đông lớn trên bãi biển và lưu lượng truy cập được dự đoán là sẽ rất lớn, nhiều người có thể lên kế hoạch thay thế. Điều này có thể làm giảm số người đến bãi biển, dẫn đến lưu lượng truy cập được dự đoán sẽ giảm, sau đó có thể làm tăng số người đến và chu kỳ này lặp lại.
Mô hình đề xuất sách gợi ý những cuốn tiểu thuyết mà người dùng có thể thích dựa trên mức độ phổ biến của chúng (tức là số lần mua sách).
Đề xuất sách có thể thúc đẩy lượt mua hàng và các lượt bán hàng bổ sung này sẽ được đưa trở lại mô hình dưới dạng dữ liệu đầu vào, giúp tăng khả năng đề xuất những cuốn sách này trong tương lai.
Mô hình xếp hạng đại học đánh giá các trường một phần theo tính chọn lọc – tỷ lệ phần trăm số sinh viên đã đăng ký được nhận vào trường.
Thứ hạng của mô hình này có thể thúc đẩy thêm sự quan tâm đến các trường có điểm xếp hạng cao nhất, từ đó tăng số lượng đơn đăng ký mà các trường này nhận được. Nếu các trường này tiếp tục nhận cùng một số lượng học sinh, thì tính chọn lọc sẽ tăng lên (tỷ lệ phần trăm học sinh được nhận sẽ giảm). Điều này sẽ giúp nâng cao thứ hạng của các trường này, từ đó làm tăng thêm sự quan tâm của học viên tiềm năng, v.v.
Mô hình kết quả bầu cử dự đoán người chiến thắng trong cuộc bầu cử thị trưởng bằng cách khảo sát 2% số cử tri sau khi cuộc thăm dò ý kiến kết thúc.
Nếu mô hình không xuất bản thông tin dự đoán cho đến khi cuộc thăm dò ý kiến kết thúc, thì thông tin dự đoán của mô hình không thể ảnh hưởng đến hành vi của cử tri.
Mô hình giá trị nhà ở dự đoán giá nhà, sử dụng kích thước (diện tích tính bằng mét vuông), số lượng phòng ngủ và vị trí địa lý làm các đặc điểm.
Không thể nhanh chóng thay đổi vị trí, kích thước hoặc số lượng phòng ngủ của một ngôi nhà để phản hồi thông tin dự báo về giá, khiến vòng phản hồi khó có thể xảy ra. Tuy nhiên, có thể có mối tương quan giữa kích thước và số lượng phòng ngủ (nhà lớn hơn có thể có nhiều phòng hơn) mà bạn cần phân tách.
Mô hình thuộc tính khuôn mặt phát hiện xem một người có đang mỉm cười trong ảnh hay không. Mô hình này thường xuyên được huấn luyện trên cơ sở dữ liệu ảnh chụp thương mại được tự động cập nhật hằng tháng.
Không có vòng phản hồi ở đây vì dự đoán của mô hình không ảnh hưởng đến cơ sở dữ liệu ảnh. Tuy nhiên, việc tạo phiên bản cho dữ liệu đầu vào là một vấn đề đáng quan ngại ở đây, vì các bản cập nhật hằng tháng này có thể có tác động không lường trước được đối với mô hình.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 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)"]]