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


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


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.


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.


See Quick Start Guide for Shark GPLearn