at.tuwien.ifs.somtoolbox.output.labeling
Class LagusKeywordLabeler

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.output.labeling.AbstractLabeler
      extended by at.tuwien.ifs.somtoolbox.output.labeling.LagusKeywordLabeler
All Implemented Interfaces:
SOMToolboxApp, Labeler

public class LagusKeywordLabeler
extends AbstractLabeler
implements Labeler, SOMToolboxApp

Implements the Keyword selection labelling method, as described in Lagus, K. and Kaski, S.:Keyword selection method for characterizing text document maps. Proceedings of ICANN99, 9th International Conference on Artificial Neural Networks, volume 1, pages 371-376, IEEE, London.

Version:
$Id: LagusKeywordLabeler.java 4195 2011-03-10 14:55:02Z frank $
Author:
Rudolf Mayer, Hauke Schuldt, Alois Wollersberger

Nested Class Summary
 
Nested classes/interfaces inherited from interface at.tuwien.ifs.somtoolbox.apps.SOMToolboxApp
SOMToolboxApp.Type
 
Field Summary
static SOMToolboxApp.Type APPLICATION_TYPE
           
static java.lang.String DESCRIPTION
           
private  int innerRadius
           
static java.lang.String LONG_DESCRIPTION
           
static com.martiansoftware.jsap.Parameter[] OPTIONS
           
private  int outerRadius
           
(package private)  java.lang.String path
           
 
Fields inherited from interface at.tuwien.ifs.somtoolbox.apps.SOMToolboxApp
DEV_BY_STRING, HOMEPAGE, INFO, INFO_TEXT, LICENSE_TEXT, REQUIRED_MEMBERS, TYPE_GROUPED_COMPARATOR
 
Constructor Summary
LagusKeywordLabeler()
          Constructor in order to initialize without an additional parameter
LagusKeywordLabeler(java.lang.String path)
           
LagusKeywordLabeler(java.lang.String path, int innerRadius, int outerRadius)
          Constructor in order to initialize with path and radiuses
 
Method Summary
private  double calcUnitDistance(Unit start, Unit end)
          Calculates the distance between Units
private  UnitWordsMap generateUnitWordsMap(Unit[] units, GrowingSOM gsom, InputData data, TemplateVector tv)
           
 void label(GHSOM ghsom, InputData data, int num)
           
 void label(GrowingSOM gsom, InputData data, int num)
          Determines and adds labels to the units of a GrowingSOM (should be NetworkModel in the future).
 void label(GrowingSOM gsom, InputData data, int num, boolean ignoreLabelsWithZero)
           
static void main(java.lang.String[] args)
           
private  void selectAreaLabels(Unit[] units, UnitWordsMap uwm, int num)
          Only labels one unit per map area, dependent on A0 and A1 radius.
private  void selectLabelsG1(Unit[] units, UnitWordsMap uwm, int num)
          Selects a number of n labels for each unit based on the proposed goodness G1 by Lagus
private  void selectLabelsG2(Unit[] units, UnitWordsMap uwm)
          Selects only one best label for units based on the proposed goodness G2 by Lagus
 
Methods inherited from class at.tuwien.ifs.somtoolbox.output.labeling.AbstractLabeler
checkMaxDimensionality, instantiate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APPLICATION_TYPE

public static SOMToolboxApp.Type APPLICATION_TYPE

DESCRIPTION

public static java.lang.String DESCRIPTION

LONG_DESCRIPTION

public static java.lang.String LONG_DESCRIPTION

OPTIONS

public static final com.martiansoftware.jsap.Parameter[] OPTIONS

path

java.lang.String path

innerRadius

private int innerRadius

outerRadius

private int outerRadius
Constructor Detail

LagusKeywordLabeler

public LagusKeywordLabeler()
Constructor in order to initialize without an additional parameter


LagusKeywordLabeler

public LagusKeywordLabeler(java.lang.String path)

LagusKeywordLabeler

public LagusKeywordLabeler(java.lang.String path,
                           int innerRadius,
                           int outerRadius)
Constructor in order to initialize with path and radiuses

Method Detail

main

public static void main(java.lang.String[] args)

label

public void label(GHSOM ghsom,
                  InputData data,
                  int num)
Specified by:
label in interface Labeler

label

public void label(GrowingSOM gsom,
                  InputData data,
                  int num)
Description copied from interface: Labeler
Determines and adds labels to the units of a GrowingSOM (should be NetworkModel in the future).

Specified by:
label in interface Labeler
Parameters:
gsom - The GrowingSOM to be labeled.
data - The data that is already mapped onto the GrowingSOM
num - The number of labels per node.

label

public void label(GrowingSOM gsom,
                  InputData data,
                  int num,
                  boolean ignoreLabelsWithZero)
Specified by:
label in interface Labeler

generateUnitWordsMap

private UnitWordsMap generateUnitWordsMap(Unit[] units,
                                          GrowingSOM gsom,
                                          InputData data,
                                          TemplateVector tv)

selectAreaLabels

private void selectAreaLabels(Unit[] units,
                              UnitWordsMap uwm,
                              int num)
Only labels one unit per map area, dependent on A0 and A1 radius. A0 aka inner radius, A1 aka outer radius.

Parameters:
units - the units on the map
uwm - the UnitWordsMap with the information about the frequencies of the word occurrences in the maps
num - the number of Labels

calcUnitDistance

private double calcUnitDistance(Unit start,
                                Unit end)
Calculates the distance between Units

Parameters:
start - start unit
end - end unit
Returns:
distance between units

selectLabelsG1

private void selectLabelsG1(Unit[] units,
                            UnitWordsMap uwm,
                            int num)
Selects a number of n labels for each unit based on the proposed goodness G1 by Lagus

Parameters:
units - the units on the map
uwm - the UnitWordsMap with the information about the frequencies of the word occurrences in the maps
num - the number of Labels

selectLabelsG2

private void selectLabelsG2(Unit[] units,
                            UnitWordsMap uwm)
Selects only one best label for units based on the proposed goodness G2 by Lagus

Parameters:
units - the units on the map
uwm - the UnitWordsMap with the information about the frequencies of the word occurrences in the maps