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:
MathCli 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. |