Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NodeDistributions

Represents the distributions assigned to a {@link com.bayesserver.Node}. Temporal nodes may require more than one distribution to be fully specified.

In a Dynamic Bayesian Network (DBN) a node may require more than one distribution to be specified. This occurs when a temporal node has incoming links of order greater than zero. I.e. Has links from past time slices. For example, if a temporal node has an incoming link of order 1, then it will require a distribution at time t=0, and an additional distribution at t=1. This is because at time t=0 there is no previous time slice, but at time t=1 there is. For times greater than 1, in this example the distribution specified at time t=1 is still valid. However, if a new incoming link of order 12 was added, then an additional distribution would need to be specified at time t=12, valid for times t>=12.

Hierarchy

  • NodeDistributions

Implements

Index

Constructors

constructor

Properties

__@toStringTag

__@toStringTag: "Map"

Accessors

maxTemporalOrder

  • get maxTemporalOrder(): number
  • Gets the current maximum temporal order.

    Returns number

node

  • Gets the node that this instance belongs to.

    Returns Node

size

  • get size(): number
  • Gets the number of distributions in the container.

    Returns number

Methods

__@iterator

_containsKey

_tus_x_

  • _tus_x_(): void
  • Returns void

_tut_x_

  • _tut_x_(p_autogen7: number): void
  • Parameters

    • p_autogen7: number

    Returns void

_tuv_x_

  • _tuv_x_(): void
  • Returns void

_tvr_x_

  • _tvr_x_(p_autogen12: Link): void
  • Parameters

    Returns void

_tvs_x_

  • _tvs_x_(p_autogen13: Link): void
  • Parameters

    Returns void

_tvt_x_

  • _tvt_x_(p_autogen14: number): void
  • Parameters

    • p_autogen14: number

    Returns void

canUpdate

  • Determines whether the distribution at the specified temporal order can be updated.

    Parameters

    • key: NodeDistributionKey

      Properties identifying the distribution to check, such as temporal order/related node.

    Returns boolean

    true if the distribution can be updated, false otherwise.

  • Determines whether the distribution at the specified temporal order can be updated.

    Parameters

    Returns boolean

    true if the distribution can be updated, false otherwise.

clear

  • clear(): void
  • Returns void

delete

entries

findForTime

  • Finds the temporal distribution that is suitable for the time specified.

    exception

    Error Raised when an appropriate distribution could not be found.

    Parameters

    Returns IDistribution

    The distribution and order that is appropriate for the given time. Can return a null distribution, if the appropriate distribution has not yet been assigned to the node.

  • Finds the temporal distribution that is suitable for the time specified.

    exception

    Error Raised when an appropriate distribution could not be found.

    Parameters

    • time: number

      The time.

    Returns IDistribution

    The distribution that is appropriate for the given time. Can return a null distribution, if the appropriate distribution has not yet been assigned to the node.

findForTimeWithOrder

  • Finds the temporal distribution that is suitable for the time specified.

    exception

    Error Raised when an appropriate distribution could not be found.

    Parameters

    • time: number

      The time.

    Returns DistributionOrder

    The distribution and order that is appropriate for the given time. Can return a null distribution, if the appropriate distribution has not yet been assigned to the node.

  • Finds the temporal distribution that is suitable for the time specified.

    exception

    Error Raised when an appropriate distribution could not be found.

    Parameters

    Returns DistributionOrder

    The distribution that is appropriate for the given time. Can return a null distribution, if the appropriate distribution has not yet been assigned to the node.

forEach

  • forEach(callbackfn: function, thisArg?: any): void

