Description:
Generate a model file according to a model object.
Syntax:
ym_save_pcf(pd,pdfile)
Note:
The external library function generates a model file with the extension pcf according to model object pd. The file can be stored in an absolute path or a relative path; the default relative path is [sAppHome]/store/predict.
Parameter:
pd |
A model object |
pdfile |
A model file with the extension pcf |
Return value:
A Boolean value
Example:
|
A |
|
1 |
=ym_env() |
Start Python service |
2 |
=file("train.csv") |
|
3 |
=ym_model(A1,A2) |
Load the data file for model building |
4 |
=ym_target(A3, "Survived") |
Set Survived as the target variable |
5 |
=ym_build_model(A3) |
Perform model building and return a model object |
6 |
=ym_save_pcf(A5,"tra.pcf") |
Generate model file tra.pcf according to A5’s model object and store the file in [sAppHome]/store/predict |
7 |
>ym_close(A1) |
Release resources |