با مجموعهها، منظم بمانید ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
Playground یک برنامه تعاملی است که به شما امکان می دهد جنبه های مختلف آموزش و آزمایش یک مدل یادگیری ماشین را دستکاری کنید. با Playground، میتوانید ویژگیها را انتخاب کنید و فراپارامترها را تنظیم کنید، و سپس کشف کنید که چگونه انتخابهای شما بر یک مدل تأثیر میگذارد.
این صفحه شامل دو تمرین زمین بازی است.
تمرین 1: تلاقی ویژگی های اساسی
برای این تمرین، روی بخشهای زیر از رابط کاربری Playground تمرکز کنید:
در زیر ویژگی ها، به سه ویژگی بالقوه مدل توجه کنید:
x 1
x 2
x 1 x 2
در زیر OUTPUT، یک مربع حاوی نقاط نارنجی و آبی خواهید دید. تصور کنید که به یک جنگل مربع نگاه می کنید، جایی که نقاط نارنجی نشان دهنده موقعیت درختان بیمار و نقاط آبی رنگ موقعیت درختان سالم را نشان می دهد.
بین FEATURES و OUTPUT، اگر خیلی دقیق نگاه کنید، سه خط چین ضعیف را خواهید دید که هر ویژگی را به خروجی متصل می کند. عرض هر خط چین نماد وزنی است که در حال حاضر با هر ویژگی مرتبط است. این خطوط بسیار کم رنگ هستند زیرا وزن اولیه برای هر ویژگی به 0 مقداردهی می شود. با افزایش وزن یا کوچک شدن وزن، ضخامت این خطوط نیز افزایش می یابد.
وظیفه 1: زمین بازی را با انجام کارهای زیر کاوش کنید:
روی خط ضعیفی که ویژگی x 1 را به خروجی متصل می کند کلیک کنید. یک پنجره بازشو ظاهر می شود.
در پنجره بازشو، وزن 1.0 را وارد کنید.
Enter را فشار دهید.
به موارد زیر توجه کنید:
خط چین برای x 1 با افزایش وزن از 0 به 1.0 ضخیم تر می شود.
اکنون یک پس زمینه نارنجی و آبی ظاهر می شود.
پس زمینه نارنجی حدس مدل است که درختان بیمار کجا هستند.
پس زمینه آبی حدس مدل است که درختان سالم کجا هستند. مدل کار وحشتناکی انجام می دهد. حدود نیمی از حدس های مدل اشتباه است.
از آنجایی که وزن برای x 1 1.0 و برای سایر ویژگی ها 0 است، مدل دقیقاً با مقادیر x 1 مطابقت دارد.
وظیفه 2: وزن هر یک یا هر سه ویژگی را تغییر دهید تا مدل (رنگ های پس زمینه) درختان بیمار و سالم را با موفقیت پیش بینی کند. راه حل درست در زیر Playground ظاهر می شود.
برای حل مشکل 2 اینجا را کلیک کنید
w 1 = 0
w 2 = 0
x 1x 2 = هر مقدار مثبت
فقط برای سرگرمی، اگر یک مقدار منفی برای متقاطع ویژگی وارد کنید چه اتفاقی میافتد؟
تمرین 2: یک ضربدر ویژگی پیچیده تر
برای تمرین دوم، به ترتیب نقاط نارنجی (درختان بیمار) و نقاط آبی (درختان سالم) در مدل خروجی نگاه کنید و به موارد زیر توجه کنید:
نقطه ها الگوهای تقریباً کروی را تشکیل می دهند.
ترتیب نقاط پر سر و صدا است. به عنوان مثال، به نقاط آبی گاه به گاه در کره بیرونی نقاط نارنجی توجه کنید. در نتیجه، حتی یک مدل عالی بعید است که هر نقطه را به درستی پیش بینی کند.
وظیفه 1: رابط کاربری Playground را با انجام کارهای زیر کاوش کنید:
روی دکمه Run/Pause کلیک کنید، که یک مثلث سفید داخل یک دایره سیاه است. زمین بازی آموزش مدل را آغاز خواهد کرد. مشاهده کنید که شمارنده اعصار در حال افزایش است.
پس از اینکه سیستم حداقل 300 دوره تمرین کرد، همان دکمه Run/Pause را فشار دهید تا آموزش متوقف شود.
به مدل نگاه کن آیا مدل پیش بینی های خوبی انجام می دهد؟ به عبارت دیگر، آیا نقاط آبی معمولاً با پس زمینه آبی احاطه شده اند و آیا نقاط نارنجی معمولاً با پس زمینه نارنجی احاطه شده اند؟
مقدار Test loss را که درست در زیر OUTPUT ظاهر می شود، بررسی کنید. آیا این مقدار به 1.0 (تلفات بیشتر) نزدیکتر است یا به 0 (تلفات کمتر) نزدیکتر است؟
با فشار دادن پیکان منحنی در سمت چپ دکمه Run/Pause، Playground را بازنشانی کنید.
وظیفه 2: با انجام کارهای زیر یک مدل بهتر بسازید:
هر ترکیبی از پنج ویژگی ممکن را انتخاب یا لغو انتخاب کنید.
نرخ یادگیری را تنظیم کنید.
سیستم را برای حداقل 500 دوره آموزش دهید.
ارزش از دست دادن تست را بررسی کنید. آیا می توانید از دست دادن تست کمتر از 0.2 بگیرید؟
راه حل ها در زیر Playground ظاهر می شوند.
برای حل کار 1 اینجا را کلیک کنید
مدلش وحشتناکه به عنوان مثال توجه کنید که بسیاری از نقاط نارنجی در دریای آبی شنا می کنند. علاوه بر این، از دست دادن تست بسیار بالا است.
برای راه حل وظیفه 2 اینجا را کلیک کنید
با انجام موارد زیر می توانید عملکرد مدل را بهبود ببخشید:
هر دو تبدیل چند جمله ای (x 12 و x 22 ) را انتخاب کنید و سه ویژگی ممکن دیگر را بردارید.
تاریخ آخرین بهروزرسانی 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)"]]