public class GrowingSOM extends AbstractNetworkModel implements SOMToolboxApp
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.Modifier and Type | Class and Description |
---|---|
private class |
GrowingSOM.IntermediateSOMDumper |
SOMToolboxApp.Type
Modifier and Type | Field and Description |
---|---|
static SOMToolboxApp.Type |
APPLICATION_TYPE |
static java.lang.String |
DESCRIPTION |
protected GrowingLayer |
layer |
static java.lang.String |
LONG_DESCRIPTION |
static com.martiansoftware.jsap.Parameter[] |
OPTIONS |
contentType, DEFAULT_LABEL_COUNT, labelled, sharedInputObjects, trainingStart
DEV_BY_STRING, HOMEPAGE, INFO, INFO_TEXT, LICENSE_TEXT, REQUIRED_MEMBERS, TYPE_GROUPED_COMPARATOR
Modifier | Constructor and Description |
---|---|
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,
java.lang.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(java.util.Properties properties) |
|
GrowingSOM(SOMInputReader ir)
Constructs an already trained
GrowingSOM with a SOMInputReader provided by argument
ir . |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object o) |
GrowingLayer |
getLayer()
Returns the actual map layer.
|
private void |
initLayer(boolean norm,
SOMProperties props,
InputData data) |
static void |
main(java.lang.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,
java.lang.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 . |
getDataContentType, getInputData, getSharedInputObjects, isLabelled, printTrainingTime, setLabelled, setSharedInputObjects
public static final com.martiansoftware.jsap.Parameter[] OPTIONS
public static final SOMToolboxApp.Type APPLICATION_TYPE
public static java.lang.String DESCRIPTION
public static java.lang.String LONG_DESCRIPTION
protected GrowingLayer layer
public GrowingSOM(java.util.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, java.lang.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()
public static void main(java.lang.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, java.lang.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(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException