SMG.Latest.Entry: SMG.Latest.Entry

Description Usage Format Methods

Description

The OnlineSuperLearner uses various SummaryMeasureGenerator instances to generate new variables that can be used to represent the relevant history of a variable. The SMG.Latest.Entry class allows a user to include the variables of the current measurement (the contemporaneous variables). This is a very basic SMG.

Usage

1

Format

An object of class R6ClassGenerator of length 24.

Methods

initialize(colnames.to.use)

Initializes a new SMG.Latest.Entry object.

@param colnames.to.use vector a vector containg the names of the variables to include in the blocks generated by this SMG.

set_minimal_observations(minimal_observations)

A setter for the minimal number of observations needed by this SMG. This is usually 1 (the current one).

@param minimal_observations integer the minimal number of observations needed.

update(data.current)

For online learning we need to be able to create new data blocks on the fly (as not all data is available beforehand. This function updates a set of variables to contain the current variables as well.

@param data.current data.table the current data / the last data used for training, from which a new summary measure needs to be generated.

@return data.table a new block for the next training iteration.

process(data.current)

Adds the contemporaneous columns for all provided data. It goes through the data and selects the variables specified on initialization.

@param data.current data.table the currently available data.

@return data.table with the new summary measure columns.

exposedVariables

Active method. Returns a list of variables returned by this SMG.

@return vector a vector of strings conaining all specified (used) contemporaneous colnames.

minimalObservations

Active method. The minimal number of measurements needed for this SMG to be able to generate a new block. This is usualy just 1.

@return integer the minimal number of measuements needed.


frbl/OnlineSuperLearner documentation built on Feb. 9, 2020, 9:28 p.m.