org.carrot2.clustering.kmeans
Class BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder

java.lang.Object
  extended by org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder
Enclosing class:
BisectingKMeansClusteringAlgorithmDescriptor

public static class BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder
extends Object

Attribute map builder for the BisectingKMeansClusteringAlgorithm component. You can use this builder as a type-safe alternative to populating the attribute map using attribute keys.


Field Summary
 Map<String,Object> map
          The attribute map populated by this builder.
 
Constructor Summary
protected BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder(Map<String,Object> map)
          Creates a builder backed by the provided map.
 
Method Summary
 BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder clusterCount(int value)
          The number of clusters to create.
 List<Cluster> clusters()
           
 BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder documents(List<Document> value)
           
 BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder labelCount(int value)
          Label count.
 LabelFormatterDescriptor.AttributeBuilder labelFormatter()
          Returns an attribute builder for the nested LabelFormatter component, backed by the same attribute map as the current builder.
 TermDocumentMatrixBuilderDescriptor.AttributeBuilder matrixBuilder()
          Returns an attribute builder for the nested TermDocumentMatrixBuilder component, backed by the same attribute map as the current builder.
 TermDocumentMatrixReducerDescriptor.AttributeBuilder matrixReducer()
          Returns an attribute builder for the nested TermDocumentMatrixReducer component, backed by the same attribute map as the current builder.
 BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder maxIterations(int value)
          The maximum number of k-means iterations to perform.
 BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder partitionCount(int value)
          Partition count.
 BasicPreprocessingPipelineDescriptor.AttributeBuilder preprocessingPipeline()
          Returns an attribute builder for the nested BasicPreprocessingPipeline component, backed by the same attribute map as the current builder.
 BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder useDimensionalityReduction(boolean value)
          Use dimensionality reduction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

public final Map<String,Object> map
The attribute map populated by this builder.

Constructor Detail

BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder

protected BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder(Map<String,Object> map)
Creates a builder backed by the provided map.

Method Detail

documents

public BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder documents(List<Document> value)
See Also:
BisectingKMeansClusteringAlgorithm.documents

clusters

public List<Cluster> clusters()
See Also:
BisectingKMeansClusteringAlgorithm.clusters

clusterCount

public BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder clusterCount(int value)
The number of clusters to create. The algorithm will create at most the specified number of clusters.

See Also:
BisectingKMeansClusteringAlgorithm.clusterCount

maxIterations

public BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder maxIterations(int value)
The maximum number of k-means iterations to perform.

See Also:
BisectingKMeansClusteringAlgorithm.maxIterations

useDimensionalityReduction

public BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder useDimensionalityReduction(boolean value)
Use dimensionality reduction. If true, k-means will be applied on the dimensionality-reduced term-document matrix with the number of dimensions being equal to the number of requested clusters. If false, the k-means will be performed directly on the original term-document matrix.

See Also:
BisectingKMeansClusteringAlgorithm.useDimensionalityReduction

partitionCount

public BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder partitionCount(int value)
Partition count. The number of partitions to create at each k-means clustering iteration.

See Also:
BisectingKMeansClusteringAlgorithm.partitionCount

labelCount

public BisectingKMeansClusteringAlgorithmDescriptor.AttributeBuilder labelCount(int value)
Label count. The minimum number of labels to return for each cluster.

See Also:
BisectingKMeansClusteringAlgorithm.labelCount

preprocessingPipeline

public BasicPreprocessingPipelineDescriptor.AttributeBuilder preprocessingPipeline()
Returns an attribute builder for the nested BasicPreprocessingPipeline component, backed by the same attribute map as the current builder.


matrixBuilder

public TermDocumentMatrixBuilderDescriptor.AttributeBuilder matrixBuilder()
Returns an attribute builder for the nested TermDocumentMatrixBuilder component, backed by the same attribute map as the current builder.


matrixReducer

public TermDocumentMatrixReducerDescriptor.AttributeBuilder matrixReducer()
Returns an attribute builder for the nested TermDocumentMatrixReducer component, backed by the same attribute map as the current builder.


labelFormatter

public LabelFormatterDescriptor.AttributeBuilder labelFormatter()
Returns an attribute builder for the nested LabelFormatter component, backed by the same attribute map as the current builder.



Copyright (c) Dawid Weiss, Stanislaw Osinski