Package edu.cmu.tetrad.sem
Class Parameter
java.lang.Object
edu.cmu.tetrad.sem.Parameter
- All Implemented Interfaces:
- TetradSerializable,- Serializable
Stores information about the identity of a SEM parameter--its name, its type (COEF, COVAR), and the node(s) it is
 associated with.
- Version:
- $Id: $Id
- Author:
- Don Crimbchin (djc2@andrew.cmu.edu), josephramsey
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionGetter for the fielddistribution.getName()Getter for the fieldname.getNodeA()Getter for the fieldnodeA.getNodeB()Getter for the fieldnodeB.doubleGetter for the fieldstartingValue.getType()Getter for the fieldtype.booleanisFixed()isFixed.booleanisInitializedRandomly.static ParameterGenerates a simple exemplar of this class to test serialization.voidsetDistribution(Distribution distribution) Sets the distribution that initial values should be drawn from for this parameter.voidsetFixed(boolean fixed) Sets whether this parameter should be held fixed during estimation.voidsetInitializedRandomly(boolean initializedRandomly) Set to true iff this parameter should be initialized randomly by drawing an initial value from its preset random distribution.voidSets the name for this parameter.voidsetStartingValue(double startingValue) Sets the starting value in case this is a fixed parameter.toString()toString.
- 
Constructor Details- 
ParameterConstructor for Parameter. - Parameters:
- name- The name of the parameter.
- type- The type of the parameter--ParamType.COEF, ParamType.VAR, or ParamType.COVAR.
- nodeA- The "from" node.
- nodeB- The "to" node. (For variance freeParameters, this must be the same as the "from" node. For covariance freeParameters, it must be different from the "from" node.)
 
 
- 
- 
Method Details- 
serializableInstanceGenerates a simple exemplar of this class to test serialization.- Returns:
- a Parameterobject
 
- 
getNameGetter for the field name.- Returns:
- the name of the parameter.
 
- 
setNameSets the name for this parameter.- Parameters:
- name- a- Stringobject
- Throws:
- IllegalArgumentException- if the name does not begin with a letter.
 
- 
toStringtoString. 
- 
getNodeAGetter for the field nodeA.- Returns:
- the "from" node for the edge this parameter is associated with.
 
- 
getNodeBGetter for the field nodeB.- Returns:
- the "to" node for the edge this parameter is associated with.
 
- 
getTypeGetter for the field type.- Returns:
- the type of this parameter--ParamType.COEF or ParamType.COVAR. This is set at construction time.
 
- 
getDistributionGetter for the field distribution.- Returns:
- the distributions that initial values should be drawn from for this parameter.
 
- 
setDistributionSets the distribution that initial values should be drawn from for this parameter. To set the parameter to always use the same initial value, use tetrad.util.SingleValue.- Parameters:
- distribution- a- Distributionobject
- See Also:
 
- 
isFixedpublic boolean isFixed()isFixed. - Returns:
- true iff this parameter should be held fixed during estimation.
 
- 
setFixedpublic void setFixed(boolean fixed) Sets whether this parameter should be held fixed during estimation.- Parameters:
- fixed- True if the parameter will be held fixed, false if not.
 
- 
getStartingValuepublic double getStartingValue()Getter for the field startingValue.- Returns:
- the starting value if this is a fixed parameter.
 
- 
setStartingValuepublic void setStartingValue(double startingValue) Sets the starting value in case this is a fixed parameter.- Parameters:
- startingValue- a double
 
- 
isInitializedRandomlypublic boolean isInitializedRandomly()isInitializedRandomly. - Returns:
- true iff this parameter should be initialized randomly by drawing an initial value from its preset random distribution.
 
- 
setInitializedRandomlypublic void setInitializedRandomly(boolean initializedRandomly) Set to true iff this parameter should be initialized randomly by drawing an initial value from its preset random distribution.- Parameters:
- initializedRandomly- a boolean
 
 
-