## org.apache.mahout.clustering.iterator
Interface ClusteringPolicy

All Superinterfaces:
  org.apache.hadoop.io.Writable

All Known Implementing Classes:
  AbstractClusteringPolicy, CanopyClusteringPolicy, FuzzyKMeansClusteringPolicy, KMeansClusteringPolicy

    public interface ClusteringPolicy

extends org.apache.hadoop.io.Writable

A ClusteringPolicy captures the semantics of assignment of points to clusters

Method Summary
`Vector` `classify(Vector data, ClusterClassifier prior)` Classify the data vector given the classifier's models
`void` `close(ClusterClassifier posterior)` Close the policy using the classifier's models
`Vector` `select(Vector probabilities)` Return a vector of weights for each of the models given those probabilities
`void` `update(ClusterClassifier posterior)` Update the policy with the given classifier

Methods inherited from interface org.apache.hadoop.io.Writable
`readFields, write`

Method Detail

### classify

    Vector classify(Vector data,
                    ClusterClassifier prior)

  Classify the data vector given the classifier's models

  Parameters:
    `data` - a data Vector
    `prior` - a prior ClusterClassifier
  Returns:
    a Vector of probabilities that the data is described by each of the models

### select

    Vector select(Vector probabilities)

  Return a vector of weights for each of the models given those probabilities

  Parameters:
    `probabilities` - a Vector of pdfs
  Returns:
    a Vector of weights

### update

    void update(ClusterClassifier posterior)

  Update the policy with the given classifier

  Parameters:
    `posterior` - a ClusterClassifier

### close

    void close(ClusterClassifier posterior)

  Close the policy using the classifier's models

  Parameters:
    `posterior` - a posterior ClusterClassifier

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.