ชุดข้อมูล: การเปลี่ยนรูปแบบข้อมูล
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
โมเดลแมชชีนเลิร์นนิงจะฝึกได้เฉพาะกับค่าทศนิยม
อย่างไรก็ตาม ฟีเจอร์ชุดข้อมูลจำนวนมากไม่ใช่ค่าทศนิยมตามปกติ
ดังนั้น องค์ประกอบที่สําคัญอย่างหนึ่งของแมชชีนเลิร์นนิงคือการแปลงฟีเจอร์ที่ไม่ใช่ทศนิยมไปเป็นการแสดงผลทศนิยม
ตัวอย่างเช่น สมมติว่า 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)"]]