View source: R/get_path_complete.R
get_path_complete | R Documentation |
This function computes recommended paths from a dendrogram structure using parallel processing. It utilizes the 'find_recommended_path' function to identify optimal paths based on a minimum cardinality constraint, distributing the computation across multiple worker nodes.
get_path_complete(minidend, window_data, min_card, worker_number)
minidend |
A dendrogram structure from which to derive paths. This should be created from a hierarchical clustering result. |
window_data |
A data frame or matrix containing the data associated with the nodes in the dendrogram. This data is used for path recommendations. |
min_card |
An integer specifying the minimum number of leaves (or nodes) that must be present in a path for it to be considered valid. |
worker_number |
An integer representing the number of worker nodes to be used for parallel processing. |
The function creates a cluster of worker nodes, loads necessary libraries, and exports required variables and functions to each worker. It then applies the 'find_recommended_path' function in parallel to the leaves of the provided dendrogram, gathering results into a single list. Finally, the cluster is stopped, and the results are returned.
A list where each element contains the recommended paths for the corresponding node in the dendrogram. Each path includes information about the nodes and their associated scores.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.