การลดมิติข้อมูล: การสกัดคุณลักษณะ

ฝึกตอบคำถามสัมภาษณ์ Machine Learning ด้วย Python

Lisa Stuart

Data Scientist

วิธีการเรียนรู้แบบไม่มีผู้สอน (Unsupervised learning)

  • Principal component analysis (PCA) --> บทเรียน 3.1
  • Singular value decomposition (SVD) --> บทเรียน 3.1
  • การจัดกลุ่ม (Clustering) --> บทเรียน 3.3
  • การสำรวจข้อมูล (Exploratory data mining)
ฝึกตอบคำถามสัมภาษณ์ Machine Learning ด้วย Python

การลดมิติ != การคัดเลือกคุณลักษณะ

กราฟ PCA

การคัดเลือกคุณลักษณะ (Feature selection)

1 https://slideplayer.com/slide/9699240/ 2 https://www.analyticsvidhya.com/blog/2016/03/practical-guide-principal-component-analysis-python/
ฝึกตอบคำถามสัมภาษณ์ Machine Learning ด้วย Python

คำสาปแห่งมิติข้อมูล (Curse of dimensionality)

กราฟความสัมพันธ์ระหว่างมิติข้อมูลกับประสิทธิภาพ

1 https://www.visiondummy.com/2014/04/curse-dimensionality-affect-classification/
ฝึกตอบคำถามสัมภาษณ์ Machine Learning ด้วย Python

การค้นหาแบบ 1 มิติ

พื้นที่การค้นหา 1 มิติ

ฝึกตอบคำถามสัมภาษณ์ Machine Learning ด้วย Python

การค้นหาแบบ 2 มิติ

พื้นที่การค้นหา 2 มิติ

ฝึกตอบคำถามสัมภาษณ์ Machine Learning ด้วย Python

การค้นหาแบบ 3 มิติ

พื้นที่การค้นหา 3 มิติ

ฝึกตอบคำถามสัมภาษณ์ Machine Learning ด้วย Python

วิธีการลดมิติข้อมูล

  • PCA
  • SVD
ฝึกตอบคำถามสัมภาษณ์ Machine Learning ด้วย Python

PCA

กราฟ PCA ของชุดข้อมูล Iris

  • PCA
    • ความสัมพันธ์ระหว่าง X กับ y
    • คำนวณจากแกนหลัก (principal axes)
    • แปล หมุน และปรับสเกล
    • ฉายข้อมูลลงสู่มิติที่ต่ำกว่า
1 https://scikit-learn.org/stable/modules/decomposition.html
ฝึกตอบคำถามสัมภาษณ์ Machine Learning ด้วย Python

SVD

กราฟ SVD ของชุดข้อมูล Iris

  • SVD
    • พีชคณิตเชิงเส้นและแคลคูลัสเวกเตอร์
    • แยกเมทริกซ์ข้อมูลออกเป็นสามเมทริกซ์
    • ได้ผลลัพธ์เป็นค่า "singular"
    • ความแปรปรวนในข้อมูลประมาณเท่ากับผลรวมกำลังสองของค่า singular
1 https://galaxydatatech.com/2018/07/15/singular-value-decomposition/
ฝึกตอบคำถามสัมภาษณ์ Machine Learning ด้วย Python

ฟังก์ชันสำหรับลดมิติข้อมูล

ฟังก์ชัน/เมธอด ค่าที่ส่งคืน
sklearn.decomposition.PCA principal component analysis
sklearn.decomposition.TruncatedSVD singular value decomposition
PCA/SVD.fit_transform(X) ฟิตและแปลงข้อมูล
PCA/SVD.explained_variance_ratio_ ความแปรปรวนที่อธิบายโดย PC
ฝึกตอบคำถามสัมภาษณ์ Machine Learning ด้วย Python

มาฝึกกันเถอะ!

ฝึกตอบคำถามสัมภาษณ์ Machine Learning ด้วย Python

Preparing Video For Download...