データセット: ラベル
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
このセクションでは、ラベルについて説明します。
直接ラベルとプロキシラベル
次の 2 種類のラベルについて考えてみましょう。
- 直接ラベル: モデルが行う予測と同じラベルです。つまり、モデルが行う予測が、データセットの列として正確に存在します。たとえば、
bicycle owner
という列は、自転車を所有しているかどうかを予測するバイナリ分類モデルの直接ラベルになります。
- プロキシラベル: モデルが行う予測に似ているが、同じではないラベルです。たとえば、自転車雑誌「自転車奇譚」を定期購読しているユーザーは、自転車を所有している可能性が高いですが、必ずしもそうとは限りません。
通常、直接ラベルはプロキシラベルよりも優れています。データセットに直接ラベルが提供されている場合は、そのラベルを使用する必要があります。ただし、直接ラベルを使用できない場合もあります。
プロキシラベルは常に妥協であり、直接ラベルの不完全な近似値です。ただし、一部のプロキシラベルは、十分に近い近似値で、有用な場合があります。プロキシラベルを使用するモデルの有用性は、プロキシラベルと予測の間の接続に依存します。
すべてのラベルは、特徴ベクトルで浮動小数点数として表す必要があることを思い出してください(機械学習は基本的に、数学演算の巨大な集合体にすぎないからです)。直接ラベルが存在する場合でも、特徴ベクトルで浮動小数点数として簡単に表せないことがあります。この場合は、プロキシラベルを使用します。
演習: 理解度を確認する
お客様の会社は、次のことを希望しています。
自転車の所有者にクーポン(「古い自転車を下取りに出して、新しい自転車を 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 人以上の人間が情報を調べて、通常はラベルの値を提供します。たとえば、1 人以上の気象学者が空の写真を調べて雲の種類を特定できます。
また、一部のデータは自動生成されます。つまり、ソフトウェア(別の ML モデルの場合もあります)が値を決定します。たとえば、機械学習モデルは空の写真を調べて、雲の種類を自動的に識別できます。
このセクションでは、人間が生成したデータのメリットとデメリットについて説明します。
メリット
- 人間の評価者は、高度な ML モデルでも難しい場合がある幅広いタスクを実行できます。
- このプロセスにより、データセットのオーナーは明確で一貫した基準を策定する必要があります。
デメリット
- 通常、人間の評価担当者に支払う必要があるため、人間が生成したデータは費用が高くなる可能性があります。
- 人間である以上、ミスを完全に防ぐことはできません。そのため、複数の人間評価者が同じデータを評価しなければならない場合があります。
次の質問に答えて、ニーズを特定します。
- 評価担当者のスキルはどの程度必要ですか?(たとえば、評価者は特定の言語を理解している必要がありますか?会話や NLP アプリケーションの言語学者が必要ですか?)
- ラベル付きの例はいくつ必要ですか?いつまでに必要ですか?
- 予算はどれくらいか。
人間による評価は必ず二重チェックしてください。たとえば、自分で 1,000 個のサンプルにラベルを付け、他の評価者の結果と比較します。差異が明らかになった場合は、特に価値判断が関与している場合は、自分の評価が正しいと想定しないでください。人間のレーティングでエラーが発生した場合は、レーティング作業を支援する手順を追加して、もう一度お試しください。
プラスアイコンをクリックすると、人間が生成したデータの詳細が表示されます。
データを手動で確認することは、データをどのように取得したかに関係なく、良い演習です。Andrej Karpathy は ImageNet でこの作業を行い、その経験について書いています。
モデルは、自動生成されたラベルと人間が生成したラベルを組み合わせてトレーニングできます。ただし、ほとんどのモデルでは、人間が生成したラベルの追加セット(古くなる可能性があります)は、複雑さとメンテナンスの増加に見合う価値がありません。ただし、人間が生成したラベルでは、自動ラベルでは得られない追加情報を提供できる場合があります。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-02-26 UTC。
[null,null,["最終更新日 2025-02-26 UTC。"],[[["\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)"]]