ym2_result()

Read(102) Label: model, prediction result,

Description:

Present the prediction result.

Syntax:

ym2_result(preObj)

Display the prediction result

ym2_result@s(mcfObj, varname)

Return result of aggregation on a certain field of the mcf object

Note:

External library function (See YModel User Reference).

 

The function presents the prediction result and returns a table sequence.

Parameter:

preObj

Prediction result object / pcf object

mcfObj

mcf object

varname

Field name

Option:

@p

Return model performance information

@r

Return model display information

@i

Return the degree of importance

@s

Return information of aggregation on a field

@j

Return a JSON string; the option works with another option, such as @ij, but it does not work with @s option

Return value:

Table sequence

Example:

 

A

 

1

=ym2_env("F:/ymodel")

Initialize environment.

2

=ym2_mcfload("F:/tmp/train.mcf")

Return an mcf object.

3

=ym2_pcfload("F:/tmp/train.pcf")

Return a pcf object.

4

=ym2_predict(A3,"F:/tmp/train.csv")

Perform data prediction.

5

=ym2_result(A4)

Use the prediction result object to present the prediction result.

6

=ym2_result@p(A3)

Use a pcf object to present model performance.

7

=ym2_result@s(A2,"Age")

Return information of aggregation on Age field in the mcf object.

8

=ym2_result@ij(A4)

Return the prediction result’s degree of importance as a JSON string.

9

>ym2_close(A4)

Release resources.