ym_model()

Read(60) Label: data for model building,

Description:

Load data for model building.

Syntax:

ym_model(env,data)

Note:

The function loads the data for building a model. The data must be structurized, and can come from a relational database, a text file, a table sequence, a cursor, a CSV file or a MCF file. When the data is stored in a file, its path can be absolute or relative; a relative path is relative to [sAppHome]/store/data_md directory.

Parameters:

env

An env object

data

Data for model building

Return value:

An MD object

Example:

 

A

 

1

=ym_env()

Start Python service

2

=file("train.csv")

The data file for building a model

3

=ym_model(A1,A2)

Load the model building data file

4

=file("D:/train.csv").import@tc()

 

5

=ym_model(A1,A4)

Parameter data is a table sequence

6

=file("D:/train.txt").cursor@tc()

 

7

=ym_model(A1,A6)

Parameter data is a cursor

8

>ym_close(A1)

Close Python service