Big Data Fundamentals with PySpark
Upendra Devisetty
Science Analyst, CyVerse
Machine learning is a scientific discipline that explores the construction and
study of algorithms that can learn from data
MLlib คือส่วนประกอบของ Apache Spark สำหรับ machine learning
เครื่องมือต่าง ๆ ที่ MLlib มีให้ใช้งาน:
ML Algorithms: collaborative filtering, classification และ clustering
Featurization: การดึง การแปลง การลดมิติ และการคัดเลือก feature
Pipelines: เครื่องมือสำหรับสร้าง ประเมิน และปรับแต่ง ML Pipelines
scikit-learn คือไลบรารี Python ยอดนิยมสำหรับ data mining และ machine learning
อัลกอริทึมของ scikit-learn ทำงานได้เฉพาะกับชุดข้อมูลขนาดเล็กบนเครื่องเดียว
อัลกอริทึมของ MLlib ใน Spark ออกแบบมาสำหรับการประมวลผลแบบขนานบน cluster
รองรับภาษาอย่าง Scala, Java และ R
มี API ระดับสูงสำหรับสร้าง machine learning pipeline
Classification (Binary และ Multiclass) และ Regression: Linear SVMs, logistic regression, decision trees, random forests, gradient-boosted trees, naive Bayes, linear least squares, Lasso, ridge regression, isotonic regression
Collaborative filtering: Alternating least squares (ALS)
Clustering: K-means, Gaussian mixture, Bisecting K-means และ Streaming K-Means
Collaborative filtering (recommender engines): สร้างคำแนะนำให้ผู้ใช้
Classification: ระบุว่าข้อมูลใหม่อยู่ในหมวดหมู่ใด
Clustering: จัดกลุ่มข้อมูลตามลักษณะที่คล้ายกัน
from pyspark.mllib.recommendation import ALS
from pyspark.mllib.classification import LogisticRegressionWithLBFGS
from pyspark.mllib.clustering import KMeans
Big Data Fundamentals with PySpark