Class DistributionSpecification
- java.lang.Object
-
- com.bayesserver.learning.parameters.DistributionSpecification
-
public final class DistributionSpecification extends Object
Identifies a node's distribution to learn, and options for learning. Note that temporal nodes and noisy nodes can have multiple distributions, and each distribution is identified by temporal order.
-
-
Constructor Summary
Constructors Constructor Description DistributionSpecification(Node node)Initializes a new instance of theDistributionSpecificationclass.DistributionSpecification(Node node, int order)Initializes a new instance of theDistributionSpecificationclass.DistributionSpecification(Node node, NodeDistributionKey key)Initializes a new instance of theDistributionSpecificationclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DiscretePriorMethodgetDiscretePriorMethod()Gets the type of discrete prior to use for this distribution.BooleangetInitialize()Gets a flag indicating whether the distribution should be initialized.NodeDistributionKeygetKey()Gets the order/related node of the distribution.NodegetNode()Gets theNodethis distribution specification refers to.intgetOrder()Gets the order of the distribution, for temporal nodes.NodegetRelatedNode()Gets the related node (if any) of the distribution.voidsetDiscretePriorMethod(DiscretePriorMethod value)Sets the type of discrete prior to use for this distribution.voidsetInitialize(Boolean value)Sets a flag indicating whether the distribution should be initialized.
-
-
-
Constructor Detail
-
DistributionSpecification
public DistributionSpecification(Node node)
Initializes a new instance of theDistributionSpecificationclass.- Parameters:
node- The node the distribution refers to.
-
DistributionSpecification
public DistributionSpecification(Node node, int order)
Initializes a new instance of theDistributionSpecificationclass.- Parameters:
node- The node the distribution refers to.order- The order of the distribution, for temporal nodes.
-
DistributionSpecification
public DistributionSpecification(Node node, NodeDistributionKey key)
Initializes a new instance of theDistributionSpecificationclass.- Parameters:
node- The node the distribution refers to.key- Properties that identify the distribution, such as the temporal order.
-
-
Method Detail
-
getInitialize
public Boolean getInitialize()
Gets a flag indicating whether the distribution should be initialized. WhennullInitializationOptions.getInitializeDistributions()will be used to determine whether initialization is performed.- Returns:
- When
trueinitialize the distribution, whenfalsedo not initialize the distributions, and whennulluse the value fromInitializationOptions.getInitializeDistributions().
-
setInitialize
public void setInitialize(Boolean value)
Sets a flag indicating whether the distribution should be initialized. WhennullInitializationOptions.getInitializeDistributions()will be used to determine whether initialization is performed.- Parameters:
value- Whentrueinitialize the distribution, whenfalsedo not initialize the distributions, and whennulluse the value fromInitializationOptions.getInitializeDistributions().
-
getDiscretePriorMethod
public DiscretePriorMethod getDiscretePriorMethod()
Gets the type of discrete prior to use for this distribution. Whennullcom.bayesserver.learning.parameters.PriorOptions#getDiscretePriorMethodwill be used to determine the type of prior.
-
setDiscretePriorMethod
public void setDiscretePriorMethod(DiscretePriorMethod value)
Sets the type of discrete prior to use for this distribution. Whennullcom.bayesserver.learning.parameters.PriorOptions#getDiscretePriorMethodwill be used to determine the type of prior.
-
getOrder
public int getOrder()
Gets the order of the distribution, for temporal nodes. For non temporal nodes this value will always be zero.
-
getRelatedNode
public Node getRelatedNode()
Gets the related node (if any) of the distribution. e.g. for noisy nodes.
-
getKey
public NodeDistributionKey getKey()
Gets the order/related node of the distribution. For non temporal nodes this value will always be zero.
-
-