Min-max scaling transforms every feature column independently into the range from 0 through 1. For a value in row i and column j, compute
xij′=maxj−minjxij−minjThe numerator subtracts the minimum value of column j, and the denominator is that column's maximum minus its minimum. If a column is constant, the denominator is zero; map every value in that column to 0.0. Return a floating-point matrix with the same shape as data.
Input: data = [[1, 10], [2, 20], [3, 30]]
Output: [[0.0, 0.0], [0.5, 0.5], [1.0, 1.0]]
Explanation: Each column is scaled using its own minimum and maximum.
Input: data = [[0, 0], [10, 100], [20, 50]]
Output: [[0.0, 0.0], [0.5, 1.0], [1.0, 0.5]]
Collect the minimum and maximum of one column before scaling its entries.
Initialize an output matrix with the same row and column counts as data.
Accepts: array
Min-max scaling transforms every feature column independently into the range from 0 through 1. For a value in row i and column j, compute
xij′=maxj−minjxij−minjThe numerator subtracts the minimum value of column j, and the denominator is that column's maximum minus its minimum. If a column is constant, the denominator is zero; map every value in that column to 0.0. Return a floating-point matrix with the same shape as data.
Input: data = [[1, 10], [2, 20], [3, 30]]
Output: [[0.0, 0.0], [0.5, 0.5], [1.0, 1.0]]
Explanation: Each column is scaled using its own minimum and maximum.
Input: data = [[0, 0], [10, 100], [20, 50]]
Output: [[0.0, 0.0], [0.5, 1.0], [1.0, 0.5]]
Collect the minimum and maximum of one column before scaling its entries.
Initialize an output matrix with the same row and column counts as data.
Accepts: array