مجموعات البيانات: التصنيفات
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يركز هذا القسم على التصنيفات.
التصنيفات المباشرة في مقابل التصنيفات التقريبية
هناك نوعان مختلفان من التصنيفات:
- التصنيفات المباشرة، وهي تصنيفات مطابقة للتنبؤ الذي يحاول نموذجك
إجراؤه. وهذا يعني أنّ التوقّع الذي يحاول النموذج تقديمه هو
معروض تمامًا كعمود في مجموعة البيانات.
على سبيل المثال، سيكون العمود الذي يحمل الاسم
bicycle owner
تصنيفًا مباشرًا ل
نموذج التصنيف الثنائي الذي يتوقّع ما إذا كان الشخص يملك
دراجة أم لا.
- التصنيفات الوكيلة، وهي تصنيفات مشابهة، ولكن
ليست متطابقة، للتصنيف الذي يحاول النموذج إجراؤه
على سبيل المثال، من المرجّح أن يكون لدى الشخص الذي يشترك في مجلة Bicycle Bizarre
دراجة، ولكن ليس بالتأكيد.
تكون التصنيفات المباشرة بشكل عام أفضل من التصنيفات الوكيلة. إذا كانت مجموعة بياناتك
توفّر تصنيفًا مباشرًا محتملًا، من الأفضل استخدامه.
في أغلب الأحيان، لا تتوفّر التصنيفات المباشرة.
إنّ التصنيفات الوكيلة هي دائمًا حلّ وسط، أي تقريب غير كامل
للتصنيف المباشر. ومع ذلك، فإنّ بعض التصنيفات الوكيلة هي تقديرات قريبة بما يكفي
لتكون مفيدة. لا تكون النماذج التي تستخدِم تصنيفات العناصر الوكيلة مفيدة إلا بقدر
العلاقة بين تصنيف العنصر الوكيل والتوقّع.
تذكَّر أنّه يجب تمثيل كل تصنيف كعدد بنقطة عائمة
في مصفوفة السمات
(لأنّ تعلُّم الآلة هو في الأساس مجرد مزيج ضخم من العمليات mathematica
). في بعض الأحيان، يكون هناك تصنيف مباشر ولكن لا يمكن تمثيله بسهولة كعدد بثمانية أرقام في متجه السمات. في هذه الحالة، استخدِم تصنيفًا وكيلاً.
تمرين: التحقّق من فهمك
تريد شركتك إجراء ما يلي:
إرسال قسائم بالبريد (مثل "استبدال درّاجتك القديمة للحصول على
خصم% 15 على درّاجة جديدة") إلى مالكي الدراجات
لذلك، يجب أن ينفّذ النموذج ما يلي:
توقّع الأشخاص الذين يملكون دراجة
لا تحتوي مجموعة البيانات على عمود باسم bike owner
.
ومع ذلك، تحتوي مجموعة البيانات على عمود يُسمى recently bought a bicycle
.
هل recently bought a bicycle
هو تصنيف وكيل جيد
أم تصنيف وكيل سيئ لهذا النموذج؟
تصنيف وكيل جيد
العمود recently bought a bicycle
هو
تصنيف بديل جيد نسبيًا. بعد كلّ شيء، معظم الأشخاص
الذين يشترون درّاجات الآن يملكون درّاجات. ومع ذلك، فإنّ recently bought a
bicycle
غير مثالية، مثل جميع
تصنيفات الخوادم الوكيلة، حتى التصنيفات الجيدة جدًا. بعد كل شيء، لا يكون الشخص الذي يشتري
سلعة هو الشخص الذي يستخدمها (أو يملكها) دائمًا.
على سبيل المثال، يشتري الأشخاص أحيانًا درّاجات كهدية.
تصنيف وكيل مستخدم ضعيف
مثل جميع التصنيفات التمثيلية، فإنّ التصنيف recently bought a bicycle
غير كامل (يتم شراء بعض الدراجات كهدية وإهداؤها
إلى أشخاص آخرين). ومع ذلك، يبقى recently bought a bicycle
مؤشرًا جيدًا نسبيًا على أنّ أحد الأشخاص يملك
درّاجة.
البيانات التي ينشئها المستخدمون
تكون بعض البيانات من إنشاء أشخاص، أي أنّ شخصًا واحدًا أو أكثر يفحص بعض
المعلومات ويقدّم قيمة، عادةً للعلامة. على سبيل المثال، يمكن لعالم أرصاد جوية واحد أو أكثر فحص صور السماء وتحديد
أنواع السحب.
بدلاً من ذلك، يتم إنشاء بعض البيانات تلقائيًا. وهذا يعني أنّ البرنامج هو الذي يحدّد القيمة (ربما نموذج تعلُّم آلي آخر). على سبيل المثال، يمكن لنموذج
تعلُّم الآلة فحص صور السماء وتحديد
أنواع الغيوم تلقائيًا.
يتناول هذا القسم مزايا وعيوب البيانات التي ينشئها المستخدمون.
المزايا
- يمكن للمقيّمين البشريين تنفيذ مجموعة كبيرة من المهام التي قد يصعب على نماذج تعلُّم الآلة المتقدّمة تنفيذها.
- تفرض هذه العملية على مالك مجموعة البيانات وضع معايير واضحة ومتسقة.
السلبيات
- وعادةً ما تدفع رسومًا للمقيّمين، لذا قد تكون البيانات التي ينشئها الأشخاص باهظة الثمن.
- من الطبيعي أن يخطئ الإنسان. لذلك، قد يحتاج العديد من المقيّمين إلى تقييم
البيانات نفسها.
فكِّر في هذه الأسئلة لتحديد احتياجاتك:
- ما هو مستوى المهارة المطلوب من المقيّمين؟ (على سبيل المثال، هل يجب أن يعرف المقيّمون
لغة معيّنة؟ هل تحتاج إلى لغويين لتطبيقات الحوار أو معالجة اللغة الطبيعية؟
- كم عدد الأمثلة التي تم تصنيفها تحتاجها؟ متى تحتاج إلى هذه العناصر؟
- ما هي ميزانيتك؟
تحقّق دائمًا من مراجعي الأداء البشريين. على سبيل المثال، يمكنك تصنيف 1,000 مثال
بنفسك، والاطّلاع على مدى تطابق نتائجك مع نتائج المقيّمين الآخرين.
إذا ظهرت اختلافات، لا تفترض أنّ تقييماتك هي التقييمات الصحيحة،
خاصةً إذا كان هناك حكم قيمة. إذا أخطأ المراجعون، ننصحك بإضافة تعليمات لمساعدتهم وإعادة المحاولة.
انقر على رمز الإضافة لمعرفة المزيد من المعلومات عن البيانات التي ينشئها المستخدمون.
إنّ الاطّلاع على بياناتك يدويًا هو إجراء جيد بغض النظر عن كيفية
حصولك على بياناتك. نفَّذ أندريه كارباثي ذلك على
ImageNet
وكتب عن التجربة.
يمكن تدريب النماذج على مزيج من التصنيفات المبرمَجة وتلك التي ينشئها المستخدمون. ومع ذلك،
بالنسبة إلى معظم النماذج، فإنّ مجموعة إضافية من التصنيفات التي ينشئها المستخدمون (والتي يمكن أن تصبح قديمة)
لا تستحق عمومًا التعقيد الإضافي والصيانة.
ومع ذلك، يمكن أن تقدّم التصنيفات التي ينشئها المستخدمون أحيانًا معلومات إضافية
لا تتوفّر في التصنيفات المبرمَجة.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-02-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-02-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThis document explains the differences between direct and proxy labels for machine learning models, highlighting that direct labels are preferred but often unavailable.\u003c/p\u003e\n"],["\u003cp\u003eIt emphasizes the importance of carefully evaluating proxy labels to ensure they are a suitable approximation of the target prediction.\u003c/p\u003e\n"],["\u003cp\u003eHuman-generated data, while offering flexibility and nuanced understanding, can be expensive and prone to errors, requiring careful quality control.\u003c/p\u003e\n"],["\u003cp\u003eMachine learning models can utilize a combination of automated and human-generated labels, but the added complexity of maintaining human-generated labels often outweighs the benefits.\u003c/p\u003e\n"],["\u003cp\u003eRegardless of the label source, manual data inspection and comparison with human ratings are crucial for identifying potential issues and ensuring data quality.\u003c/p\u003e\n"]]],[],null,["# Datasets: Labels\n\nThis section focuses on [**labels**](/machine-learning/glossary#label).\n\nDirect versus proxy labels\n--------------------------\n\nConsider two different kinds of labels:\n\n- **Direct labels** , which are labels identical to the prediction your model is trying to make. That is, the prediction your model is trying to make is exactly present as a column in your dataset. For example, a column named `bicycle owner` would be a direct label for a binary classification model that predicts whether or not a person owns a bicycle.\n- **Proxy labels**, which are labels that are similar---but not identical---to the prediction your model is trying to make. For example, a person subscribing to Bicycle Bizarre magazine probably---but not definitely---owns a bicycle.\n\nDirect labels are generally better than proxy labels. If your dataset\nprovides a possible direct label, you should probably use it.\nOftentimes though, direct labels aren't available.\n\nProxy labels are always a compromise---an imperfect approximation of\na direct label. However, some proxy labels are close enough approximations\nto be useful. Models that use proxy labels are only as useful as the\nconnection between the proxy label and the prediction.\n\nRecall that every label must be represented as a floating-point number\nin the [**feature vector**](/machine-learning/glossary#feature-vector)\n(because machine learning is fundamentally just a huge amalgam of mathematical\noperations). Sometimes, a direct label exists but can't be easily represented as\na floating-point number in the feature vector. In this case, use a proxy label.\n\n### Exercise: Check your understanding\n\nYour company wants to do the following:\n\u003e Mail coupons (\"Trade in your old bicycle for\n\u003e 15% off a new bicycle\") to bicycle owners.\n\nSo, your model must do the following:\n\u003e Predict which people own a bicycle.\n\nUnfortunately, the dataset doesn't contain a column named `bike owner`.\nHowever, the dataset does contain a column named `recently bought a bicycle`. \nWould `recently bought a bicycle` be a good proxy label or a poor proxy label for this model? \nGood proxy label \nThe column `recently bought a bicycle` is a relatively good proxy label. After all, most of the people who buy bicycles now own bicycles. Nevertheless, like all proxy labels, even very good ones, `recently bought a\nbicycle` is imperfect. After all, the person buying an item isn't always the person using (or owning) that item. For example, people sometimes buy bicycles as a gift. \nPoor proxy label \nLike all proxy labels, `recently bought a bicycle` is imperfect (some bicycles are bought as gifts and given to others). However, `recently bought a bicycle` is still a relatively good indicator that someone owns a bicycle.\n\nHuman-generated data\n--------------------\n\nSome data is **human-generated**; that is, one or more humans examine some\ninformation and provide a value, usually for the label. For example,\none or more meteorologists could examine pictures of the sky and identify\ncloud types.\n\nAlternatively, some data is **automatically-generated**. That is, software\n(possibly, another machine learning model) determines the value. For example, a\nmachine learning model could examine sky pictures and automatically identify\ncloud types.\n\nThis section explores the advantages and disadvantages of human-generated data.\n\nAdvantages\n\n- Human raters can perform a wide range of tasks that even sophisticated machine learning models may find difficult.\n- The process forces the owner of the dataset to develop clear and consistent criteria.\n\nDisadvantages\n\n- You typically pay human raters, so human-generated data can be expensive.\n- To err is human. Therefore, multiple human raters might have to evaluate the same data.\n\nThink through these questions to determine your needs:\n\n- How skilled must your raters be? (For example, must the raters know a specific language? Do you need linguists for dialogue or NLP applications?)\n- How many labeled examples do you need? How soon do you need them?\n- What's your budget?\n\n**Always double-check your human raters**. For example, label 1000 examples\nyourself, and see how your results match other raters' results.\nIf discrepancies surface, don't assume your ratings are the correct ones,\nespecially if a value judgment is involved. If human raters have introduced\nerrors, consider adding instructions to help them and try again.\n\n#### Click the plus icon to learn more about human-generated data.\n\nLooking at your data by hand is a good exercise regardless of how you\nobtained your data. Andrej Karpathy did this on\n[ImageNet\nand wrote about the experience](http://karpathy.github.io/2014/09/02/what-i-learned-from-competing-against-a-convnet-on-imagenet).\n\nModels can train on a mix of automated and human-generated labels. However,\nfor most models, an extra set of human-generated labels (which can become stale)\nare generally not worth the extra complexity and maintenance.\nThat said, sometimes the human-generated labels can provide extra\ninformation not available in the automated labels.\n\n*** ** * ** ***\n\n| **Key terms:**\n|\n| - [Label](/machine-learning/glossary#label)\n- [Feature vector](/machine-learning/glossary#feature-vector) \n[Help Center](https://support.google.com/machinelearningeducation)"]]