P.tarcorskew()

Description:

The external library function (See External Library Guide) corrects skewness of a table sequence/record sequence numeric variable.

Syntax:

P.tarcorskew(tn)

During the modelling process, correct skewness of numeric target variable tn, handle outliers, and return the result sequence of outcomes and the sequence of correction and handling records, represented by Rec

P.tarcorskew@r(tn, Rec)

Restore scoring result tn according to Rec, the sequence of correction and handling records after model scoring

Parameter:

P

A table sequence/record sequence

tn

A string/number, which is the alias of the target variable (or the column number starting from 1) in a table sequence or record sequence

Rec

The sequence of correction and handling records

Option:

@c

Modify the original data to the corrected values after execution

Return value:

Sequence

Example:

 

A

 

1

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

Import the modeling data.

2

=A1.(SalePrice).skew()

Calculate the skewness of the numeric targe variable.

3

=A1.tarcorskew@c("SalePrice")

A3(1) The result of skewness correction;

A3(2) Rec, the sequence of skewness correction records.

4

=A1.(SalePrice).skew()

The corrected skewness.

5

=A1.tarcorskew@r("SalePrice",A3(2))

Restore the data with corrected skewness to their original values.