Inheritance diagram for nipy.algorithms.clustering.von_mises_fisher_mixture:
Implementation of Von-Mises-Fisher Mixture models, i.e. the equaivalent of mixture of Gaussian on the sphere.
Author: Bertrand Thirion, 2010-2011
Bases: object
Model for Von Mises mixture distribution with fixed variance on a two-dimensional sphere
Methods
| density_per_component(x) | Compute the per-component density of the data |
| estimate(x[, maxiter, miniter, bias]) | Return average log density across samples |
| estimate_means(x, z) | Calculate and set means from x and z |
| estimate_weights(z) | Calculate and set weights from z |
| log_density_per_component(x) | Compute the per-component density of the data |
| log_weighted_density(x) | Return log weighted density |
| mixture_density(x) | Return mixture density |
| responsibilities(x) | Return responsibilities |
| show(x) | Visualization utility |
| weighted_density(x) | Return weighted density |
Initialize Von Mises mixture
| Parameters: | k: int, :
precision: float, :
means: array of shape(self.k, 3), optional :
weights: array of shape(self.k), optional :
null_class: bool, optional :
|
|---|
Compute the per-component density of the data
| Parameters: | x: array fo shape(n,3) :
|
|---|---|
| Returns: | like: array of shape(n, self.k), with non-neagtive values :
|
Return average log density across samples
| Parameters: | x: array of shape (n,3) :
maxiter : int, optional
miniter : int, optional
bias : array of shape(n), optional
|
|---|---|
| Returns: | ll : float
|
Calculate and set means from x and z
| Parameters: | x: array fo shape(n,3) :
z: array of shape(self.k) : |
|---|
Calculate and set weights from z
| Parameters: | z: array of shape(self.k) : |
|---|
Compute the per-component density of the data
| Parameters: | x: array fo shape(n,3) :
|
|---|---|
| Returns: | like: array of shape(n, self.k), with non-neagtive values :
|
Return log weighted density
| Parameters: | x: array fo shape(n,3) :
|
|---|---|
| Returns: | log_like: array of shape(n, self.k) : |
Return mixture density
| Parameters: | x: array fo shape(n,3) :
|
|---|---|
| Returns: | like: array of shape(n) : |
Return responsibilities
| Parameters: | x: array fo shape(n,3) :
|
|---|---|
| Returns: | resp: array of shape(n, self.k) : |
Visualization utility
| Parameters: | x: array fo shape(n,3) :
|
|---|
Return weighted density
| Parameters: | x: array shape(n,3) :
|
|---|---|
| Returns: | like: array :
|
Return the best von_mises mixture after severla initialization
| Parameters: | k: int, number of classes : precision: float, priori precision parameter : null class: bool, optional, :
x: array fo shape(n,3) :
ninit: int, optional, :
bias: array of shape(n), optional :
maxiter: int, optional, :
|
|---|
Return the best von_mises mixture after severla initialization
| Parameters: | krange: list of ints, :
precision: : null class: : x: array fo shape(n,3) :
ninit: int, optional, :
maxiter: int, optional, : bias: array of shape(n), :
verbose: Bool, optional : |
|---|
Return the best von_mises mixture after severla initialization
| Parameters: | krange: list of ints, :
precision: float, :
x: array fo shape(n, 3) :
null class: bool, whether a null class should be included or not : cv_index: set of indices for cross validation : ninit: int, optional, :
maxiter: int, optional, : bias: array of shape (n), prior : |
|---|
Return the points and area of a npoints**2 points sampled on a sphere
| Returns: | s : array of shape(npoints ** 2, 3) area: array of shape(npoints) : |
|---|