# gpFit {#gpFit}

**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}

`gpFit(engine, [programNum=1], [programCorr=false])`

## Arguments {#Arguments .section}

**engine** is the engine object returned by `createGPLearnEngine`.

**programNum** \(optional\) is an integer specifying the number of programs returned.

**programCorr** \(optional\) is a Boolean value indicating whether to return the correlation between programs. The default value is false.

## Details {#Details .section}

Get the trained programs. It returns a table with the following columns:

-   program: STRING type, the generated programs.

-   fitness: DOUBLE type, the fitness.

-   programCorr \(if *programCorr*=true\): a DOUBLE array vector, the correlation between programs.


## Examples {#section_vmc_xtk_2bc .section}

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

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

