Iteration class¶
-
class
tclust._iteration.Iteration(object)[source]¶ Helper class for TClust package.
-
obj¶ Value of the objective function of the current solution.
- Type
float
-
labels_¶ Cluster assignment for each observation. Shape=(nobs, ).
- Type
ndarray
-
csize¶ Number of observations that belong to each cluster. Shape=(1, k).
- Type
ndarray
-
cw¶ Weights of each cluster. Shape=(k, )
- Type
ndarray
-
sigma¶ Covariance matrices of each cluster. Shape=(ndim, ndim, k).
- Type
ndarray
-
center¶ Centers of each cluster (column-wise). Shape=(k, ndim).
- Type
ndarray
-
code¶ Return code (supplied by functions like findClusterLabels).
- Type
int
-
z_ij¶ Cluster assignment for each sample. Shape=(nobs, k).
- Type
ndarray
-
lambd¶ Diagonal values for tkmeans. Shape=(k, ).
- Type
ndarray
-
fill(nobs, ndim, k)[source]¶ - Parameters
nobs (int) – Number of observations in the sample.
ndim (int) – Number of dimensions.
k (int) – Number of clusters
-
update(obj=None, labels_=None, csize=None, cw=None, sigma=None, center=None, z_ij=None, lambd=None, code=None)[source]¶ Updates the values of the Iteration object.
- Parameters
obj – value of the objective function
labels – cluster assignment
csize – cluster sizes
cw – cluster weights
sigma – covariance matrices of each cluster
center – centers of each cluster (column-wise)
z_ij – cluster assignment
lambd – diagonal values for tkmeans
code – return code
- Returns
self
-