Imported modules
|
|
from DistanceFromMean import DistanceFromMean
from MixtureOfDiagonalGaussians import MixtureOfDiagonalGaussians
from MixtureOfFullGaussians import MixtureOfFullGaussians
from MixtureOfGaussians import MixtureOfGaussians
import Numeric
import compClust.mlx.DA
from compClust.mlx.interfaces import IDataset, ILabeling
|
Functions
|
|
compute_model_covariances_weights
compute_model_means
compute_model_weights
constructMixtureOfDiagonalGaussiansFromLabeling
constructMixtureOfFullGaussiansFromLabeling
constructMixtureOfGaussiansFromLabeling
estimateParameters
|
|
compute_model_covariances_weights
|
compute_model_covariances_weights (
dataset,
labels,
means,
)
Estimates the the covariances of each class given a dataset, class labeling
and class means. The results are returned an a three dimensional Numeric
array.
|
|
compute_model_means
|
compute_model_means ( dataset, labels )
Given a dataset and a labeling compute the means for each cluster and
return the results as a two dimensional Numeric array with each row
corresponding to a particular class.
|
|
compute_model_weights
|
compute_model_weights ( dataset, labels )
Evaluates the weight of each class realtive to the whole. This is simply
this number of datapoints in each class divided by the total number of
datapoints.
|
|
constructMixtureOfDiagonalGaussiansFromLabeling
|
constructMixtureOfDiagonalGaussiansFromLabeling ( dataset, labels )
Return an estimated mixture of diagonal gaussians class instance from a
dataset and labeling.
|
|
constructMixtureOfFullGaussiansFromLabeling
|
constructMixtureOfFullGaussiansFromLabeling ( dataset, labels )
Return an estimated mixture of full gaussians class instance from a dataset
and labeling.
|
|
constructMixtureOfGaussiansFromLabeling
|
constructMixtureOfGaussiansFromLabeling ( dataset, labels )
Return an estimated mixture of gaussians class instance from a dataset and
labeling.
|
|
estimateParameters
|
estimateParameters ( dataset, labels )
Fully estimate the Mixture of Gaussians parameters for a dataset with a
given hard partitioning. The results are returned as a 4-tuple:
(k, means, covariances, weights). See the documentation for compute_model_means() and
compute_model_variances() for details of returned data.
Exceptions
|
|
ValueError, "dataset paramemter must be a subclass of IDataset"
ValueError, "labels paramemter must be a subclass of ILabeling"
|
|