Data Cleaning with PHP
Data Normalization with Rubix
RubixML has a MinMaxNormalizer that scales values to a range (usually between 0 and 1). This is especially useful for features like
income
and spending_score
that vary widely.
Dataset
[100, 500, 25],
[150, 300, 15],
[200, 400, 20],
[50, 200, 10]
Result:
Memory: 0.196 Mb
Time running: 0.005 sec.
Normalized Dataset:
---------------
Array
(
[0] => Array
(
[0] => 0.33333333333333
[1] => 1
[2] => 1
)
[1] => Array
(
[0] => 0.66666666666667
[1] => 0.33333333333333
[2] => 0.33333333333333
)
[2] => Array
(
[0] => 1
[1] => 0.66666666666667
[2] => 0.66666666666667
)
[3] => Array
(
[0] => 0
[1] => 0
[2] => 0
)
)