ym_build_model()

Read(45) Label: model building, model file,

Description:

Perform model building operation.

Syntax:

ym_build_model(md, mdfile)

Note:

The function builds a model, returns a PD model object and generates a model file with the extension pcf. The model file path can be absolute or relative; it is [sAppHome]/store/predict if relative.

Parameters:

md

An MD model

mdfile

A model file with the extension pcf

Return value:

A PD model object

Example:

 

A

 

1

=ym_env()

Start Python service

2

=file("train.csv")

 

3

=ym_model(A1,A2)

Load necessary data for building the model

4

=ym_target(A3, "Survived")

Set Survived as the target variable

5

=ym_build_model(A3,"tra.pcf")

Perform model building operation and generate a model file tra.pcf saved in [sAppHome]/store/predict

6

>ym_close(A1)

Close Python service