"TSNE" (機械学習メソッド)
- DimensionReduction,DimensionReduce,FeatureSpacePlot,FeatureSpacePlot3Dのためのメソッドである.
- t-分布の確率的近傍埋込みを使ってデータの次元を削減する.
詳細とサブオプション
- "TSNE"は t-分布確率近傍埋込みを意味する非線形ノンパラメトリック次元削減メソッドである.このメソッドは局所構造を保持したデータの低次元表現を学ぼうとする.
- "TSNE"は非線形多様体のデータ集合に使うことができ,特に高次元データ集合の可視化に適している.しかし,特徴が多数あるデータ集合や例の数が多いデータ集合について訓練するのには時間がかかる.
- 以下は,ベンチマークデータ集合のFisher's Irises,MNIST,FashionMNISTに適用された"TSNE"メソッドが学習した二次元埋込みを示している.
- "TSNE"は,もとの空間でデータ点(xi, xj)の類似度行列
が与えられると,低次元空間における類似度
が
と一致するような低次元埋込み
を求めようとする. - もとの空間における類似度は
で与えられる.ただし,
は近傍半径に相当する.低次元空間における類似度は
によって与えられる. - 低次元埋込み
は埋込みコスト
を最小にすることで計算される. - パラメータ
はPerplexityパラメータによって間接的に制御される.Perplexityが大きいとクラスタ量が小さくなり,Perplexityが小さいと多くのクラスタになる. - 次のサブオプションを与えることができる.
-
"Perplexity" Automatic 半径 ϵ "LinearPrereduction" False t-SNEメソッドの実行前に線形削減を行うかどうか
例題
すべて開く すべて閉じる例 (1)
fmnist = {[image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image]};
reduced = DimensionReduce[fmnist, 2, Method -> "TSNE"];ListPlot[MapThread[Labeled[#1, #2]&, {reduced, fmnist}], ...]オプション (2)
"Perplexity" (1)
フィッシャー(Fisher)の「アヤメ」のデータ集合をExampleDataからロードする:
iris = ExampleData[{"MachineLearning", "FisherIris"}, "Data"];RandomSample[iris, 5]diris = DimensionReduction[iris[[All, 1]], 2, Method -> "TSNE"]byspecies = GroupBy[iris, Last -> First];byspecies = diris /@ byspecies;ListPlot[Values[byspecies], PlotLegends -> Keys[byspecies]]diris = DimensionReduction[iris[[All, 1]], 2, Method -> {"TSNE", "Perplexity" -> 100}]byspecies = GroupBy[iris, Last -> First];
byspecies = diris /@ byspecies;
ListPlot[Values[byspecies], PlotLegends -> Keys[byspecies]]"LinearPrereduction" (1)
mnist = RandomSample[ResourceData["MNIST"][[All, 1]], 200];features = DimensionReduce[mnist, Method -> "TSNE"];"LinearPrereduction"サブオプションを使ってt-SNEメソッドを実行する前に線形削減を行うことで特徴を求める:
features2 = DimensionReduce[mnist, Method -> {"TSNE", "LinearPrereduction" -> True}];ListPlot[List /@ features, ...]
ListPlot[List /@ features2, ...]アプリケーション (1)
データの可視化 (1)
flowers = {[image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image]};
reduced = DimensionReduce[flowers, 2, Method -> {"TSNE", "LinearPrereduction" -> True}];ListPlot[MapThread[Labeled[#1, #2]&, {reduced, flowers}]]