تنظيم صفحاتك في مجموعات يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تدفع التجارب المشروع نحو تحقيق الجدوى. وهي عبارة عن فرضيات قابلة للاختبار والتكرار. عند إجراء التجارب، يكون الهدف هو إجراء تحسينات تدريجية ومستمرة من خلال تقييم مجموعة متنوعة من تصاميم نماذج وميزاتها. عند إجراء التجربة، عليك تنفيذ ما يلي:
تحديد الأداء الأساسي: ابدأ بإنشاء مقياس أساسي. يعمل الأساس كأداة قياس لمقارنة التجارب.
في بعض الحالات، يمكن أن يقدّم الحلّ الحالي غير المستنِد إلى الذكاء الاصطناعي المقياس الأساسي الأول. إذا لم يتوفّر حلّ حاليًا، أنشئ نموذج تعلُّم آليًا باستخدام بنية بسيطة وبعض الميزات واستخدِم مقاييس النموذج كأساس.
إجراء تغييرات صغيرة فردية: إجراء تغيير واحد صغير فقط في كل مرة، على سبيل المثال، في المَعلمات الفائقة أو البنية أو الميزات إذا كان التغيير يحسّن النموذج، تصبح مقاييس هذا النموذج هي الأساس الجديد الذي يتم مقارنة التجارب المستقبلية به.
في ما يلي أمثلة على التجارب التي تُجري تغييرًا صغيرًا واحدًا:
أن تتضمّن الميزة X
استخدِم نسبة إيقاف 0.5 في الطبقة المخفية الأولى.
تطبيق التحويل اللوغاريتمي على الميزة Y
غيِّر معدّل التعلّم إلى 0.001.
تسجيل مستوى تقدّم التجارب من المرجّح أن تحتاج إلى إجراء العديد من التجارب. لا تزال التجارب التي تتسم بجودة توقّعات ضعيفة (أو محايدة) مقارنةً بقاعدة البيانات الأساسية مفيدة لتتبّعها. وتشير إلى ال approaches التي لن تنجح. ولأنّ مستوى التقدّم عادةً ما يكون غير خطي، من المهم إعلام الفريق بأنّك تعمل على حلّ المشكلة من خلال تسليط الضوء على كل الحلول التي اتّبعتها ولم تنجح، بالإضافة إلى مستوى تقدّمك في تحسين الجودة الأساسية.
بما أنّ كل تدريب كامل على مجموعة بيانات واقعية يمكن أن يستغرق ساعات (أو أيامًا)، ننصح بإجراء عدة تجارب مستقلة في الوقت نفسه لاستكشاف المجال بسرعة. مع مواصلة تكرار العملية، من المرجّح أن تحقّق مستوى الجودة المطلوب للنشر.
التشويش في النتائج التجريبية
يُرجى العِلم أنّك قد تواجه شوشرة في النتائج التجريبية ليست ناتجة عن تغييرات في النموذج أو البيانات، ما يجعل من الصعب تحديد ما إذا كان التغيير الذي أجريته قد حسّن النموذج فعلاً. في ما يلي أمثلة على العوامل التي يمكن أن تؤدي إلى حدوث تشويش في النتائج التجريبية:
ترتيب البيانات: يمكن أن يؤثر ترتيب عرض البيانات على النموذج في أدائه.
إعداد المتغيّرات: يمكن أن تؤثر أيضًا الطريقة التي يتم بها إعداد المتغيّرات في النموذج في أدائه.
التوازُن غير المتزامن: إذا تم تدريب النموذج باستخدام التوازُن غير المتزامن، يمكن أن يؤثر الترتيب الذي يتم به تعديل الأجزاء المختلفة من النموذج في أدائه أيضًا.
مجموعات التقييم الصغيرة: إذا كانت مجموعة التقييم صغيرة جدًا، قد لا تمثّل الأداء العام للنموذج، ما يؤدي إلى اختلافات غير متكافئة في جودة النموذج.
يساعد إجراء التجربة عدة مرات في تأكيد النتائج التجريبية.
التوافق مع ممارسات التجارب
يجب أن يكون لدى فريقك فهم واضح لماهية "التجربة" بالضبط، مع مجموعة محدّدة من الممارسات والعناصر. يجب تقديم مستندات تحدد ما يلي:
العناصر: ما هي العناصر في التجربة؟ في معظم الحالات، تمثل المحاولة التجريبية فرضية تم اختبارها ويمكن إعادة إنتاجها، وذلك عادةً من خلال تسجيل البيانات الوصفية (مثل الميزات والمَعلمات الفائقة) التي تشير إلى التغييرات بين التجارب ومدى تأثيرها في جودة النموذج.
ممارسات الترميز هل سيستخدم الجميع بيئات تجريبية خاصة بهم؟ ما مدى إمكانية (أو سهولة) توحيد أعمال الجميع في مكتبات مشترَكة؟
إمكانية إعادة الإجراء والتتبّع: ما هي معايير إعادة الإجراء؟ على سبيل المثال، هل يجب أن يستخدم الفريق مسار بيانات وممارسات إصدار البيانات نفسها، أم أنّه لا بأس بعرض المخططات فقط؟ كيف سيتم حفظ البيانات التجريبية: كطلبات بحث SQL أو كلقطات نموذجية؟ أين سيتم تسجيل السجلّات من كل تجربة: في مستند أو جدول بيانات أو نظام إدارة محتوى لإدارة التجارب؟
التوقعات الخاطئة
لا يوجد نموذج مثالي في العالم الواقعي. كيف سيتعامل نظامك مع التوقّعات الخاطئة؟ ابدأ التفكير مبكرًا في كيفية التعامل مع هذه المشاكل.
تشجّع استراتيجية أفضل الممارسات المستخدمين على تصنيف التوقّعات الخاطئة بشكل صحيح. على سبيل المثال، تلتقط تطبيقات البريد الرسائل الإلكترونية التي تم تصنيفها بشكل خاطئ عن طريق تسجيل الرسائل التي ينقلها مستخدمو البريد إلى مجلد الرسائل غير المرغوب فيها، بالإضافة إلى العكس. من خلال الحصول على تصنيفات الحقيقة الأساسية من المستخدمين، يمكنك تصميم حلقات ملاحظات آلية لجمع البيانات وإعادة تدريب النماذج.
تجدر الإشارة إلى أنّه على الرغم من أنّ الاستطلاعات المضمّنة في واجهة المستخدم تُسجّل ملاحظات المستخدمين، إلا أنّ البيانات تكون نوعية في الغالب ولا يمكن دمجها في بيانات إعادة التدريب.
تنفيذ حلّ شامل
بينما يجرّب فريقك النموذج، من الأفضل أن يبدأ في تطوير أجزاء من مسار التحسين النهائي (إذا كانت لديك الموارد اللازمة لإجراء ذلك).
إنّ إنشاء أجزاء مختلفة من مسار الإحالة الناجحة، مثل نقل البيانات وإعادة تدريب النموذج، يسهّل نقل النموذج النهائي إلى مرحلة الإنتاج. على سبيل المثال، يمكن أن يساعد الحصول على مسار عمل شامل لاستيراد البيانات وعرض التوقعات الفريق على بدء دمج النموذج في المنتج وبدء إجراء اختبارات المستخدمين في المرحلة المبكرة.
تحديد المشاكل وحلّها في المشاريع التي توقفت
قد تكون في سيناريوهات يتوقّف فيها تقدّم المشروع. ربما كان فريقك يعمل على تجربة واعدة ولكن لم ينجح في تحسين النموذج لعدة أسابيع. ما هي الإجراءات التي عليك اتخاذها؟ في ما يلي بعض الطرق الممكنة:
استراتيجية: قد تحتاج إلى إعادة صياغة المشكلة. بعد قضاء بعض الوقت في مرحلة الاختبار، من المرجّح أن تفهم المشكلة والبيانات والحلول المحتملة بشكل أفضل. من خلال معرفة أكثر تفصيلاً عن المجال، يمكنك على الأرجح تحديد المشكلة بدقة أكبر.
على سبيل المثال، ربما أردت في البداية استخدام الانحدار الخطي للتنبؤ بقيمة رقمية. لم تكن البيانات جيدة بما يكفي لتدريب نموذج انحدار خطي قابل للاستخدام. قد يكشف تحليل إضافي أنّه يمكن حلّ المشكلة من خلال توقّع ما إذا كان المثال أعلى قيمة معيّنة أو أقل منها. يتيح لك ذلك إعادة صياغة المشكلة على أنّها مشكلة تصنيف ثنائي.
إذا كان مستوى التقدّم أبطأ من المتوقع، لا تستسلم. قد تكون التحسينات المتزايدة بمرور الوقت هي الطريقة الوحيدة لحلّ المشكلة. كما ذكرنا سابقًا، لا تتوقّع تحقيق القدر نفسه من التقدّم من أسبوع لآخر. غالبًا ما يستغرق الحصول على إصدار جاهز للنشر من أحد النماذج وقتًا طويلاً. يمكن أن يكون تحسين النموذج غير منتظم وغير متوقّع. يمكن أن تتبع فترات التقدّم المحدود ارتفاعات في التحسين، أو العكس.
الجانب الفني: اقضِ بعض الوقت في تشخيص التوقعات الخاطئة وتحليلها. في بعض الحالات، يمكنك العثور على المشكلة من خلال عزل بعض التوقّعات الخاطئة وتشخيص سلوك النموذج في هذه الحالات. على سبيل المثال، قد يتم اكتشاف مشاكل في البنية أو البيانات. وفي حالات أخرى، يمكن أن يساعدك الحصول على المزيد من البيانات. قد تتلقّى إشارة أوضح تشير إلى أنّك على الطريق الصحيح، أو قد تنتج المزيد من الضوضاء، ما يشير إلى وجود مشاكل أخرى في النهج.
إذا كنت تعمل على حلّ مشكلة تتطلّب مجموعات بيانات مصنّفة من قِبل البشر، قد يكون من الصعب الحصول على مجموعة بيانات مصنّفة لتقييم النموذج. ابحث عن مراجع للحصول على مجموعات البيانات التي ستحتاجها لإجراء التقييم.
قد لا يتوفّر حلّ. حدِّد إطارًا زمنيًا لأسلوبك، وتوقف عن اتّباعه إذا لم تحقّق تقدّمًا خلال الإطار الزمني. في المقابل، إذا كان لديك بيان مشكلة قوي، من المرجّح أن يتطلّب حلًا.
التحقّق من الفهم
عثر أحد أعضاء الفريق على مجموعة من المَعلمات الفائقة التي تحسِّن مقياس النموذج الأساسي. ماذا يجب أن يفعله أعضاء الفريق الآخرون؟
قد يُدمج مَعلمة متغيرة واحدة، ولكن يواصل إجراء تجاربه.
إجابة صحيحة. إذا بدا أنّ أحد مَعلماتها الفائقة هو خيار مناسب، جرِّبه. ومع ذلك، لا تكون جميع خيارات المَعلمات الفائقة منطقية في كل سياق تجريبي.
تغيير جميع المَعلمات الفائقة في تجربته الحالية لتتطابق مع المَعلمات الفائقة التي يستخدمها زميله
إنّ المعلَمات الفائقة التي أدّت إلى تحسين نموذج معيّن لا تعني أنّها ستؤدي أيضًا إلى تحسين نموذج آخر. على أعضاء الفريق الآخرين مواصلة إجراء تجاربهم، ما قد يؤدي إلى تحسين الأداء الأساسي بشكل أكبر في وقت لاحق.
ابدأ في إنشاء مسار عمل شامل سيتم استخدامه لتنفيذ نموذجك.
إنّ النموذج الذي يحسّن الأداء الأساسي لا يعني أنّه النموذج الذي سيتم استخدامه في النهاية في مرحلة الإنتاج. يجب أن يواصلوا إجراء تجاربهم، ما قد يؤدي إلى تحسين الأساس في وقت لاحق بشكل أكبر.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eExperiments involve making single, small, iterative changes to model features, architecture, or hyperparameters to improve performance compared to a baseline.\u003c/p\u003e\n"],["\u003cp\u003eIt's crucial to track all experimental results, including unsuccessful ones, to understand which approaches work and which don't.\u003c/p\u003e\n"],["\u003cp\u003eTeams should establish clear experimentation practices, including defining artifacts, coding standards, reproducibility measures, and tracking methods.\u003c/p\u003e\n"],["\u003cp\u003ePlan for handling wrong predictions early on, potentially by incorporating user feedback for model improvement.\u003c/p\u003e\n"],["\u003cp\u003eConsider building parts of the final pipeline alongside experimentation to facilitate a smoother transition to production.\u003c/p\u003e\n"]]],[],null,["Experiments drive a project toward viability. They are testable and\nreproducible hypotheses. When running experiments, the\ngoal is to make continual, incremental improvements by evaluating a variety of\nmodel architectures and features. When experimenting, you'll want to do\nthe following:\n\n- **Determine baseline performance.** Start by establishing a\n [baseline](/machine-learning/glossary#baseline) metric. The baseline\n acts as a measuring stick to compare experiments against.\n\n In some cases, the current non-ML solution can provide the first baseline\n metric. If no solution currently exists, create a ML model with a simple\n architecture, a few features, and use its metrics as the baseline.\n- **Make single, small changes.** Make only a single, small change at a time,\n for example, to the hyperparameters, architecture, or features. If the\n change improves the model, that model's metrics become the new baseline to\n compare future experiments against.\n\n The following are examples of experiments that make a single, small change:\n - include feature *X*.\n - use 0.5 dropout on the first hidden layer.\n - take the log transform of feature *Y*.\n - change the learning rate to 0.001.\n- **Record the progress of the experiments.** You'll most likely need to do\n lots of experiments. Experiments with poor (or neutral) prediction quality\n compared to the baseline are still useful to track. They signal which\n approaches won't work. Because progress is typically non-linear, it's\n important to show that you're working on the problem by highlighting all\n the ways you found that don't work---in addition to your progress at\n increasing the baseline quality.\n\nBecause each full training on a real-world dataset can take hours (or days),\nconsider running multiple independent experiments concurrently to explore the\nspace quickly. As you continue to iterate, you'll hopefully get closer and\ncloser to the level of quality you'll need for production.\n\nNoise in experimental results\n\nNote that you might encounter noise in experimental results that aren't from\nchanges to the model or the data, making it difficult to determine if a change\nyou made actually improved the model. The following are examples of things that\ncan produce noise in experimental results:\n\n- Data shuffling: The order in which the data is presented to the model can\n affect the model's performance.\n\n- Variable initialization: The way in which the model's\n variables are initialized can also affect its performance.\n\n- Asynchronous parallelism: If the model is trained using asynchronous\n parallelism, the order in which the different parts of the model are updated\n can also affect its performance.\n\n- Small evaluation sets: If the evaluation set is too small, it may\n not be representative of the overall performance of the model, producing\n uneven variations in the model's quality.\n\nRunning an experiment multiple times helps confirm experimental results.\n\nAlign on experimentation practices\n\nYour team should have a clear understanding of what exactly an \"experiment\" is,\nwith a defined set of practices and artifacts. You'll want documentation that\noutlines the following:\n\n- **Artifacts.** What are the artifacts for an experiment? In most cases, an\n experiment is a tested hypothesis that can be reproduced, typically by\n logging the metadata (like the features and hyperparameters) that indicate\n the changes between experiments and how they affect model quality.\n\n- **Coding practices.** Will everyone use their own experimental environments?\n How possible (or easy) will it be to unify everyone's work into shared\n libraries?\n\n- **Reproducibility and tracking.** What are the standards for\n reproducibility? For instance, should the team use the same data pipeline\n and versioning practices, or is it OK to show only plots? How will\n experimental data be saved: as SQL queries or as model snapshots? Where will\n the logs from each experiment be documented: in a doc, a spreadsheet, or a\n CMS for managing experiments?\n\nWrong predictions\n\nNo real-world model is perfect. How will your system handle wrong predictions?\nBegin thinking early on about how to deal with them.\n\nA best-practices strategy encourages users to correctly label wrong predictions.\nFor example, mail apps capture misclassified email by logging the mail users\nmove into their spam folder, as well as the reverse. By capturing ground truth\nlabels from users, you can design automated feedback loops for data collection\nand model retraining.\n\nNote that although UI-embedded surveys capture user feedback, the data is\ntypically qualitative and can't be incorporated into the retraining data.\n\nImplement an end-to-end solution\n\nWhile your team is experimenting on the model, it's a good idea to start\nbuilding out parts of the final pipeline (if you have the resources to do so).\n\nEstablishing different pieces of the pipeline---like data intake and model\nretraining---makes it easier to move the final model to production. For\nexample, getting an end-to-end pipeline for ingesting data and serving\npredictions can help the team start integrating the model into the product and\nto begin conducting early-stage user testing.\n\nTroubleshooting stalled projects\n\nYou might be in scenarios where a project's progress stalls. Maybe your\nteam has been working on a promising experiment but hasn't had success\nimproving the model for weeks. What should you do? The following are some\npossible approaches:\n\n- **Strategic.** You might need to reframe the problem. After spending time in\n the experimentation phase, you probably understand the problem, the data,\n and the possible solutions better. With a deeper knowledge of the domain,\n you can probably frame the problem more precisely.\n\n For instance, maybe you initially wanted to use linear regression to predict\n a numeric value. Unfortunately, the data wasn't good enough to train a\n viable linear regression model. Maybe further analysis reveals the problem\n can be solved by predicting whether an example is above or below a specific\n value. This lets you reframe the problem as a binary classification one.\n\n If progress is slower than expected, don't give up. Incremental improvements\n over time might be the only way to solve the problem. As noted earlier,\n don't expect the same amount of progress week over week. Often, getting a\n production-ready version of a model requires substantial amounts of time.\n Model improvement can be irregular and unpredictable. Periods of slow\n progress can be followed by spikes in improvement, or the reverse.\n- **Technical.** Spend time diagnosing and analyzing wrong predictions. In\n some cases, you can find the issue by isolating a few wrong predictions and\n diagnosing the model's behavior in those instances. For example, you might\n uncover problems with the architecture or the data. In other cases,\n getting more data can help. You might get a clearer signal that suggests\n you're on the right path, or it might produce more noise, indicating other\n issues exist in the approach.\n\n If you're working on a problem that requires human-labeled datasets,\n getting a labeled dataset for model evaluation might be hard to obtain. Find\n resources to get the datasets you'll need for evaluation.\n\nMaybe no solution is possible. Time-box your approach, stopping if you haven't\nmade progress within the timeframe. However, if you have a strong problem\nstatement, then it probably warrants a solution.\n\nCheck Your Understanding \nA team member found a combination of hyperparameters that improves the baseline model metric. What should the other members of the team do? \nMaybe incorporate one hyperparameter, but continue with their experiments. \nCorrect. If one of their hyperparameters seems like a reasonable choice, try it. However, not all hyperparameter choices make sense in every experimental context. \nChange all their hyperparameters in their current experiment to match their co-worker's. \nHyperparameters that improved one model doesn't mean they'll also improve a different model. The other teammates should continue with their experiments, which might actually improve the baseline even more later on. \nStart building an end-to-end pipeline that will be used to implement the model. \nA model that improves the baseline doesn't mean it's the model that will ultimately be used in production. They should continue with their experiments, which might actually improve the baseline even more later on.\n| **Key Terms:**\n|\n| - [baseline](/machine-learning/glossary#baseline)"]]