Description Usage Arguments Details Value Note Author(s) References See Also Examples
This function is a wrapper function for find_kmedoids_weights that returns both the kmedoids clustering and the result from find_kmedoids_weights.
1 2 3 4 5 |
data |
the data that needs to be clustered, provided as a dataframe or (numeric) matrix. It is assumed that rows correspond to instances and columns correspond to features. |
start_values |
a vector containing the initial values of the weights. Defaults to |
k |
the number of clusters, the K in K-medoids. |
n_iterate |
the maximum number of iterations used by the quasi-newton method |
bounds |
a vector of size 2 containing the lower and upper bound in position 1 and 2 respectively. The lower bound must not be lower than 0 and not higher than |
See find_kmedoids_weights
for more details.
This function returns a list of two named lists:
clustering |
the kmedoids clustering. See |
opt_result |
the results of the optimisation algorithm. See |
This package requires the cluster package.
Jeroen van den Hoven
Clustering with optimised weights for Gower's metric: Using hierarchical clustering and Quasi-Newton methods to maximise the cophenetic correlation coefficient, Jeroen van den Hoven.
1 2 3 4 5 6 | ## Basic example
data(mtcars)
find_kmedoids_weights(mtcars, k = 3)
## Using custom bounds
find_kmedoids_weights(mtcars, k = 3, bounds = c(0.05, 0.2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.