تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
أهمية المتغيّرات
أهمية المتغيّر (المعروفة أيضًا باسم أهمية السمة) هي نتيجة تشير إلى مدى "أهمية" سمة معيّنة بالنسبة إلى النموذج. على سبيل المثال، إذا كان لدينا
نموذج مع سمتَي إدخال "f1" و "f2"، وكانت أهميّة المتغيّرات هي
{f1=5.8, f2=2.5}، تكون السمة "f1" أكثر "أهمية" للنموذج مقارنةً
بالسمة "f2". كما هو الحال مع نماذج تعلُّم الآلة الأخرى، تُعدّ أهمية المتغيّرات
طريقة بسيطة لفهم آلية عمل شجرة القرارات.
يمكنك تطبيق أهمية المتغيّرات المستقلة عن النموذج، مثل أهمية المتغيّر التماثلي،
على أشجار القرار.
تمتلك أشجار القرارات أيضًا أهمية متغيرة محدّدة، مثل:
- مجموع نتيجة التقسيم مع متغيّر معيّن.
- عدد العقد التي تحتوي على متغيّر معيّن
- متوسط عمق أول مرّة لظهور سمة في جميع مسارات
الشجرة
يمكن أن تختلف أهمية المتغيّرات حسب الصفات التالية:
بالإضافة إلى ذلك، تقدّم أهمية المتغيّرات أنواعًا مختلفة من المعلومات عن:
- النموذج
- مجموعة البيانات
- عملية التدريب
على سبيل المثال، يشير عدد الشروط التي تحتوي على ميزة معيّنة إلى
مدى اهتمام شجرة القرارات بهذه الميزة المحدّدة، ما قد يشير بدوره إلى
أهمية المتغيّر. بعد كل شيء، لن تستخدم خوارزمية التعلّم
ميزة في عدة شروط إذا لم تكن مهمة. ومع ذلك، قد تشير السمة نفسها التي تظهر في شروط متعدّدة أيضًا إلى أنّ النموذج يحاول تعميم نمط سمة معيّنة ولكنّه لا ينجح في ذلك. على سبيل المثال، يمكن أن يحدث ذلك
عندما تكون الميزة مجرد مثال لمعرّف بدون معلومات
لتعميمها.
من ناحية أخرى، تشير القيمة العالية لأهمية متغيّر الترتيب المتعاقب المرتفع
إلى أنّ إزالة سمة تؤثّر سلبًا في النموذج، ما يشير إلى
أهمية المتغيّر. ومع ذلك، إذا كان النموذج قويًا، قد لا تؤدي إزالة أي ميزة واحدة
إلى التأثير في النموذج.
ولأنّ أهمية المتغيّرات المختلفة تُعلمك بجوانب مختلفة من
النماذج، فإنّ الاطّلاع على العديد من أهمية المتغيّرات في الوقت نفسه يكون مفيدًا.
على سبيل المثال، إذا كانت إحدى الميزات مهمة وفقًا لجميع ملفوظات
الأهمية للمتغيّرات، من المرجّح أن تكون هذه الميزة مهمة. في مثال آخر، إذا كانت إحدى السمات
تُظهر أهمية عالية للمتغيّر "عدد العقد" وأهمية منخفضة للمتغيّر "الترميز"، قد يكون من الصعب تعميم هذه السمة وقد يؤدي ذلك بدوره إلى
تقليل جودة النموذج.
في YDF، يمكنك الاطّلاع على أهمية المتغيّر في النموذج من خلال الطلب
model.describe()
والاطّلاع على علامة التبويب "أهمية المتغيّر".
اطّلِع على
تعليم كيفية فهم النماذج لمزيد من التفاصيل.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-02-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-02-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eVariable importance, also known as feature importance, is a score indicating how crucial a feature is to a model's predictions.\u003c/p\u003e\n"],["\u003cp\u003eDecision trees have specific variable importances like the sum of split scores, number of nodes using a variable, and average depth of a feature's first occurrence.\u003c/p\u003e\n"],["\u003cp\u003eDifferent variable importance metrics provide insights into the model, dataset, and training process, such as feature usage patterns and generalization abilities.\u003c/p\u003e\n"],["\u003cp\u003eExamining multiple variable importances together offers a comprehensive understanding of feature relevance and potential model weaknesses.\u003c/p\u003e\n"],["\u003cp\u003eYDF allows users to access variable importance through the \u003ccode\u003emodel.describe()\u003c/code\u003e function and its "variable importance" tab for model understanding.\u003c/p\u003e\n"]]],[],null,["\u003cbr /\u003e\n\nVariable importances\n--------------------\n\n**Variable importance** (also known as **feature importance**) is a score that\nindicates how \"important\" a feature is to the model. For example, if for a given\nmodel with two input features \"f1\" and \"f2\", the variable importances are\n{f1=5.8, f2=2.5}, then the feature \"f1\" is more \"important\" to the model than\nfeature \"f2\". As with other machine learning models, variable importance is a\nsimple way to understand how a decision tree works.\n\nYou can apply model agnostic variable importances such as [permutation variable\nimportances](/machine-learning/glossary#permutation-variable-importances),\nto decision trees.\n\nDecision trees also have specific variable importances, such as:\n\n- The sum of the split score with a given variable.\n- The number of nodes with a given variable.\n- The average depth of the first occurrence of a feature across all the tree paths.\n\nVariable importances can differ by qualities such as:\n\n- semantics\n- scale\n- properties\n\nFurthermore, variable importances provide different types of information about:\n\n- the model\n- the dataset\n- the training process\n\nFor example, the number of conditions containing a specific feature indicates\nhow much a decision tree is looking at this specific feature, which might\nindicate variable importance. After all, the learning algorithm would not have\nused a feature in multiple conditions if it did not matter. However, the same\nfeature appearing in multiple conditions might also indicate that a model is\ntrying but failing to generalize the pattern of a feature. For example, this\ncan happen when a feature is just an example identifier with no information\nto generalize.\n\nOn the other hand, a high value for a high permutation variable importance\nindicates that removing a feature hurts the model, which is an indication of\nvariable importance. However, if the model is robust, removing any one feature\nmight not hurt the model.\n\nBecause different variable importances inform about different aspects of the\nmodels, looking at several variable importances at the same time is informative.\nFor example, if a feature is important according to all the variable\nimportances, this feature is likely important. As another example, if a feature\nhas a high \"number of nodes\" variable importance and a small \"permutation\"\nvariable importance, then this feature might be hard to generalize and can\nhurt the model quality. \nYDF Code\nIn YDF, you can see the variable importance of a model by calling `model.describe()` and looking at the \"variable importance\" tab. See the [Model understanding tutorial](https://ydf.readthedocs.io/en/latest/tutorial/model_understanding) for more details."]]