นิยาม Data Cleaning
Data Cleaning คือการทำความสะอาดข้อมูลโดย: เติม Missing Values, Smoothing Noisy Data, วิเคราะห์และลบ Outliers, ลบ Inconsistencies บางครั้งข้อมูลหลายระดับต่างจากที่ต้องการ เช่น ต้องการช่วงอายุ 20-30, 30-40 แต่ข้อมูลมี Date of Birth → ต้องแปลงข้อมูลให้เหมาะสม
ประเภทของ Data Cleaning
1. Missing Values (ค่าขาดหาย)
เติมค่าที่เหมาะสม วิธีการ:
- Ignore Tuple ที่มีหลาย Attributes Missing
- Fill Manual
- Fill ด้วย Global Constant เดียวกัน
- Fill ด้วย Attribute Mean
- Fill ด้วย Most Probable Value
2. Noisy Data (ข้อมูลรบกวน)
Noise = Random Error หรือ Variance ในตัวแปรที่วัด วิธี Smoothing:
- Binning: Smooth ค่าที่เรียงแล้ว ดู Neighborhood แบ่งเป็น Buckets/Bins ใช้ Local Smoothing
- Regression: Fit ข้อมูลด้วย Function (Linear/Multiple Linear Regression)
- Clustering: จัดกลุ่มค่าใกล้เคียง ค่าที่อยู่นอก Cluster = Outliers
- Combined Computer & Human Inspection: ตรวจ Outliers ด้วยเครื่อง+คน Pattern อาจเป็น Descriptive หรือ Garbage
3. Inconsistent Data (ข้อมูลไม่สอดคล้อง)
Inconsistency เกิดจาก Transactions, Data Entry, หรือ Integration หลาย Databases ใช้ Correlation Analysis หา Redundancies Integration ที่ถูกต้องลด Redundancy ได้