تنظيم صفحاتك في مجموعات يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
Playground هو تطبيق تفاعلي يتيح لك التحكّم في مختلف جوانب تدريب نموذج تعلُّم الآلة واختباره. باستخدام "مساحة المرح"، يمكنك اختيار الميزات وضبط مُدخل الضبط ثم تكتشف كيف تؤثر اختياراتك في النموذج.
تحتوي هذه الصفحة على تمرينَين في "مساحة المرح".
التمرين 1: مضروب أساسي لمجموعات الخصائص
في هذا التمرين، ركِّز على الأجزاء التالية من واجهة مستخدم "أداة إنشاء التطبيقات":
أسفل "الميزات"، لاحظ الميزات الثلاث المحتملة للنموذج:
×1
x2
x1x2
أسفل OUTPUT، سيظهر لك مربع يحتوي على اللون البرتقالي والنقاط الزرقاء. لنفترض أنّك تنظر إلى غابة مربّعة، حيث تشير النقاط البرتقالية إلى موضع الأشجار المريضة والنقاط الزرقاء إلى موضع الأشجار السليمة.
بين الميزات وOUTPUT، إذا نظرت عن كثب، سترى ثلاثة خطوط متقطعة باهتة تربط كل ميزة بالنتيجة. يشير عرض كل خط متقطع إلى الوزن المرتبط حاليًا مع كل ميزة. هذه الخطوط باهتة جدًا لأن الوزن الافتتاحي يتم إعداد كل ميزة على 0. وكلما زاد الوزن أو نقص، زاد سمك هذه الخطوط.
المهمة 1: استكشاف "ساحة اللعب" من خلال تنفيذ ما يلي:
انقر على الخط الخافت الذي يربط الميزة x1 بالنتيجة. ستظهر نافذة منبثقة.
في النافذة المنبثقة، أدخِل الوزن 1.0.
اضغط على مفتاح Enter.
لاحظ ما يلي:
يصبح الخط المخطّط لسمة x1 أكثر سمكًا مع زيادة الترجيح من 0 إلى 1.0.
ستظهر الآن خلفية برتقالية وازرق.
الخلفية البرتقالية هي المكان الذي يخمن فيه النموذج الأماكن التي تكمن فيها الأشجار المرضية
الخلفية الزرقاء هي تخمينات النموذج لأماكن الأشجار السليمة . يؤدي النموذج عملاً مروّعًا؛ حوالي نصف تخمينات النموذج خطأ.
وبما أنّ وزن السمة x1 هو 1.0 والوزن للسمات الأخرى هو 0، يتطابق النموذج مع قيم السمة x1 تمامًا.
المهمة 2: تغيير القيم التقديرية لأي من الميزات الثلاثة أو جميعها بحيث يتوقّع النموذج (ألوان الخلفية) أنّه مريض ومريض الأشجار. يظهر الحلّ أسفل Playground مباشرةً.
انقر هنا للحصول على حل للمهمة 2
w1 = 0
w2 = 0
x1x2 = أي قيمة موجبة
من باب التسلية، ماذا يحدث إذا أدخلت قيمة سلبية للسمة تقاطع؟
تمرين 2: تقاطع خاصية أكثر تعقيدًا
في التمرين الثاني، انظر إلى ترتيب النقاط البرتقالية (الأشجار المريضة) والنقاط الزرقاء (الأشجار السليمة) في نموذج الإخراج، مع ملاحظة ما يلي:
تشكل النقاط أنماطًا كروية تقريبًا.
ترتيب النقاط غير واضح، على سبيل المثال، يُرجى ملاحظة النقاط الزرقاء المتقطعة في المجال الخارجي للنقاط البرتقالية. ونتيجةً لذلك، من غير المرجّح أن يتنبّأ نموذج رائع بكل نقطة بشكل صحيح.
المهمة 1: استكشاف واجهة مستخدم Playground من خلال تنفيذ ما يلي:
انقر على زر التشغيل/الإيقاف المؤقت، وهو مثلث أبيض داخل دائرة سوداء. سيبدأ "مساحة المرح" في تدريب النموذج. مراقبة عداد الحقبات في ازدياد.
بعد تدريب النظام لمدة 300 دورة تدريبية على الأقل، اضغط على زر التشغيل/الإيقاف المؤقت نفسه لإيقاف التدريب مؤقتًا.
انظر إلى النموذج. هل يقدّم النموذج تنبؤات جيدة؟ بعبارة أخرى، هل النقاط الزرقاء محاطة بشكل عام بخلفية زرقاء، وهل النقاط البرتقالية محاطة بشكل عام بخلفية برتقالية؟
افحص قيمة فقدان الاختبار، التي تظهر أسفل OUTPUT مباشرةً. هل هذا أقرب من 1.0 (خسارة أعلى) أو أقرب إلى 0 (خسارة أقل)؟
أعد ضبط Playground عن طريق الضغط على السهم المتعرج إلى يسار زر التشغيل/الإيقاف المؤقت.
المهمة 2: أنشئ نموذجًا أفضل من خلال اتّباع الخطوات التالية:
اختَر أيّ مجموعة من الميزات الخمس المحتملة أو ألغِ اختيارها.
اضبط معدّل التعلّم.
درِّب النظام على 500 حقبة على الأقل.
فحص قيمة فقدان الاختبار. هل يمكنك أن تحقق خسارة أقل من 0.2 في الاختبار؟
تظهر الحلول تحت "مساحة المرح".
انقر هنا للحصول على حل للمهمة 1
النموذج سيئ للغاية. لاحظ، على سبيل المثال، أن العديد من الألوان نقط تسبح في بحر من اللون الأزرق. بالإضافة إلى ذلك، يكون "خسارة الاختبار" مرتفعة جدًا.
انقر هنا للحصول على حل للمهمة 2
يمكنك تحسين أداء النموذج من خلال تنفيذ ما يلي:
اختَر كلتا تحويلتَي المتعدّد الحدود (x12 وx22) وألغِ اختيار الميزات الثلاث الأخرى المحتملة.
تاريخ التعديل الأخير: 2025-06-03 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-06-03 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003ePlayground is an interactive tool for experimenting with machine learning models by adjusting features and hyperparameters to observe their impact.\u003c/p\u003e\n"],["\u003cp\u003eExercise 1 focuses on feature crosses and manipulating feature weights to achieve accurate model predictions of sick and healthy trees.\u003c/p\u003e\n"],["\u003cp\u003eExercise 2 explores model training, the influence of features and learning rate on model performance, and minimizing test loss for better predictions.\u003c/p\u003e\n"]]],[],null,["[Playground](https://playground.tensorflow.org/) is an\ninteractive application that lets you manipulate various\naspects of training and testing a machine learning model.\nWith Playground, you can select features and adjust hyperparameters,\nand then discover how your choices influence a model.\n\nThis page contains two Playground exercises.\n\nExercise 1: A basic feature cross\n\nFor this exercise, focus on the following parts of the Playground\nuser interface:\n\n- Underneath FEATURES, notice the three potential model features:\n - x~1~\n - x~2~\n - x~1~x~2~\n- Underneath OUTPUT, you'll see a square containing orange and blue dots. Imagine that you're looking at a square forest, where orange dots mark the position of sick trees and blue dots mark the position of healthy trees.\n- Between FEATURES and OUTPUT, if you look very closely, you'll see three faint dashed lines connecting each feature to the output. The width of each dashed line symbolizes the weight currently associated with each feature. These lines are very faint because the starting weight for each feature is initialized to 0. As the weight grows or shrinks, so will the thickness of these lines.\n\n**Task 1:** Explore Playground by doing the following:\n\n1. Click on the faint line that connects feature x~1~ to the output. A popup appears.\n2. In the popup, enter the weight `1.0`.\n3. Press Enter.\n\nNotice the following:\n\n- The dashed line for x~1~ becomes thicker as the weight increases from 0 to 1.0.\n- An orange and blue background now appears.\n - The orange background is the model's guesses as to where the sick trees are.\n - The blue background is the model's guesses as to where the healthy trees are. The model is doing a terrible job; about half of the model's guesses are wrong.\n- Because the weight is 1.0 for x~1~ and 0 for the other features, the model matches x~1~'s values exactly.\n\n**Task 2:** Change the weights of any or all of the three features so that the\nmodel (the background colors) successfully predicts sick and healthy\ntrees. The solution appears just below Playground.\n\n\u003cbr /\u003e\n\n\n*** ** * ** ***\n\n*** ** * ** ***\n\n**Click here for the solution to Task 2** \n- *w~1~* = 0\n- *w~2~* = 0\n- *x~1~* *x~2~* = any positive value\n\nJust for fun, what happens if you input a negative value for the feature\ncross?\n\nExercise 2: A more sophisticated feature cross\n\nFor the second exercise, look at the arrangement of orange dots (sick trees)\nand blue dots (healthy trees) in the output model, noticing the following:\n\n- The dots form roughly spherical patterns.\n- The arrangement of dots is noisy; for example, notice the occasional blue dots in the outer sphere of orange dots. Consequently, even a great model is unlikely to correctly predict each dot.\n\n**Task 1:** Explore the Playground UI by doing the following:\n\n1. Click the Run/Pause button, which is a white triangle inside a black circle. Playground will begin training the model; observe the Epochs counter increasing.\n2. After the system has trained for at least 300 epochs, press that same Run/Pause button to pause the training.\n3. Look at the model. Is the model making good predictions? In other words, are the blue dots generally surrounded by a blue background, and are the orange dots generally surrounded by an orange background?\n4. Examine the value of Test loss, which appears just below OUTPUT. Is this value closer to 1.0 (higher loss) or closer to 0 (lower loss)?\n5. Reset Playground by pressing the curvy arrow to the left of the Run/Pause button.\n\n**Task 2:** Build a better model by doing the following:\n\n1. Select or deselect any combination of the five possible features.\n2. Adjust the learning rate.\n3. Train the system for at least 500 epochs.\n4. Examine the value of Test loss. Can you get a Test loss less than 0.2?\n\nSolutions appear below Playground.\n\n*** ** * ** ***\n\n*** ** * ** ***\n\n**Click here for the solution to Task 1** \nThe model is terrible. Notice, for example, that many of the orange\ndots are swimming in a sea of blue. Furthermore, Test loss is very high.\n**Click here for the solution to Task 2** \n\nYou can improve model performance by doing the following:\n\n- Select both polynomial transforms (x~1~^2^ and x~2~^2^) and unselect the other three possible features.\n- Reduce the learning rate to `0.001` or lower. \n[Help Center](https://support.google.com/machinelearningeducation)"]]