質問

マハウトクラスタリングアルゴリズムを適用するために使用できるルシーンインデックスからマハウトベクトルを作成できることを読んでいます。http://cwiki.apache.org/confluence/display/MAHOUT/Creating+Vectors+from+Text

Lucene インデックス内のドキュメントに K 平均法クラスタリング アルゴリズムを適用したいと考えていますが、このアルゴリズム (または階層クラスタリング) をどのように適用してこれらのドキュメントで意味のあるクラスタを抽出できるかがわかりません。

このページでは http://cwiki.apache.org/confluence/display/MAHOUT/k-Meansアルゴリズムは 2 つの入力ディレクトリを受け入れると述べています。1 つはデータ ポイント用、もう 1 つは初期クラスター用です。私のデータポイントは文書ですか?これらが私のドキュメント(またはそのベクトル)であることを「宣言」するにはどうすればよいですか?単にそれらを取り出してクラスタリングを行うだけですか?

私の貧弱な文法について事前にごめんなさい

ありがとう

役に立ちましたか?

解決

あなたはベクトルを持っている場合は、

、あなたはKMeansDriverを実行することができます。ここでは同じのヘルプです。

Usage:
 [--input <input> --clusters <clusters> --output <output> --distance <distance>
--convergence <convergence> --max <max> --numReduce <numReduce> --k <k>
--vectorClass <vectorClass> --overwrite --help]
Options
  --input (-i) input                The Path for input Vectors. Must be a
                                    SequenceFile of Writable, Vector
  --clusters (-c) clusters          The input centroids, as Vectors.  Must be a
                                    SequenceFile of Writable, Cluster/Canopy.
                                    If k is also specified, then a random set
                                    of vectors will be selected and written out
                                    to this path first
  --output (-o) output              The Path to put the output in
  --distance (-m) distance          The Distance Measure to use.  Default is
                                    SquaredEuclidean
  --convergence (-d) convergence    The threshold below which the clusters are
                                    considered to be converged.  Default is 0.5
  --max (-x) max                    The maximum number of iterations to
                                    perform.  Default is 20
  --numReduce (-r) numReduce        The number of reduce tasks
  --k (-k) k                        The k in k-Means.  If specified, then a
                                    random selection of k Vectors will be
                                    chosen as the Centroid and written to the
                                    clusters output path.
  --vectorClass (-v) vectorClass    The Vector implementation class name.
                                    Default is SparseVector.class
  --overwrite (-w)                  If set, overwrite the output directory
  --help (-h)                       Print out help

更新:ローカルFSにHDFSからの結果ディレクトリを取得します。そして、そのクラスタ内のドキュメントのクラスタとリストを取得するためにClusterDumperユーティリティを使用します。

他のヒント

かなり良いハウツーがここにあります:Apache Mahout と Apache lucene の統合

@ maiky あなたは出力を読み、このページでclusterdumpユーティリティの使用方法についての詳細を読むことができます - > HTTPS ://cwiki.apache.org/confluence/display/MAHOUT/Cluster+Dumperする

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top