best_split_function_from_gain_function: Get a best_split_function from a gain_function

Description Usage Arguments Value

View source: R/best_split_functions.R

Description

Get a best_split_function from a gain_function

Usage

1
best_split_function_from_gain_function(gain_function, optimizer, control)

Arguments

gain_function

A function with argiument x, start, end, lambda, control that returns a closure with arguments split_point and possibly split_candidates that returns the gain after splitting the segment (start, end] at split_point given data x and tuning parameter lambda.

optimizer

Optimization method to be used to find an (approximate) of the maximum of the gain function. One of line_search for BS or similar, section_search for OBS or similar or two_step_search.

control

Control parameter as returned by hdcd_control

Value

A function with formal arguments x, start, end, split_candidates and lambda that uses the optimizer specified to search for a maximum of the gain_function on the split_candidates given a segment (start, end], data x and a tuning parameter lambda and returns a list with arguments gain, max_gain, best_split and possible permutation_test and pval.


mlondschien/hdcd documentation built on Jan. 5, 2021, 11:26 p.m.