データセット: データの変換
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
機械学習モデルは、浮動小数点値でのみトレーニングできます。ただし、多くのデータセットの特徴は、本来は浮動小数点値ではありません。そのため、機械学習の重要な部分の一つは、浮動小数点以外の特徴量を浮動小数点表現に変換することです。
たとえば、street names
が特徴であるとします。ほとんどの道路名は文字列です(「Broadway」や「Vilakazi」など)。モデルは「Broadway」でトレーニングできないため、「Broadway」を浮動小数点数に変換する必要があります。カテゴリデータ モジュールでは、この方法について説明しています。
また、ほとんどの浮動小数点特徴も変換する必要があります。この変換プロセスは正規化と呼ばれ、浮動小数点数を制限付きの範囲に変換してモデル トレーニングを改善します。数値データ モジュールで、その方法について説明します。
データが多すぎる場合はサンプリングする
組織によっては、豊富なデータが利用できる場合があります。
データセットにサンプルが多すぎる場合は、トレーニング用のサンプルのサブセットを選択する必要があります。可能であれば、モデルの予測に最も関連性の高いサブセットを選択します。
PII を含むフィルタの例
優れたデータセットでは、個人を特定できる情報(PII)を含む例は除外されます。このポリシーはプライバシーの保護に役立ちますが、モデルに影響する可能性があります。
これらのトピックについて詳しくは、コースの後半の「安全とプライバシー」モジュールをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-27 UTC。
[null,null,["最終更新日 2025-07-27 UTC。"],[[["\u003cp\u003eMachine learning models require all data, including features like street names, to be transformed into numerical (floating-point) representations for training.\u003c/p\u003e\n"],["\u003cp\u003eNormalization is crucial for optimizing model training by converting existing floating-point features to a specific range.\u003c/p\u003e\n"],["\u003cp\u003eWhen dealing with large datasets, selecting a relevant subset of data for training is essential for model performance.\u003c/p\u003e\n"],["\u003cp\u003eProtecting user privacy by excluding Personally Identifiable Information (PII) from datasets is a critical consideration.\u003c/p\u003e\n"]]],[],null,["# Datasets: Transforming data\n\nMachine learning models can only train on floating-point values.\nHowever, many dataset features are *not* naturally floating-point values.\nTherefore, one important part of machine learning is transforming\nnon-floating-point features to floating-point representations.\n\nFor example, suppose `street names` is a feature. Most street names\nare strings, such as \"Broadway\" or \"Vilakazi\".\nYour model can't train on \"Broadway\", so you must transform \"Broadway\"\nto a floating-point number. The [Categorical Data\nmodule](/machine-learning/crash-course/categorical-data)\nexplains how to do this.\n\nAdditionally, you should even transform most floating-point features.\nThis transformation process, called\n[**normalization**](/machine-learning/glossary#normalization), converts\nfloating-point numbers to a constrained range that improves model training.\nThe [Numerical Data\nmodule](/machine-learning/crash-course/numerical-data)\nexplains how to do this.\n\nSample data when you have too much of it\n----------------------------------------\n\nSome organizations are blessed with an abundance of data.\n\nWhen the dataset contains too many examples, you must select a *subset*\nof examples for training. When possible, select the subset that is most\nrelevant to your model's predictions.\n\nFilter examples containing PII\n------------------------------\n\nGood datasets omit examples containing Personally Identifiable Information\n(PII). This policy helps safeguard privacy but can influence the model.\n\nSee the Safety and Privacy module later in the course for more on these topics.\n| **Key terms:**\n|\n- [Normalization](/machine-learning/glossary#normalization) \n[Help Center](https://support.google.com/machinelearningeducation)"]]