de.jstacs.models.discrete.inhomogeneous.parameters
Class FSDAGMParameterSet
java.lang.Object
de.jstacs.parameters.ParameterSet
de.jstacs.parameters.InstanceParameterSet
de.jstacs.models.discrete.DGMParameterSet
de.jstacs.models.discrete.inhomogeneous.parameters.IDGMParameterSet
de.jstacs.models.discrete.inhomogeneous.parameters.FSDAGMParameterSet
- All Implemented Interfaces:
- RangeIterator, Storable, Cloneable
public class FSDAGMParameterSet
- extends IDGMParameterSet
The class for the parameters of a FSDAGModel.
- Author:
- Jens Keilwagen
- See Also:
FSDAGModel
,
FSDAGModelForGibbsSampling
Method Summary |
static String |
encode(int[][] graph)
This method can be used to encode adjacency list to a graph description string. |
String |
getInstanceComment()
Returns a comment (a textual description) of the class that can be
constructed using this ParameterSet . |
protected void |
loadParameters()
Loads the parameters for this ParameterSet . |
Methods inherited from class de.jstacs.parameters.ParameterSet |
getErrorMessage, getId, getInstance, getInstanceClass, getNumberOfValues, getParent, initParameterList, initParameterList, isAtomic, isRanged, makeRanged, next, parametersLoaded, propagateId, recieveId, resetToFirst, setAlternativeInstanceClass, setParent, simplify, valuesToString |
FSDAGMParameterSet
public FSDAGMParameterSet(StringBuffer s)
throws NonParsableException
- The constructor for the
Storable
interface.
- Parameters:
s
- the StringBuffer
- Throws:
NonParsableException
- if the StringBuffer is not parsable
FSDAGMParameterSet
public FSDAGMParameterSet(Class<? extends FSDAGModel> clazz)
- This is the constructor that creates an empty parameter set.
- Parameters:
clazz
- the class of the object that will be created with this parameter set- See Also:
FSDAGModel
,
FSDAGModelForGibbsSampling
FSDAGMParameterSet
public FSDAGMParameterSet(Class<? extends FSDAGModel> clazz,
AlphabetContainer alphabet,
int length,
double ess,
String description,
String graph)
throws Exception
- This is the constructor that creates a filled parameter set.
- Parameters:
clazz
- the class of the object that will be created with this parameter setalphabet
- the alphabet container that is used in the modellength
- the length of the model (has to be positive)ess
- the equivalent sample size (has to be positive)description
- a short description of the model (used for a better handling of the object by the user)graph
- the graph description string, encodes in XML-like manner the parents of each node "<parents
node=i>j,k,l</parents>"
- Throws:
Exception
- if something went wrong- See Also:
encode(int[][])
loadParameters
protected void loadParameters()
throws Exception
- Description copied from class:
ParameterSet
- Loads the parameters for this
ParameterSet
. This is in
most cases done by simply creating a new ArrayList<Parameter>
for the
field parameters/code>
and filling it with instances of subclasses of Parameter
- Overrides:
loadParameters
in class DGMParameterSet
- Throws:
Exception
- an Exception
is thrown if the parameters could not be loaded- See Also:
ParameterSet.parameters
,
Parameter
getInstanceComment
public String getInstanceComment()
- Description copied from class:
ParameterSet
- Returns a comment (a textual description) of the class that can be
constructed using this
ParameterSet
.
- Specified by:
getInstanceComment
in class ParameterSet
- Returns:
- the comment
encode
public static String encode(int[][] graph)
- This method can be used to encode adjacency list to a graph description string.
- Parameters:
graph
- graph[i]
contains the parents of node i
- Returns:
- the graph description string