Spark ML
Spark ML
数据预处理
数据降维
1 | val data = Array( |
二值化
1 | val data = Array((0, 0.1), (1, 0.8), (2, 0.2)) |
机器学习算法
聚类
K-Means
1 | val dataset = spark.read.format("libsvm").load("data/mllib/sample_kmeans_data.txt") |
基于K-Means的出租车数据聚类
pom.xml
1 | <properties> |
聚类代码
1 | package org.example |
聚类中心可视化
1 |
|
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.