The output table contains the midrange-scaled values for the input data set. As explained in the descriptions of the arguments Multiplier and Intercept, the formula for computing the scaled value X' from the input value X is:
X' = intercept + multiplier * (X - location)/scale
The formulas for computing location and scale for the midrange method (from Scale Arguments) are:
- location = (maxX+minX)/2
- scale = (maxX-minX)/2
The values minX and maxX are the minimum and maximum values of X, respectively.
For example, consider row 1 of the price column in the input table and the following output table:
Item | Value |
---|---|
intercept | 0 (default) |
multiplier | 0 (default) |
Input value X | 42000 |
Minimum input price value minX | 42000 |
Maximum input price value maxX | 88500 |
location | (88500+42000)/2 = 65250 |
scale | (88500-42000)/2 = 23250 |
Scaled output value X' | 0 + 1 * (42000-65250)/23250 = -1 |
id | price | lotsize | bedrooms | bathrms | stories |
---|---|---|---|---|---|
1 | -1 | 0.554317548746518 | 1 | -1 | -0.333333333333333 |
3 | -0.67741935483871 | 1 | 1 | -1 | -1 |
4 | -0.204301075268817 | 1 | 1 | -1 | 0.333333333333333 |
5 | -0.182795698924731 | 0.838440111420613 | -1 | -1 | -1 |
6 | 0.032258064516129 | -0.387186629526462 | 1 | -1 | -1 |
8 | 0.161290322580645 | -0.387186629526462 | 1 | -1 | -0.333333333333333 |
9 | 0.797849462365591 | -0.0306406685236769 | 1 | -1 | -1 |
10 | 1 | 0.35933147632312 | 1 | 1 | 1 |