كيف يعثر PCA على المكوّنات
اتجاهات التباين بأسلوب حدسي
كيف يعثر PCA على المكوّنات درس مجاني في Data Science Academy على CoddyKit. هذا هو الدرس 2 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Data Science Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Data Science Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
Variance Is Information
PCA starts from one idea: the directions where your data spreads most carry the most information. That spread is called variance.
Find the Biggest Spread
PCA hunts for the single axis along which points vary the most. That direction becomes the first principal component.
Then Go Perpendicular
The next axis must be at right angles to the first while capturing the most remaining spread. Each new component is orthogonal to the others.
Components Are New Axes
Together these directions form a fresh coordinate system. Each principal component is a blend of your original features, not just one column.
Ranked by Importance
PCA orders components by how much variance each captures, so the first few hold the bulk of the signal and the last few hold mostly noise.
Project Onto Components
To shrink your data you project it onto the top components, swapping many original columns for a few informative scores.
Explained Variance Ratio
The explained variance ratio tells you the fraction of total spread each component keeps, so you can see how much you save.
Fit It in scikit-learn
In scikit-learn you set how many components you want, then fit_transform turns your wide table into compact scores.
from sklearn.decomposition import PCA
scores = PCA(n_components=2).fit_transform(X)Read the Ratios
After fitting, check explained_variance_ratio_ to see how much each component kept. Summing them shows your total retained variance.
pca = PCA(n_components=2).fit(X)
print(pca.explained_variance_ratio_)Components Are Linear
Each component is a weighted sum of features, so PCA only captures linear structure. Curved patterns need other tools.
Compression, Not Magic
You trade a little accuracy for far fewer columns. Dropped components hold the least variance, so the loss is usually small.
Quick Check
One rule decides which direction PCA picks first.
Recap
PCA finds orthogonal axes of maximum variance, ranks them, and projects data onto the top ones to compress it. 🎯
الأسئلة الشائعة
هل درس «كيف يعثر PCA على المكوّنات» مجاني؟
نعم — نص درس «كيف يعثر PCA على المكوّنات» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Data Science Academy، انتقل إلى CoddyKit PRO. تتضمن دورة Data Science Academy 4 دروس في المجموع.
ماذا ستتعلم في «كيف يعثر PCA على المكوّنات»؟
اتجاهات التباين بأسلوب حدسي تتمرن على Data Science Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ Data Science Academy؟
لا تُشترط خبرة سابقة. Data Science Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 2 من أصل 4.
كم من الوقت يستغرق درس «كيف يعثر PCA على المكوّنات»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس Data Science Academy هذا؟
نعم. كل درس في Data Science Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- لعنة كثرة الميزات
- كيف يعثر PCA على المكوّنات
- حجّم البيانات أولًا ثم طبّق PCA
- اختيار المكوّنات باستخدام مخططات Scree