Data Cleaning with PHP

Data Standardization with Rubix

If standardization is more appropriate (for instance, if we’re using algorithms like SVMs that are sensitive to variance), we can apply the ZScaleStandardizer. The ZScaleStandardizer adjusts the features to have a mean of 0 and a standard deviation of 1, which is ideal for models like Support Vector Machines (SVM) and Principal Component Analysis (PCA).

[100, 500, 25],
[150, 300, 15],
[200, 400, 20],
[50, 200, 10]
Result: Memory: 0.227 Mb Time running: 0.008 sec.
After Standardization: 
---------------
Array
(
    [0] => Array
        (
            [0] => -0.44721359549996
            [1] => 1.3416407864999
            [2] => 1.3416407864999
        )

    [1] => Array
        (
            [0] => 0.44721359549996
            [1] => -0.44721359549996
            [2] => -0.44721359549996
        )

    [2] => Array
        (
            [0] => 1.3416407864999
            [1] => 0.44721359549996
            [2] => 0.44721359549996
        )

    [3] => Array
        (
            [0] => -1.3416407864999
            [1] => -1.3416407864999
            [2] => -1.3416407864999
        )

)