classifier_gain_function: Closure generating function to calculate gains for splits...

Description Usage Arguments Value

View source: R/gain_functions.R

Description

Closure generating function to calculate gains for splits using a classifier

Usage

1
classifier_gain_function(x, start, end, classifier, control)

Arguments

x

A matrix with observations in rows

start

The start of the investigated interval

end

The end of the investigated interval

classifier

A function with formal arguments x_train, y_train and control that returns class probabilities in a matrix of size nrow(x_train) x k, where k is the number of classes in y_train.

control

Control parameter as returned by hdcd_control

Value

A closure with parameters x, start and end, that when evaluated will itself return a closure with arguments split_point and split_candidates. Evaluated this function returns the gain when splitting the segment (start, end] of x at split_point.


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