## org.apache.mahout.vectorizer
Class TF

    java.lang.Object
      org.apache.mahout.vectorizer.TF

All Implemented Interfaces:
  Weight

    public class TF

extends Object
implements Weight

`Weight` based on term frequency only

Constructor Summary
`TF()`

Method Summary
`double` `calculate(int tf, int df, int length, int numDocs)` Experimental

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TF

    public TF()

Method Detail

### calculate

    public double calculate(int tf,
                            int df,
                            int length,
                            int numDocs)

  Description copied from interface: `Weight`
  Experimental

  Specified by:
    `calculate` in interface `Weight`
  Parameters:
    `tf` - term freq
    `df` - doc freq
    `length` - Length of the document
    `numDocs` - the total number of docs
  Returns:
    The weight

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.