recommend_node: Recommend Node from a Numeric Vector

View source: R/recommend_node.R

recommend_nodeR Documentation

Recommend Node from a Numeric Vector

Description

This function analyzes a numeric vector and recommends an index based on the characteristics of the vector. If the vector is strictly increasing, it suggests stopping before the maximum growth rate. If the vector is not strictly increasing, it recommends the index of the minimum value.

Usage

recommend_node(node)

Arguments

node

A numeric vector representing scores or metrics. Must contain at least two elements.

Details

Recommend Node Function

- If the input vector has fewer than two elements, the function defaults to returning an index of 1. - The function first checks if the input is a numeric vector. If not, an error is thrown. - The function calculates the differences between successive elements and identifies whether the vector is strictly increasing. - In the case of a strictly increasing vector, it returns the index of the maximum growth rate. - For non-increasing vectors, it returns the index of the minimum value.

Value

An integer index indicating the recommended node based on the analysis of the input vector.


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