P.impute()

Description:

The external library function (See External Library Guide) imputes missing values to a table sequence/record sequence type variable during modeling.

Syntax:

P.impute(cn)

During modeling, impute missing values to variable cn and return a binary sequence containing the imputation result and imputation process records Rec

P.impute@r(cn, Rec)

During scoring, impute missing values to variable cn according to imputation process records Rec

Parameter:

P

A table sequence/record sequence

cn

A string/number, which is the name of column (or the column number starting from 1) – the to-be-pre-processed variable – in a table sequence or record sequence

Rec

A sequence of imputation process records

Option:

@c

Modify the original data to the imputation result after execution

@BNIED

Each option specifies a target type, and options are mutual-exclusive; automatically judge the type when no option is used; the order of priorities of the options is binary, numeric, integer and date

Return value:

A sequence

Example:

 

A

 

1

=T("D: //house_prices_train.csv")

 

2

=A1.impute@I(4)

Impute missing values to the variable of column 4:

A2(1) Imputation result;

A2(2) Imputation process records.

@I specifies the type of variable as integer.

3

=A1.impute@rc("LotFrontage",A2(2))

Impute missing data to A1’s variable according to A2’s imputation process records and return imputation result.

@c enables changing the original data to the imputation result after execution.