tarcorskew()

Read(2433) Label: tarcorskew,

Here are how to use tarcorskew () functions.

A.tarcorskew()

Description:

Correct skewness of a sequence of numeric target variables.

Syntax:

A.tarcorskew()

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

A.tarcorskew@r(Rec)

Get the restored values of score values according to Rec, the sequence of correction and handling records after model scoring

Note:

The external library (See External Library Guide) corrects skewness of a sequence of numeric target variables.

Parameter:

A

A sequence of numeric target variables

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")

 

2

=A1.(SalePrice)

A sequence of numeric target variables.

3

=A2.skew()

The skewness of original data.

4

=A2.tarcorskew@c()

Return the result of skewness correction and skewness correction records and modify the original data.

5

=A2.skew()

The corrected skewness.

6

=A2.tarcorskew@r(A4(2))

Recover the corrected data to their original values according to skewness correction records, usually in order to restore the score values.

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.