find_recommended_path: Find Recommended Path in a Tree Structure

View source: R/find_recommended_path.R

find_recommended_pathR Documentation

Description

This function identifies a recommended path in a tree structure based on user-defined minimum criteria. It filters nodes based on the number of leaves and calculates scores for potential recommendations.

Usage

find_recommended_path(minidend, window_data, min_card)

Arguments

minidend

A tree structure representing the hierarchy of nodes, from which leaves will be derived for analysis.

window_data

A matrix or data frame containing data associated with each node.

min_card

An integer specifying the minimum number of leaves that must be present in a node for it to be considered for recommendation.

Details

The function follows these steps: 1. Extracts the leaves and heights of each node in the tree. 2. Filters nodes based on the minimum number of leaves specified by min_card. 3. Identifies nodes that are parents of the filtered nodes, marking them for deletion. 4. For each seed node, calculates crossing points with other seed nodes. 5. Calculates adjusted scores for nodes in the seed path using the C++ function fMSR_adj. 6. Recommends nodes based on calculated scores and returns a summary of results.

Value

A list containing: - seed_path_info: A data frame summarizing the valid seed nodes, their number of leaves, heights, and recommended nodes. - seed_path_list: A list containing the names of elements for each node in the seed path. - score_path_list: A list of scores adjusted for each node in the seed path. - recommended_node_labels: A list of labels for the recommended nodes. - recommended_node_scores: A numeric vector containing scores for the recommended nodes.


funMoDisco documentation built on April 16, 2025, 1:10 a.m.