ym_json()

Read(531) Label: model information, json string,

Description:

Return model information as a JSON string.

Syntax:

ym_json(pd/ps)

Note:

The external library function (See External Library Guide) gets model information from model object pd or scoring result object ps and return it as a JSON string.

With parameter pd, the returned information includes model performance, model description and importance degree of variables.

With parameter ps, the function returns model performance information estimated by the scoring result object.

Read JSON-style Parameter Guide to learn more.

Parameter:

pd

The model object

ps

The scoring result object

Return value:

A JSON string

Example:

 

A

 

1

=ym_env()

Environment initiation

2

=ym_load_pcf("model.pcf")

Generate a model object based on the model building file

3

=ym_predict(A2,"train_t.csv")

Perform data scoring and return the scoring result object

4

=ym_json(A2)

Get model information from A2’s model object

5

=ym_json(A3)

Get the estimated model performance from A3’s scoring result object

6

>ym_close(A1)

Release resources