Spark MLlibの概要 (Spark 1.2)
Spark1.0になるにともないデータのスパース表現に対応したよう.
インプリは,Breeze (scalaの場合)に依存している.
Classification and regression
linear models
でL1, L2 正則化項の両方に対応している.
基本はSGDで解いているよう.
SVMs
誤差関数がヒンジロス
logistic regression
誤差関数がロジスティックロス
linear regression
誤差関数が二乗誤差
naive Bayes
ナイーブな過程をおいた手法
decision trees
いわすもがな
ensembles of trees (Random Forests and Gradient-Boosted Trees)
しらん
Collaborative filtering
alternating least squares (ALS)
User-factorとItem-factorを交互に最適化するやつ.
implicit feedbackにも対応している.
Clustering
k-means
いわずもがな.
クラスタ中心の初期値の初期値化手法であるk-mean++とその分散実装バージョンの
kmeans||が実装されている.
Dimensionality reduction
singular value decomposition (SVD)
principal component analysis (PCA)
主成分分析
Feature extraction and transformation
TF-IDF
言語処理でよくあるTerm FrequencyとInverse Document Frequencyを作れる.
Word2Vec
ワードのベクトル表現を作れる.
結構新しい手法.
StandardScaler
Feature毎にzero-mean, unit-varianceにしてくれる.
Normalizer
サンプルデータの-normが1になるようにしてくれる.
デフォルトは-nomrが1, Unit-Sphereにしてくれる.
Optimization (developer)
stochastic gradient descent
limited-memory BFGS (L-BFGS)
Newton-Methodのヘッシアンの計算をサボる最適化手法 (BFGS)のメモリ最適化版.
参考URLs
- https://spark.apache.org/docs/1.2.0/mllib-guide.html
- https://code.google.com/p/word2vec/
- http://www.google.co.jp/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCQQFjAA&url=http%3A%2F%2Flabs.yahoo.com%2Ffiles%2FHuKorenVolinsky-ICDM08.pdf&ei=ciydVJeqCcHsmAWT54CwCw&usg=AFQjCNGVe5pqBw1JV9uG2ANhmN8CzgesHQ&sig2=-cVfoW5EEXY5bzfZCcSwbA
- http://theory.stanford.edu/~sergei/papers/vldb12-kmpar.pdf
- https://spark.apache.org/docs/1.1.0/mllib-optimization.html#stochastic-gradient-descent-sgd