mahout lucene практическое руководство кластеризации документов?

Генерируют, сделайте Вы имеете в виду, автоматически генерируют? Если это не то, что Вы имеете в виду:

Visual Studio 2008 имеет самую легкую реализацию для этого:

public PropertyType PropertyName { get; set; }

В фоновом режиме это создает подразумеваемую переменную экземпляра, к которой Ваше свойство сохранено и получено.

Однако, если Вы хотите вставить больше логики в своих Свойствах, у Вас должна будет быть переменная экземпляра для нее:

private PropertyType _property;

public PropertyType PropertyName
{
    get
    {
        //logic here 
        return _property;
    }
    set
    {
        //logic here
        _property = value;
    }
 }

Предыдущие версии Visual Studio всегда использовали этот рукописный метод также.

12
задан mjv 27 February 2010 в 03:06
поделиться

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

Обновление: получить каталог результатов из HDFS в локальную файловую систему. Затем используйте утилиту ClusterDumper, чтобы получить кластер и список документов в этом кластере.

3
ответ дан 2 December 2019 в 23:43
поделиться
Другие вопросы по тегам:

Похожие вопросы: