Description Usage Arguments Details Value Note Author(s) References See Also Examples
This function is a wrapper function for find_weights that returns both the hierarchical clustering and the result from find_weights.
1 2 3 4 |
The arguments are the same as those of find_weights
: see that for details.
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 |
n_iterate |
the maximum number of iterations used by the quasi-newton method |
clust_method |
a string containing the type of linkage function used by |
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 |
minimal_memory_mode |
logical that determines whether the algorithm calculates the differences for each instance and each variables beforehand or calculates them live each time. The first will be chosen when this variable is FALSE,
the second one will be chosen when this variable is TRUE. Note that this requires k vectors of size |
use_cluster |
value that is used only when minimal_memory_mode equals FALSE. If use_cluster is TRUE, it will try to create a FORK type cluster. It will calculate the required k vectors using a FORK cluster of size n-1, where n is the number of logical cores. This does not work on Windows! You can also supply a cluster as made by |
See find_weights
for more details.
This function returns a list of two named lists:
clustering |
the hierarchical clustering. See |
opt_result |
the results of the optimisation algorithm. See |
This package requires the cluster package. For the parallel part, you will need the standard package parallel (R 2.14.0 and later)
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(faithful)
opt_hierarchical(faithful)
## Using custom bounds and other linkage function
opt_hierarchical(faithful, bounds = c(0, 1), clust_method = "complete")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.