corskew()

Read(1331) Label: corskew,

Here are how to use corskew() functions.

A.corskew()

Description:

Correct skewness of a numeric sequence.

Syntax:

A.corskew()

During modeling, correct skewness of numeric variable A, handle outliers, and return the result sequence of correction and a sequence of correction and handling process records Rec

A.corskew@r(Rec)

During scoring, correct skewness of numeric variable A according to correction process records Rec

Note:

External library function (See External Library Guide).

No null values are allowed in the to-be-corrected data.

Parameter:

A

A numeric sequence

Rec

A sequence of correction and handling process records

Option:

@c

Modify the original data to the corrected result after execution

Return value:

Sequence

Example:

 

A

 

1

[1,2,3,4,5,6,7,8,9,100]

 

2

=A1.skew()

The original skewness of A1.

3

=A1.corskew()

A3(1) Skewness correction result.

A3(2) Correction process records Rec.

4

=A1.corskew@rc(A3(2))

Correct skewness of A1’s sequence according to A3’s correction process records Rec, and change the original data to the correction result.

5

=A1.skew()

Corrected skewness of A1.

P.corskew()

Description:

Correct skewness of a numeric variable.

Syntax:

P.corskew(cn)

Rec During modeling, correct skewness and handle outliers for numeric variable cn in table sequence P, and return the result sequence of correction and a sequence of correction and handling process records Rec

P.corskew@r(cn, Rec)

During scoring, correct skewness of numeric variable cn according to correction process records Rec

Note:

External library function (See External Library Guide).

No null values are allowed in the to-be-corrected data.

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 correction and handling process records

Option:

@c

Modify the original data to the corrected result after execution

Return value:

Sequence

Example:

 

A

 

1

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

Import modeling data.

2

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

Import scoring data.

3

=A1.(LotArea).skew()

Find the skewness of numeric variable “LotArea” .

4

=A1.corskew@c("LotArea")

Correct skewness of numeric variable:

A4(1) Correction result;

A4(2) Correction process records.

5

=A1.(Ln_LotArea).skew()

The corrected skewness.

6

=A2.corskew@r(5,A4(2))

Correct skewness of corresponding variable in the scoring data according to A4’s correction process records Rec.