| cstep | R Documentation |
This function performs concentration steps by iteratively updating the neighborhoods of items based on Mahalanobis distances. The function computes the covariance matrix and updates the neighborhood list until convergence or a maximum number of iterations is reached.
cstep(init, maxcsteps, which_indices, lambda, weights, mT)
init |
A list of items where each item contains:
|
maxcsteps |
An integer specifying the maximum number of iterations for the optimization. |
which_indices |
An integer vector specifying which initial indices to use for each item. |
lambda |
A numeric value representing the weight for the covariance matrix in the optimization. |
weights |
A matrix of weights where each element |
mT |
A matrix used for regularization in the covariance matrix calculation. |
The function updates the neighborhoods of each item based on Mahalanobis distances, recalculates means and covariances, and checks for convergence. If the neighborhoods do not change between iterations, the optimization stops early.
A list containing:
numit An integer representing the number of iterations performed.
out The updated list of items with updated neighborhoods and additional information.
obj_value A numeric vector of objective values at each iteration, including the initial value.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.