public class SOMProperties
extends java.util.Properties
Modifier and Type | Class and Description |
---|---|
class |
SOMProperties.DatumToUnitMapping |
static class |
SOMProperties.SelectedClassMode |
Modifier and Type | Field and Description |
---|---|
private double[] |
adaptiveCoordinatesThreshold |
private boolean |
batchSom |
private java.lang.String |
classInfoFileName |
private java.util.Vector<SOMProperties.DatumToUnitMapping> |
datumToUnitMappings |
static double |
defaultLearnRate |
private int |
dumpEvery
TODO: move to
FileProperties |
private Layer.GridLayout |
gridLayout |
private Layer.GridTopology |
gridTopology |
private java.lang.String |
growthQualityMeasureName |
private double |
learnrate |
private static java.lang.String |
METRIC_PACKAGE |
private java.lang.String |
metricName |
private int |
minimumFeatureDensity |
private int |
neighbourWidth |
private int |
numCycles |
private int |
numIterations |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_ADAPTIVE_COORDINATES_THRESHOLD |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_BATCH_SOM |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_BATCH_SOM_NEIGHBOUR_WIDTH |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_CLASS_SELECTION_MODE |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_CLASSES_SELECTED |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_CLASSINFOFILE |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_DATUM_TO_UNIT_MAPPING |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_DUMP_EVERY |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_GRID_LAYOUT |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_GRID_TOPOLOGY |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_GROWTH_QUALITY |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_LEARNRATE |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_METRIC_NAME |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_MINIMUM_FEATURE_DENSITY |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_NUM_CYCLES |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_NUM_ITERATIONS |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_SIGMA |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_TAU |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_USE_PCA |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_XSIZE |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_YSIZE |
static com.martiansoftware.jsap.FlaggedOption |
OPTION_ZSIZE |
static java.lang.String |
propertiesFileNameSuffix |
static java.lang.String |
QUALITY_PACKAGE |
private long |
randomSeed |
private java.util.ArrayList<java.lang.String> |
selectedClasses |
private SOMProperties.SelectedClassMode |
selectedClassMode |
private static long |
serialVersionUID |
private double |
sigma |
static com.martiansoftware.jsap.FlaggedOption[] |
SOM_BATCH_OPTIONS |
static com.martiansoftware.jsap.FlaggedOption[] |
SOM_GRID_OPTIONS |
static com.martiansoftware.jsap.FlaggedOption[] |
SOM_OTHERS |
static com.martiansoftware.jsap.FlaggedOption[] |
SOM_TRAINING_OPTIONS |
private double |
tau |
private boolean |
usePCA |
static java.lang.String |
WORKING_DIRECTORY |
private int |
xSize |
private int |
ySize |
private int |
zSize |
Constructor and Description |
---|
SOMProperties(int xSize,
int ySize,
int numIterations,
double lernrate) |
SOMProperties(int xSize,
int ySize,
int zSize,
long seed,
int trainingCycles,
int trainingIterations,
double lernrate,
double sigma,
double tau,
java.lang.String metric,
boolean usePCA) |
SOMProperties(int xSize,
int ySize,
int zSize,
long seed,
int trainingCycles,
int trainingIterations,
int dumpEvery,
double lernrate,
double sigma,
double tau,
java.lang.String metric,
boolean usePCA) |
SOMProperties(int xSize,
int ySize,
long seed,
int numCycles,
int numIterations,
double learnrate,
double sigma,
double tau,
java.lang.String metricName,
boolean usePCA) |
SOMProperties(java.util.Properties properties) |
SOMProperties(java.lang.String fname)
Loads and encapsulated properties for the SOM training process.
|
Modifier and Type | Method and Description |
---|---|
double[] |
adaptiveCoordinatesTreshold() |
boolean |
batchSom()
Returns the batch_som status.
|
java.util.Vector<SOMProperties.DatumToUnitMapping> |
datumToUnitMappings() |
java.lang.String |
getClassInfoFileName() |
int |
getDumpEvery()
Default = -1 --> do not dump.
|
Layer.GridLayout |
getGridLayout() |
Layer.GridTopology |
getGridTopology() |
int |
getMinimumFeatureDensity() |
private java.lang.String |
getPropertyAndLog(java.lang.String key,
java.lang.String defaultValue) |
java.util.ArrayList<java.lang.String> |
getSelectedClasses()
Returns an ArrayList of Strings containing the class names which should be excluded from training.
|
SOMProperties.SelectedClassMode |
getSelectedClassMode() |
java.lang.String |
growthQualityMeasureName()
Returns the name of the used quality measure.
|
double |
learnrate()
Returns the learnrate.
|
java.lang.String |
metricName()
Returns the name of the used metric.
|
int |
neighbourWidth()
Returns the neighbour_width.
|
int |
numCycles()
Returns the number of training cycles.
|
int |
numIterations()
Returns the number of training iterations.
|
private void |
parse() |
boolean |
pca() |
long |
randomSeed()
Returns the random seed.
FIXME: this is a duplicate to FileProperties.randomSeed() |
double |
sigma()
Returns sigma determining the neighbourhood radius.
|
double |
tau()
Returns tau determining the desired data representation granularity.
|
int |
trainedIterations(int numVectors)
Return the number of iterations really trained, either using
numIterations or numCycles ,
whichever value is set. |
private void |
validatePropertyValues() |
void |
writeToFile(java.lang.String dataName,
java.lang.String outputDir,
boolean normalised)
Writes the properties to a file.
|
int |
xSize()
Returns the number of units in horizontal direction.
|
int |
ySize()
Returns the number of units in vertical direction.
|
int |
zSize()
Returns the number of units in z-direction.
|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values
public static final com.martiansoftware.jsap.FlaggedOption OPTION_XSIZE
public static final com.martiansoftware.jsap.FlaggedOption OPTION_YSIZE
public static final com.martiansoftware.jsap.FlaggedOption OPTION_ZSIZE
public static final com.martiansoftware.jsap.FlaggedOption OPTION_LEARNRATE
public static final com.martiansoftware.jsap.FlaggedOption OPTION_SIGMA
public static final com.martiansoftware.jsap.FlaggedOption OPTION_NUM_ITERATIONS
public static final com.martiansoftware.jsap.FlaggedOption OPTION_NUM_CYCLES
public static final com.martiansoftware.jsap.FlaggedOption OPTION_METRIC_NAME
public static final com.martiansoftware.jsap.FlaggedOption OPTION_TAU
public static final com.martiansoftware.jsap.FlaggedOption OPTION_GROWTH_QUALITY
public static final com.martiansoftware.jsap.FlaggedOption[] SOM_TRAINING_OPTIONS
public static final com.martiansoftware.jsap.FlaggedOption OPTION_BATCH_SOM
public static final com.martiansoftware.jsap.FlaggedOption OPTION_BATCH_SOM_NEIGHBOUR_WIDTH
public static final com.martiansoftware.jsap.FlaggedOption[] SOM_BATCH_OPTIONS
public static final com.martiansoftware.jsap.FlaggedOption OPTION_USE_PCA
public static final com.martiansoftware.jsap.FlaggedOption OPTION_DUMP_EVERY
public static final com.martiansoftware.jsap.FlaggedOption OPTION_ADAPTIVE_COORDINATES_THRESHOLD
public static final com.martiansoftware.jsap.FlaggedOption OPTION_MINIMUM_FEATURE_DENSITY
public static final com.martiansoftware.jsap.FlaggedOption OPTION_DATUM_TO_UNIT_MAPPING
public static final com.martiansoftware.jsap.FlaggedOption OPTION_CLASS_SELECTION_MODE
public static final com.martiansoftware.jsap.FlaggedOption OPTION_CLASSES_SELECTED
public static final com.martiansoftware.jsap.FlaggedOption OPTION_CLASSINFOFILE
public static final com.martiansoftware.jsap.FlaggedOption[] SOM_OTHERS
public static final com.martiansoftware.jsap.FlaggedOption OPTION_GRID_LAYOUT
public static final com.martiansoftware.jsap.FlaggedOption OPTION_GRID_TOPOLOGY
public static final com.martiansoftware.jsap.FlaggedOption[] SOM_GRID_OPTIONS
public static final java.lang.String WORKING_DIRECTORY
private static final java.lang.String METRIC_PACKAGE
public static final java.lang.String QUALITY_PACKAGE
public static final double defaultLearnRate
public static final java.lang.String propertiesFileNameSuffix
private static final long serialVersionUID
private boolean batchSom
private int neighbourWidth
private double learnrate
private java.lang.String metricName
private java.lang.String growthQualityMeasureName
private int numCycles
private int numIterations
private int dumpEvery
FileProperties
private long randomSeed
private double sigma
private double tau
private int xSize
private int ySize
private int zSize
private Layer.GridTopology gridTopology
private Layer.GridLayout gridLayout
private boolean usePCA
private java.util.Vector<SOMProperties.DatumToUnitMapping> datumToUnitMappings
private java.util.ArrayList<java.lang.String> selectedClasses
private java.lang.String classInfoFileName
private SOMProperties.SelectedClassMode selectedClassMode
private int minimumFeatureDensity
private double[] adaptiveCoordinatesThreshold
public SOMProperties(int xSize, int ySize, int zSize, long seed, int trainingCycles, int trainingIterations, int dumpEvery, double lernrate, double sigma, double tau, java.lang.String metric, boolean usePCA) throws PropertiesException
PropertiesException
public SOMProperties(int xSize, int ySize, int zSize, long seed, int trainingCycles, int trainingIterations, double lernrate, double sigma, double tau, java.lang.String metric, boolean usePCA) throws PropertiesException
PropertiesException
public SOMProperties(int xSize, int ySize, int numIterations, double lernrate) throws PropertiesException
PropertiesException
public SOMProperties(int xSize, int ySize, long seed, int numCycles, int numIterations, double learnrate, double sigma, double tau, java.lang.String metricName, boolean usePCA) throws PropertiesException
PropertiesException
public SOMProperties(java.lang.String fname) throws PropertiesException
fname
- name of the properties file.PropertiesException
- thrown if properties file could not be opened or the values of the properties are
illegal.public SOMProperties(java.util.Properties properties) throws PropertiesException
PropertiesException
public int getDumpEvery()
private void parse() throws PropertiesException
PropertiesException
private java.lang.String getPropertyAndLog(java.lang.String key, java.lang.String defaultValue)
private void validatePropertyValues() throws PropertiesException
PropertiesException
public java.util.ArrayList<java.lang.String> getSelectedClasses()
public SOMProperties.SelectedClassMode getSelectedClassMode()
public java.lang.String getClassInfoFileName()
public boolean batchSom()
public int neighbourWidth()
public double learnrate()
public java.lang.String metricName()
public java.lang.String growthQualityMeasureName()
public int numCycles()
public int numIterations()
public int trainedIterations(int numVectors)
numIterations
or numCycles
,
whichever value is set.public long randomSeed()
FileProperties.randomSeed()
public double sigma()
public double tau()
public int xSize()
public int ySize()
public int zSize()
public int getMinimumFeatureDensity()
public boolean pca()
public Layer.GridTopology getGridTopology()
public Layer.GridLayout getGridLayout()
public java.util.Vector<SOMProperties.DatumToUnitMapping> datumToUnitMappings()
public void writeToFile(java.lang.String dataName, java.lang.String outputDir, boolean normalised) throws java.io.IOException
java.io.IOException
public double[] adaptiveCoordinatesTreshold()