Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## infomat.vectorspace.weighting
Class TFIDFWeighter

    java.lang.Object
      infomat.vectorspace.weighting.Weighter
          infomat.vectorspace.weighting.TFIDFWeighter

All Implemented Interfaces:
  HasProperties

    public class TFIDFWeighter

extends Weighter

A class for weighting of a IMatrix.

Field Summary

Fields inherited from class infomat.vectorspace.weighting.Weighter
`properties`

Constructor Summary
`TFIDFWeighter()`
`TFIDFWeighter(Properties properties)`

Method Summary
`Properties` | `getDefaultProperties()`
`Properties` | `getProperties()`
`java.lang.Object` | `getPropertyValue(java.lang.String name)`
`java.lang.String` | `getWeighterName()` Returns a String that identifies the Weighter.
`static java.util.HashMap<IObject,java.lang.Float>` | `globalWeightInGroupByGroup(IObjectGroup weightGroup, IObjectGroup correspondingGroup, IMatrix matrix, boolean row, Properties properties)` The central global weighter.
`static java.util.HashMap<IObject,java.util.HashMap<IObject,java.lang.Float>>` | `localWeightInGroupByGroup(IObjectGroup objectGroup, IObjectGroup representationGroup, IMatrix matrix, boolean row, Properties properties)` The central local weighter.
`static void` | `normalizeMatrix(IMatrix matrix, boolean row)` Normalizes the rows or columns of the matrix.
`void` | `setProperties(Properties properties)`
`void` | `setProperty(java.lang.String name, java.lang.Object value)`
`static java.util.HashMap<IObject,java.lang.Float>` | `totalLocalWeightInGroupByGroup(IObjectGroup objectGroup, IObjectGroup representationGroup, IMatrix matrix, boolean row, Properties properties)` Returns the sum of the local weight as calculated in #localWeightInGroupByGroup.
`void` | `weight(IMatrix matrix)` Weight the IMatrix (the whole matrix, which may be more than the current IObjectGroupings, the picture).

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

Constructor Detail

### TFIDFWeighter

    public TFIDFWeighter()

### TFIDFWeighter

    public TFIDFWeighter(Properties properties)

Method Detail

### getDefaultProperties

    public Properties getDefaultProperties()

### getPropertyValue

    public java.lang.Object getPropertyValue(java.lang.String name)

### setProperty

    public void setProperty(java.lang.String name,
                            java.lang.Object value)
                     throws PropertyNotFoundException

  Throws:
    `PropertyNotFoundException`

### getProperties

    public Properties getProperties()

### setProperties

    public void setProperties(Properties properties)

### getWeighterName

    public java.lang.String getWeighterName()

  Description copied from class: `Weighter`
  Returns a String that identifies the Weighter.

  Specified by:
    `getWeighterName` in class `Weighter`

### weight

    public void weight(IMatrix matrix)

  Weight the IMatrix (the whole matrix, which may be more than the current IObjectGroupings, the picture).

  Specified by:
    `weight` in class `Weighter`

### normalizeMatrix

    public static void normalizeMatrix(IMatrix matrix,
                                       boolean row)

  Normalizes the rows or columns of the matrix.

### totalLocalWeightInGroupByGroup

    public static java.util.HashMap<IObject,java.lang.Float> totalLocalWeightInGroupByGroup(IObjectGroup objectGroup,
                                                                                            IObjectGroup representationGroup,
                                                                                            IMatrix matrix,
                                                                                            boolean row,
                                                                                            Properties properties)

  Returns the sum of the local weight as calculated in #localWeightInGroupByGroup.

### localWeightInGroupByGroup

    public static java.util.HashMap<IObject,java.util.HashMap<IObject,java.lang.Float>> localWeightInGroupByGroup(IObjectGroup objectGroup,
                                                                                                                  IObjectGroup representationGroup,
                                                                                                                  IMatrix matrix,
                                                                                                                  boolean row,
                                                                                                                  Properties properties)

  The central local weighter. The elements of the first group are considered objects, and those of the second their representation. The objects in the second are weighted accoring to occurences for each object in the first. For text-word: the words are weighted locally for each text. OBS. Only works in row-col order yet!!!

  Parameters:
    `row` - Wether the first group is along the rows of the matrix.

### globalWeightInGroupByGroup

    public static java.util.HashMap<IObject,java.lang.Float> globalWeightInGroupByGroup(IObjectGroup weightGroup,
                                                                                        IObjectGroup correspondingGroup,
                                                                                        IMatrix matrix,
                                                                                        boolean row,
                                                                                        Properties properties)

  The central global weighter. Weights the elements of the first group by their occurences in the matrix corresponding to the second group.

  Parameters:
    `row` - Wether the first group is along the rows of the matrix.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD