أنظمة تعلُّم الآلة الخاصة بالإنتاج: أسئلة يجب طرحها
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تركّز هذه الدرس على الأسئلة التي يجب طرحها حول بياناتك
وموديلك في أنظمة الإنتاج.
هل كل ميزة مفيدة؟
يجب مراقبة النموذج باستمرار لإزالة الميزات التي تساهم
بقدر قليل أو لا تساهم مطلقًا في قدرة النموذج على التوقّع. إذا تغيّرت بيانات الإدخال الخاصة
بهذه الميزة بشكل مفاجئ، قد يتغيّر سلوك النموذج أيضًا
بشكل مفاجئ بطرق غير مرغوب فيها.
ننصحك أيضًا بالاطّلاع على السؤال ذي الصلة التالي:
- هل تُبرّر فائدة الميزة تكلفة تضمينها؟
من المغري دائمًا إضافة المزيد من الميزات إلى النموذج. على سبيل المثال،
لنفترض أنّك عثرت على ميزة جديدة تؤدي إضافتها إلى تحسين توقّعات النموذج
بدرجة طفيفة. تبدو التوقّعات الأفضل قليلاً أفضل بالتأكيد من التوقّعات الأسوأ قليلاً، ولكنّ الميزة الإضافية تزيد من عبء الصيانة.
هل مصدر البيانات موثوق؟
إليك بعض الأسئلة التي يمكنك طرحها حول موثوقية بيانات الإدخال:
- هل ستكون الإشارة متاحة دائمًا أم أنها تأتي من مصدر
غير موثوق به؟ على سبيل المثال:
- هل تأتي الإشارة من خادم يتعطل تحت ضغط كبير؟
- هل تأتي الإشارة من أشخاص يذهبون في إجازة كل شهر آب (أغسطس)؟
- هل يتغيّر النظام الذي يحسب بيانات إدخال النموذج؟ في هذه الحالة:
- كم مرة؟
- كيف ستعرف متى يتغيّر هذا النظام؟
ننصحك بإنشاء نسخة خاصة بك من البيانات التي تتلقّاها من عملية
التحميل. بعد ذلك، لا تنتقل إلى الإصدار التالي من data
المصدر إلا عندما تكون متأكدًا من أنّه آمن.
هل نموذجك جزء من حلقة ملاحظات؟
في بعض الأحيان، يمكن أن يؤثر النموذج في بيانات التدريب الخاصة به. على سبيل المثال، تصبح
النتائج من بعض النماذج (بشكل مباشر أو غير مباشر) ميزات
إدخال لهذا النموذج نفسه.
في بعض الأحيان، يمكن أن يؤثر نموذج في نموذج آخر. على سبيل المثال، نأخذ سمتَين
لتوقع أسعار الأسهم:
- النموذج "أ"، وهو نموذج تنبؤي سيئ
- النموذج (ب):
وبما أنّ النموذج "أ" يتضمّن أخطاء، قرّر عن طريق الخطأ شراء أسهم في الأسهم "س".
تؤدي هذه عمليات الشراء إلى ارتفاع سعر الأسهم X. يستخدم النموذج "ب" سعر "الأسهم س" كسمة إدخال، لذا يمكن أن يتوصّل النموذج "ب" إلى بعض النتيجة
الخاطئة حول قيمة "الأسهم س". وبالتالي، يمكن للنموذج "ب"
شراء أسهم "س" أو بيعها استنادًا إلى السلوك الذي يتضمّن أخطاء في النموذج "أ".
يمكن أن يؤثّر سلوك النموذج "ب" بدوره في النموذج "أ"، ما قد يؤدي إلى هوس بالزنبق أو انخفاض في سعر سهم شركة "س".
تمرين: التحقّق من فهمك
أي ثلاثة من النماذج التالية معرّضة
لحلقة التغذية الراجعة؟
نموذج توقّعات حركة المرور الذي يتوقّع الازدحام عند مخارج الطرق السريعة
بالقرب من الشاطئ، باستخدام حجم حشد الشاطئ كإحدى ميزاته
من المرجّح أن يستند بعض روّاد الشاطئ إلى توقّعات ازدحام المركبات عند وضع خططهم. إذا كان هناك عدد كبير من الأشخاص على الشاطئ وكان من المتوقّع أن تكون حركة المرور
مزدحمة، قد يضع العديد من الأشخاص خططًا بديلة. وقد يؤدي ذلك إلى خفض عدد الأشخاص الذين يذهبون
إلى الشاطئ، ما يؤدّي إلى توقّع حركة مرور أقل، ما قد يؤدي بدوره إلى
زيادة عدد الأشخاص الذين يذهبون إلى الشاطئ، وتتكرّر الدورة.
نموذج لاقتراح الكتب يعرض روايات قد تعجب المستخدمين
استنادًا إلى مدى رواجها (أي عدد المرات التي تم فيها
شراء الكتب).
من المرجّح أن تؤدي اقتراحات الكتب إلى زيادة عمليات الشراء، وسيتم إدخال هذه المبيعات الإضافية في النموذج كمدخلات، ما يزيد من احتمالية اقتراح هذه الكتب نفسها في المستقبل.
نموذج ترتيب الجامعات الذي يصنّف المؤسسات التعليمية جزئيًا استنادًا إلى
انتقائيتها، أي النسبة المئوية للطلاب الذين تم قبولهم
بعد تقديم طلب الالتحاق
قد تجذب ترتيبات النموذج اهتمامًا إضافيًا بالمدارس التي حصلت على أعلى التقييمات، ما يؤدي إلى زيادة عدد الطلبات التي تتلقّاها. إذا استمرت هذه
المدارس في قبول العدد نفسه من الطلاب، ستزداد انتقائية القبول (ستنخفض النسبة المئوية للطلاب المقبولين). سيؤدي ذلك إلى
تعزيز ترتيب هذه المدارس، ما سيزيد بدوره من
اهتمام الطلاب المحتملين، وما إلى ذلك.
نموذج نتائج الانتخابات الذي يتوقّع الفائز في سباق رئاسة بلدية
من خلال استطلاع% 2 من الناخبين بعد إغلاق صناديق الاقتراع
إذا لم ينشر النموذج توقّعاته إلا بعد إغلاق صناديق الاقتراع، لن يكون من الممكن أن تؤثّر توقّعاته في سلوك الناخبين.
نموذج لقيمة المساكن يتنبّأ بأسعار المنازل باستخدام
المساحة (بالمتر المربّع) وعدد غرف النوم والموقع الجغرافي
بصفتها سمات
لا يمكن تغيير الموقع الجغرافي للبيت أو
حجمه أو عدد غرف النوم بسرعة استجابةً لتوقّعات الأسعار،
ما يجعل حلقة الملاحظات والآراء غير محتملة. ومع ذلك، من المحتمل أن يكون هناك
ارتباط بين الحجم وعدد غرف النوم (من المرجّح أن تحتوي المنازل الكبيرة
على المزيد من الغرف) وقد تحتاج إلى التمييز بينهما.
نموذج لسمات الوجه يرصد ما إذا كان الشخص يبتسم
في الصورة، ويتم تدريبه بانتظام على قاعدة بيانات للصور المخزّنة
والتي يتم تحديثها تلقائيًا شهريًا.
لا تتوفّر حلقة ملاحظات هنا، لأنّ توقّعات النماذج لا تُحدث
أي تأثير في قاعدة بيانات الصور. ومع ذلك، يُعدّ تحديد الإصدارات لبيانات الإدخال
موضع قلق هنا، لأنّ هذه التحديثات الشهرية قد تؤدي
ربما إلى تأثيرات غير متوقّعة في النموذج.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\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,["# Production ML systems: Questions to ask\n\nThis lesson focuses on the questions you should ask about your data\nand model in production systems.\n\nIs each feature helpful?\n------------------------\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-----------------------------\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--------------------------------------\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\n### Exercise: Check your understanding\n\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)"]]