# gpPredict {#gpPredict}

**Note:** This function is not supported by Community Edition. You can [get a trial](https://dolphindb.com/product#downloads-down) of Shark from DolphinDB official website.

## Syntax {#Syntax .section}

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

## Arguments {#Arguments .section}

**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 {#Details .section}

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 {#section_vmc_xtk_2bc .section}

See [Quick Start Guide for Shark GPLearn](../../Tutorials/gplearn_qsg.md)

**Parent topic:**[Functions](../../Functions/category.md)

