## org.apache.mahout.clustering
Interface Model<O>

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

All Known Subinterfaces:
  Cluster

All Known Implementing Classes:
  AbstractCluster, AsymmetricSampledNormalModel, Canopy, Cluster, DirichletCluster, DistanceMeasureCluster, GaussianCluster, L1Model, MeanShiftCanopy, NormalModel, SampledNormalModel, SoftCluster

    public interface Model<O>

extends org.apache.hadoop.io.Writable

A model is a probability distribution over observed data points and allows the probability of any data point to be computed. All Models have a persistent representation and extend WritablesampleFromPosterior(Model<VectorWritable>[])

Method Summary
`void` `computeParameters()` Compute a new set of posterior parameters based upon the Observations that have been observed since my creation
`int` `count()` Return the number of observations that have been observed by this model
`void` `observe(O x)` Observe the given observation, retaining information about it
`double` `pdf(O x)` Return the probability that the observation is described by this model
`Model<VectorWritable>` `sampleFromPosterior()`

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

Method Detail

### pdf

    double pdf(O x)

  Return the probability that the observation is described by this model

  Parameters:
    `x` - an Observation from the posterior
  Returns:
    the probability that x is in the receiver

### observe

    void observe(O x)

  Observe the given observation, retaining information about it

  Parameters:
    `x` - an Observation from the posterior

### computeParameters

    void computeParameters()

  Compute a new set of posterior parameters based upon the Observations that have been observed since my creation

### count

    int count()

  Return the number of observations that have been observed by this model

  Returns:
    an int

### sampleFromPosterior

    Model<VectorWritable> sampleFromPosterior()

  Returns:
    a sample of my posterior model

Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.