get

  • Gets a distribution at a particular temporal order.

    When specifying temporal distributions, variables which belong to temporal nodes must have times associated. Each time must be specified relative to the current point in time which is defined as zero. E.g. to specify a distribution at time>=1 we would include variables at time -1 and 0.

    exception

    RangeError [temporalOrder] must be non negative.

    Parameters

    • temporalOrder: number

      The required temporal order.

    Returns IDistribution

    The requested distribution, which can be null if the node does not support the requested temporal order, or if a distribution has not yet been assigned to that order.

  • Gets a distribution with particular properties, such as temporal order.

    When specifying temporal distributions, variables which belong to temporal nodes must have times associated. Each time must be specified relative to the current point in time which is defined as zero. E.g. to specify a distribution at time>=1 we would include variables at time -1 and 0.

    For noisy nodes, multiple distributions are required, one for each parent and a leak distribution.

    exception

    RangeError Temporal order must be non negative.

    Parameters

    • key: NodeDistributionKey

      The properties of the required distribution, such as temporal order.

    Returns IDistribution

    The requested distribution, which can be null if the node does not support the requested temporal order, or if a distribution has not yet been assigned to that order.

  • Gets a particular kind of distribution on the node.

    For temporal or noisy nodes, use the overload which accepts both a key and kind.

    Parameters

    Returns IDistribution

  • Gets a distribution with particular properties, such as temporal order.

    When specifying temporal distributions, variables which belong to temporal nodes must have times associated. Each time must be specified relative to the current point in time which is defined as zero. E.g. to specify a distribution at time>=1 we would include variables at time -1 and 0.

    For noisy nodes, multiple distributions are required, one for each parent and a leak distribution.

    exception

    RangeError Temporal order must be non negative.

    Parameters

    • key: NodeDistributionKey

      The properties of the required distribution, such as temporal order.

    • kind: NodeDistributionKind

      The kind of distribution we are getting or setting. This allows setting other distribution types than Probability, such as Experience

    Returns IDistribution

    The requested distribution, which can be null if the node does not support the requested temporal order, or if a distribution has not yet been assigned to that order.

has

keys

set

  • Sets a distribution at a particular temporal order.

    When specifying temporal distributions, variables which belong to temporal nodes must have times associated. Each time must be specified relative to the current point in time which is defined as zero. E.g. to specify a distribution at time>=1 we would include variables at time -1 and 0.

    exception

    RangeError [temporalOrder] must be non negative.

    Parameters

    • temporalOrder: number

      The required temporal order.

    • value: IDistribution

    Returns this

  • Sets a distribution with particular properties, such as temporal order.

    When specifying temporal distributions, variables which belong to temporal nodes must have times associated. Each time must be specified relative to the current point in time which is defined as zero. E.g. to specify a distribution at time>=1 we would include variables at time -1 and 0.

    For noisy nodes, multiple distributions are required, one for each parent and a leak distribution.

    exception

    RangeError Temporal order must be non negative.

    Parameters

    Returns this

  • Sets a particular kind of distribution on the node.

    For temporal or noisy nodes, use the overload which accepts both a key and kind.

    Parameters

    Returns this

  • Sets a distribution with particular properties, such as temporal order.

    When specifying temporal distributions, variables which belong to temporal nodes must have times associated. Each time must be specified relative to the current point in time which is defined as zero. E.g. to specify a distribution at time>=1 we would include variables at time -1 and 0.

    For noisy nodes, multiple distributions are required, one for each parent and a leak distribution.

    exception

    RangeError Temporal order must be non negative.

    Parameters

    • key: NodeDistributionKey

      The properties of the required distribution, such as temporal order.

    • kind: NodeDistributionKind

      The kind of distribution we are getting or setting. This allows setting other distribution types than Probability, such as Experience

    • value: IDistribution

    Returns this

validateDistribution

  • Checks that a distribution is correctly specified for a particular temporal order.

    Parameters

    • value: IDistribution

      The distribution to test.

    • key: NodeDistributionKey

      The properties that identify a particular distribution such as temporal order/related node.

    Returns void

  • Checks that a distribution is correctly specified for a particular temporal order.

    Parameters

    Returns void

values

  • Returns IterableIterator<IDistribution>