0Pricing
Data Science Academy · درس

الغابة العشوائية للانحدار

تجميعات تقاوم فرط الملاءمة

الغابة العشوائية للانحدار درس مجاني في Data Science Academy على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Data Science Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Data Science Academy 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

One Tree, Many Trees

A single tree is shaky and overfits. A random forest grows hundreds of trees and blends them into one steadier prediction. 🌲🌲

The Wisdom of the Crowd

Each tree makes its own guess, then the forest averages them. Individual mistakes cancel out, leaving a smoother, more reliable number.

Different Rows Per Tree

Each tree trains on a random sample of rows drawn with replacement, a trick called bootstrapping. That gives every tree its own slightly different view.

Different Features Per Split

At each split a tree also sees only a random subset of features. This randomness keeps the trees from all looking alike.

Why Variety Helps

Variety is the whole point: when trees disagree in different ways, averaging them cuts the wild swings of a lone tree. That lowers variance.

Train It in Two Lines

Same contract as ever. Build a RandomForestRegressor, fit it, and predict, no extra ceremony required.

from sklearn.ensemble import RandomForestRegressor
model = RandomForestRegressor().fit(X, y)

How Many Trees

The n_estimators setting picks how many trees to grow. More trees usually help, then plateau, at the cost of slower training.

RandomForestRegressor(n_estimators=300)

Still Control Depth

You can cap each tree with max_depth too. Combined with many trees, the forest stays accurate without memorizing noise.

RandomForestRegressor(max_depth=8)

Built-In Feature Importance

A handy bonus: the forest reports feature_importances_, ranking which inputs drove its predictions most. Great for understanding your data.

model.feature_importances_

Strong and Forgiving

Random forests are a brilliant default: accurate, hard to overfit, and needing little tuning. Often your first strong model on tabular data.

The Cost of Power

The trade-off is clarity. With hundreds of trees you lose the simple, readable path of a single tree, so a forest is harder to explain.

Quick Check

What makes a forest beat one tree?

Recap

A random forest averages many varied trees, cutting variance and resisting overfit. A strong, low-tuning default for tabular numbers. 🎯

الأسئلة الشائعة

هل درس «الغابة العشوائية للانحدار» مجاني؟

نعم — نص درس «الغابة العشوائية للانحدار» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Data Science Academy، انتقل إلى CoddyKit PRO. تتضمن دورة Data Science Academy 4 دروس في المجموع.

ماذا ستتعلم في «الغابة العشوائية للانحدار»؟

تجميعات تقاوم فرط الملاءمة تتمرن على Data Science Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ Data Science Academy؟

لا تُشترط خبرة سابقة. Data Science Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 4 من أصل 4.

كم من الوقت يستغرق درس «الغابة العشوائية للانحدار»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس Data Science Academy هذا؟

نعم. كل درس في Data Science Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. مراجعة الانحدار الخطي
  2. انتظام Ridge وLasso
  3. انحدار شجرة القرار
  4. الغابة العشوائية للانحدار
← العودة إلى Data Science Academy