public class TfIdfTransform.TfIdfGlobalTransform extends Object implements GlobalTransform
Constructor and Description |
---|
TfIdfTransform.TfIdfGlobalTransform(File inputMatrixFile,
MatrixIO.Format format)
|
TfIdfTransform.TfIdfGlobalTransform(Matrix matrix)
Creates an instance of
TfIdfGlobalTransform from a Matrix . |
Modifier and Type | Method and Description |
---|---|
double |
transform(int row,
int column,
double value)
Computes the Term Frequency-Inverse Document Frequency for a given
value where
value is the observed frequency of term row in document column . |
public TfIdfTransform.TfIdfGlobalTransform(Matrix matrix)
TfIdfGlobalTransform
from a Matrix
.public TfIdfTransform.TfIdfGlobalTransform(File inputMatrixFile, MatrixIO.Format format)
public double transform(int row, int column, double value)
value
is the observed frequency of term row
in document column
.transform
in interface GlobalTransform
row
- The index speicifying the term being observedcolumn
- The index specifying the document being observedvalue
- The number of occurances of the term in the document.Copyright © 2012. All Rights Reserved.