|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.tuwien.ifs.somtoolbox.models.AbstractNetworkModel
at.tuwien.ifs.somtoolbox.models.GrowingSOM
public class GrowingSOM
This class implements the Growing Self-Organizing Map. It is basically a wrapper for the
GrowingLayer
and mainly handles command line execution and parameters. It
implements the NetworkModel
interface wich is currently not used, but may be
used in the future.
Nested Class Summary | |
---|---|
private class |
GrowingSOM.IntermediateSOMDumper
|
Nested classes/interfaces inherited from interface at.tuwien.ifs.somtoolbox.apps.SOMToolboxApp |
---|
SOMToolboxApp.Type |
Field Summary | |
---|---|
static SOMToolboxApp.Type |
APPLICATION_TYPE
|
static String |
DESCRIPTION
|
protected GrowingLayer |
layer
|
static String |
LONG_DESCRIPTION
|
static com.martiansoftware.jsap.Parameter[] |
OPTIONS
|
Fields inherited from class at.tuwien.ifs.somtoolbox.models.AbstractNetworkModel |
---|
DEFAULT_LABEL_COUNT, labelled, sharedInputObjects, trainingStart |
Fields inherited from interface at.tuwien.ifs.somtoolbox.apps.SOMToolboxApp |
---|
DEV_BY_STRING, HOMEPAGE, REQUIRED_MEMBERS, TYPE_GROUPED_COMPARATOR |
Constructor Summary | |
---|---|
protected |
GrowingSOM()
only used for subclassing |
|
GrowingSOM(boolean norm,
SOMProperties props,
InputData data)
Constructs a new GrowingSOM with dim -dimensional weight vectors. |
|
GrowingSOM(int xSize,
int ySize,
int numIterations,
InputData data)
Constructs and trains a new GrowingSOM . |
|
GrowingSOM(int xSize,
int ySize,
int zSize,
String metricName,
int numIterations,
boolean normalised,
boolean usePCAInit,
int randomSeed,
InputData data)
Constructs and trains a new GrowingSOM . |
|
GrowingSOM(int id,
Unit su,
int dim,
boolean norm,
SOMProperties props,
InputData data)
Constructs a new GrowingSOM with dim -dimensional weight vectors. |
protected |
GrowingSOM(int id,
Unit su,
SOMInputReader ir)
Private constructor used recursively in hierarchical network models consisting of multiple maps. |
protected |
GrowingSOM(int id,
Unit su,
SOMInputReader ir,
GrowingLayer layer)
|
|
GrowingSOM(Properties properties)
|
|
GrowingSOM(SOMInputReader ir)
Constructs an already trained GrowingSOM with a SOMInputReader provided by argument
ir . |
Method Summary | |
---|---|
Object |
clone()
|
boolean |
equals(Object o)
|
GrowingLayer |
getLayer()
Returns the actual map layer. |
private void |
initLayer(boolean norm,
SOMProperties props,
InputData data)
|
static void |
main(String[] args)
Method for stand-alone execution of map training. |
private void |
restoreLayer(int id,
SOMInputReader ir,
GrowingLayer layer)
|
QualityMeasure |
train(InputData data,
GHSOMProperties props,
double targetQualityValue,
String qualityMeasureName)
Trains the map with the input data and training parameters specified in the properties provided by argument props . |
void |
train(InputData data,
SOMProperties props)
Trains the map with the input data and training parameters specified in the properties provided by argument props . |
Methods inherited from class at.tuwien.ifs.somtoolbox.models.AbstractNetworkModel |
---|
getInputData, getSharedInputObjects, isLabelled, printTrainingTime, setLabelled, setSharedInputObjects |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final com.martiansoftware.jsap.Parameter[] OPTIONS
public static final SOMToolboxApp.Type APPLICATION_TYPE
public static String DESCRIPTION
public static String LONG_DESCRIPTION
protected GrowingLayer layer
Constructor Detail |
---|
public GrowingSOM(Properties properties) throws PropertiesException
PropertiesException
public GrowingSOM(boolean norm, SOMProperties props, InputData data)
GrowingSOM
with dim
-dimensional weight vectors. Argument
norm
determines whether the randomly initialised weight vectors should be normalised to unit length
or not.
norm
- specifies if the weight vectors are to be normalised to unit length.props
- the network properties.public GrowingSOM(int xSize, int ySize, int numIterations, InputData data) throws PropertiesException
GrowingSOM
. All the non-specified parameters will be automatically set
to "default" values.
PropertiesException
public GrowingSOM(int xSize, int ySize, int zSize, String metricName, int numIterations, boolean normalised, boolean usePCAInit, int randomSeed, InputData data) throws PropertiesException
GrowingSOM
.
PropertiesException
public GrowingSOM(int id, Unit su, int dim, boolean norm, SOMProperties props, InputData data)
GrowingSOM
with dim
-dimensional weight vectors. Argument
norm
determines whether the randlomy initialized weight vectors should be normalized to unit length
or not. In hierarchical network models consisting of multiple maps such as the GHSOM
, a unique identifier
is assigned by argument id
and the superordinate unit is provided by argument su
.
id
- a unique identifier used in hierarchies of maps (e.g. the GHSOM
).su
- the superordinate unit of the map.dim
- the dimensionality of the weight vectors.norm
- specifies if the weight vectors are to be normalized to unit length.props
- the network properties.protected GrowingSOM(int id, Unit su, SOMInputReader ir)
id
and the superordinate unit is provided by argument
su
.
id
- a unique identifier used in hierarchies of maps (e.g. the GHSOM
).su
- the superordinate unit of the map.ir
- an object implementing the SOMinputReader
interface to load an already trained model.protected GrowingSOM(int id, Unit su, SOMInputReader ir, GrowingLayer layer)
public GrowingSOM(SOMInputReader ir)
GrowingSOM
with a SOMInputReader
provided by argument
ir
.
ir
- an object implementing the SOMinputReader
interface to load an already trained model.protected GrowingSOM()
Method Detail |
---|
public static void main(String[] args)
args
- the execution arguments as stated above.private void initLayer(boolean norm, SOMProperties props, InputData data)
private void restoreLayer(int id, SOMInputReader ir, GrowingLayer layer)
public GrowingLayer getLayer()
public QualityMeasure train(InputData data, GHSOMProperties props, double targetQualityValue, String qualityMeasureName)
props
. If the value of property tau
is 1, a fix-sized layer is trained, otherwise the
layer grows until a certain quality criterion determined by tau
and the mean quantization error
specified by argument mqe0
of the data (which is automatically calculated) is reached. This method
is usually used for GHSOM training.
data
- input data to train the map with.props
- the training properties.targetQualityValue
- the desired granularity of data representation. Used for maps in GHSOMs.public void train(InputData data, SOMProperties props)
props
. If the value of property tau
is 1, a fix-sized layer is trained, otherwise the
layer grows until a certain quality criterion determined by tau
and the mean quantization error of
the data (which is automatically calculated) is reached.
data
- input data to train the map with.props
- the training propertiespublic boolean equals(Object o)
equals
in class Object
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |