public class Normalize extends Object
Matrix
. Each
method provided will alter the values of a given matrix in place with the
values generated by the specified normalization technique.Modifier and Type | Method and Description |
---|---|
static void |
byColumn(Matrix m)
Normalize the values of each column in the
Matrix to be
normalized by the length of each column. |
static void |
byCorrelation(Matrix m,
boolean saveNegatives)
Normalize the values of the
Matrix by using the Pearson
correlation. |
static void |
byLength(Matrix m)
Normalize the values of each row in the
Matrix to be
normalized by the l2 norm of each row. |
static void |
byMagnitude(Matrix m)
Normalize the all the values values in the
Matrix to be
normalized by the l2 norm of the entire Matrix . |
static void |
byRow(Matrix m)
Normalize the values of each row in
Matrix to be normalized by
the length of each row. |
public static void byRow(Matrix m)
Matrix
to be normalized by
the length of each row.m
- The matrix to normalize.public static void byColumn(Matrix m)
Matrix
to be
normalized by the length of each column.m
- The matrix to normalize.public static void byLength(Matrix m)
Matrix
to be
normalized by the l2 norm of each row.m
- The matrix to normalize.public static void byMagnitude(Matrix m)
Matrix
to be
normalized by the l2 norm of the entire Matrix
.m
- The matrix to normalize.public static void byCorrelation(Matrix m, boolean saveNegatives)
Matrix
by using the Pearson
correlation. This will give values between -1 and 1. If saveNegatives
is is true
, negative correlations will be saved,
and otherwise they are reduced to zero.m
- The Matrix
to normalize.saveNegatives
- If true, save all values, even if they are negative.Copyright © 2012. All Rights Reserved.