gpPredict

Note: This function is not supported by Community Edition. You can get a trial of Shark from DolphinDB official website.

Syntax

gpPredict(engine, input, [programNum=1], [groupCol], [deviceId=0])

Arguments

engine is the engine object returned by createGPLearnEngine.

input is a table where all columns are of floating-point type indicating the data for prediction.

programNum (optional) is an integer specifying the number of programs used for prediction.

groupCol (optional) is a string indicating the grouping column. The default is empty. The grouping column will not participate in calculation.

deviceId (optional) is an INT scalar or vector specifying the device ID to be used. The default value is 0.

Details

Use a number of programNum formulas with better fitness obtained from last training for prediction. Calculation will be conducted by group if groupCol is specified.

It returns a table with a number of programNum columns, where each column corresponds to a formula trained by gpFit.

Examples

See Quick Start Guide for Shark GPLearn