tarcorskew()

Read(35) Label: tarcorskew,

Here are how to use tarcorskew () functions.

A.tarcorskew()

Description:

The external library corrects 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

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:

A 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()

Retrun 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 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

Parameters:

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

Options:

@c

Modify the original data to the corrected values after execution

Return value:

A 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