Class TfIdf
- java.lang.Object
-
- org.ujmp.core.calculation.AbstractCalculation
-
- org.ujmp.core.doublematrix.calculation.AbstractDoubleCalculation
-
- org.ujmp.core.doublematrix.calculation.general.misc.TfIdf
-
- All Implemented Interfaces:
java.io.Serializable
,Calculation
,DoubleCalculation
public class TfIdf extends AbstractDoubleCalculation
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ujmp.core.calculation.Calculation
Calculation.Ret
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
calculateIdf
private boolean
calculateTf
private Matrix
docTerm
matrix with [documents x terms]private boolean
normalize
private static long
serialVersionUID
private Matrix
sumPerDoc
private Matrix
sumPerTerm
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
calculate()
double
getDouble(long... coordinates)
long[]
getSize()
-
Methods inherited from class org.ujmp.core.doublematrix.calculation.AbstractDoubleCalculation
calcLink, calcNew, calcOrig, getValueType, setDouble
-
Methods inherited from class org.ujmp.core.calculation.AbstractCalculation
availableCoordinates, calc, containsCoordinates, getColumnCount, getDimension, getMetaData, getRowCount, getSource, getSources, setMetaData
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ujmp.core.calculation.Calculation
availableCoordinates, calc, containsCoordinates, getColumnCount, getDimension, getMetaData, getRowCount, getSource, getSources, setMetaData
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
docTerm
private Matrix docTerm
matrix with [documents x terms]
-
sumPerDoc
private Matrix sumPerDoc
-
sumPerTerm
private Matrix sumPerTerm
-
calculateTf
private boolean calculateTf
-
calculateIdf
private boolean calculateIdf
-
normalize
private boolean normalize
-
-
Constructor Detail
-
TfIdf
public TfIdf(Matrix matrix, boolean calculateTf, boolean calculateIdf, boolean normalize)
-
-
Method Detail
-
getDouble
public double getDouble(long... coordinates)
-
calculate
private void calculate()
-
getSize
public long[] getSize()
- Specified by:
getSize
in interfaceCalculation
- Overrides:
getSize
in classAbstractCalculation
-
-