public interface GlobalTransform
Transform
interface to fascilitate. By implementing this interface, a transformation
can be done on any file type and any matrix type with little extra work.
Implementations are expected to gather any required statistics through
their constructor. Afterwards, users of the transform may request each entry
in a matrix to be transformed based on it's row, column, and value. Each
entry is welcome to interpret the meaning of row, column, and value
differently. It is recomended that implementations be made a subclass of a
Transform
implementation. A good example is the TfIdfTransform
.
Note that most instances of a GlobalTransform
should be used
with only one matrix. Training on one matrix and applying the transformation
to another will often result in an unintelligible transformation.
Transformations that do not need to compute any statistics can be applied to
any matrix without any complications, such as a transformation that adds 5 to
every entry.Modifier and Type | Method and Description |
---|---|
double |
transform(int row,
int column,
double value)
Returns the transformed value for a given matrix entry.
|
double transform(int row, int column, double value)
row
- The row of the entry to be transformedcolumn
- The column of the entry to be transformedvalue
- The old value of the entry to be transformedrow
, column
Copyright © 2012. All Rights Reserved.