Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Evidence

Represents the evidence, or case data (e.g. row in a database) used in a {@link com.bayesserver.inference.IInference#query query}.

Evidence is always associated with a particular network, however if necessary can be detached or attached to an instance of an inference engine. This has the follwing advantages: - Evidence can be set before an inference engine is created, or retained when an inference engine is destroyed. - Evidence can be switched between inference engines. - An inference engine can switch between different evidence instances.

Hierarchy

  • Evidence

Implements

Index

Constructors

constructor

  • Initializes a new instance of the {@link com.bayesserver.inference.Evidence} class, with the target Bayesian network.

    Parameters

    • network: Network

      The target {@link com.bayesserver.Network}.

    Returns Evidence

  • Initializes a new instance of the {@link com.bayesserver.inference.Evidence} class, and copies the evidence from another instance.

    Parameters

    Returns Evidence

  • Initializes a new instance of the {@link com.bayesserver.inference.Evidence} class, copying data from an existing {@link com.bayesserver.inference.Evidence} object.

    Parameters

    • evidence: Evidence

      The evidence to copy.

    Returns Evidence

Properties

_1b3c77a7ef11437c93c3830de82e7500

_1b3c77a7ef11437c93c3830de82e7500: string | null = null
inheritdoc

Accessors

logWeight

  • get logWeight(): number
  • set logWeight(value: number): void
  • inheritdoc

    Returns number

  • inheritdoc

    Parameters

    • value: number

    Returns void

network

  • inheritdoc

    Returns Network

size

  • get size(): number
  • Gets the count of variables with either hard, soft or temporal evidence set.

    Returns number

    The count of variables with evidence.

weight

  • get weight(): number
  • set weight(value: number): void
  • inheritdoc

    Returns number

  • inheritdoc

    Parameters

    • value: number

    Returns void

Methods

_uu_x_

_uv_x_

  • _uv_x_(p_autogen109: number, p_autogen110: Link, p_autogen111: Link, p_autogen112: CollectionAction, p_autogen113: boolean): void
  • Parameters

    Returns void

_vq_x_

  • _vq_x_(p_autogen114: number, p_autogen115: Node, p_autogen116: Node, p_autogen117: CollectionAction, p_autogen118: boolean): void
  • Parameters

    Returns void

_vr_x_

  • Parameters

    Returns void

_vs_x_

  • Parameters

    Returns void

beginUpdate

  • beginUpdate(): void

clear

  • clear(variable: Variable, time: number | null): void
  • clear(node: Node, time: number | null): void
  • clear(variable: Variable): void
  • clear(node: Node): void
  • clear(): void
  • Clears evidence on a variable at the specified time.

    Parameters

    • variable: Variable

      The variable whose evidence you want to clear.

    • time: number | null

      The time at which to clear evidence. Can be null.

    Returns void

  • Clears evidence on a node's single variable.

    Parameters

    • node: Node

      A node with a single variable whose evidence you want to clear.

    • time: number | null

      The time at which to clear evidence. Can be null.

    Returns void

  • Clears any evidence on a variable.

    Parameters

    • variable: Variable

      The variable to clear evidence on.

    Returns void

  • Clears evidence on a node's variables.

    exception

    ReferenceError [node] is null.

    Parameters

    • node: Node

      The node whose variables you want to clear evidence on.

    Returns void

  • Clears any evidence on all variables.

    Returns void

copy

  • inheritdoc

    Parameters

    Returns void

  • inheritdoc

    Parameters

    Returns void

  • inheritdoc

    Parameters

    Returns void

endUpdate

  • endUpdate(): void
  • inheritdoc

    Returns void

get

  • get(variable: Variable): number | null
  • get(variable: Variable, time: number | null): number | null
  • get(node: Node, time: number | null): number | null
  • get(variable: Variable, destination: number[], destinationStart: number, startTime: number, count: number): void
  • get(node: Node, destination: number[], destinationStart: number, startTime: number, count: number): void
  • get(node: Node): number | null
  • inheritdoc

    Parameters

    Returns number | null

  • inheritdoc

    Parameters

    • variable: Variable
    • time: number | null

    Returns number | null

  • inheritdoc

    Parameters

    • node: Node
    • time: number | null

    Returns number | null

  • inheritdoc

    Parameters

    • variable: Variable
    • destination: number[]
    • destinationStart: number
    • startTime: number
    • count: number

    Returns void

  • inheritdoc

    Parameters

    • node: Node
    • destination: number[]
    • destinationStart: number
    • startTime: number
    • count: number

    Returns void

  • inheritdoc

    Parameters

    Returns number | null

getEvidenceType

getMaxTime

  • getMaxTime(variable: Variable): number | null
  • getMaxTime(): number | null
  • inheritdoc

    Parameters

    Returns number | null

  • inheritdoc

    Returns number | null

getState

  • getState(variable: Variable): number | null
  • getState(variable: Variable, time: number | null): number | null
  • getState(node: Node): number | null
  • getState(node: Node, time: number | null): number | null
  • inheritdoc

    Parameters

    Returns number | null

  • inheritdoc

    Parameters

    • variable: Variable
    • time: number | null

    Returns number | null

  • inheritdoc

    Parameters

    Returns number | null

  • inheritdoc

    Parameters

    • node: Node
    • time: number | null

    Returns number | null

getStates

  • getStates(variable: Variable, buffer: number[]): void
  • getStates(node: Node, buffer: number[]): void
  • getStates(table: Table): void
  • getStates(node: Node, buffer: number[], time: number | null): void
  • getStates(variable: Variable, buffer: number[], time: number | null): void
  • inheritdoc

    Parameters

    Returns void

  • inheritdoc

    Parameters

    • node: Node
    • buffer: number[]

    Returns void

  • inheritdoc

    Parameters

    Returns void

  • inheritdoc

    Parameters

    • node: Node
    • buffer: number[]
    • time: number | null

    Returns void

  • inheritdoc

    Parameters

    • variable: Variable
    • buffer: number[]
    • time: number | null

    Returns void

getVariables

  • getVariables(buffer: Variable[]): void

set

  • set(variable: Variable, source: number[], sourceStart: number, startTime: number, count: number): void
  • set(node: Node, source: number[], sourceStart: number, startTime: number, count: number): void
  • set(variable: Variable, value: number | null): void
  • set(node: Node, value: number | null, time: number | null): void
  • set(variable: Variable, value: number | null, time: number | null): void
  • set(node: Node, value: number | null): void
  • inheritdoc

    Parameters

    • variable: Variable
    • source: number[]
    • sourceStart: number
    • startTime: number
    • count: number

    Returns void

  • inheritdoc

    Parameters

    • node: Node
    • source: number[]
    • sourceStart: number
    • startTime: number
    • count: number

    Returns void

  • inheritdoc

    Parameters

    • variable: Variable
    • value: number | null

    Returns void

  • inheritdoc

    Parameters

    • node: Node
    • value: number | null
    • time: number | null

    Returns void

  • inheritdoc

    Parameters

    • variable: Variable
    • value: number | null
    • time: number | null

    Returns void

  • inheritdoc

    Parameters

    • node: Node
    • value: number | null

    Returns void

setState

  • setState(variable: Variable, state: number | null): void
  • setState(variable: Variable, state: number | null, time: number | null): void
  • setState(state: State): void
  • setState(state: State, time: number | null): void
  • setState(node: Node, state: number | null): void
  • setState(node: Node, state: number | null, time: number | null): void
  • inheritdoc

    Parameters

    • variable: Variable
    • state: number | null

    Returns void

  • inheritdoc

    Parameters

    • variable: Variable
    • state: number | null
    • time: number | null

    Returns void

  • inheritdoc

    Parameters

    Returns void

  • inheritdoc

    Parameters

    • state: State
    • time: number | null

    Returns void

  • inheritdoc

    Parameters

    • node: Node
    • state: number | null

    Returns void

  • inheritdoc

    Parameters

    • node: Node
    • state: number | null
    • time: number | null

    Returns void

setStates

  • setStates(variable: Variable, values: number[]): void
  • setStates(node: Node, values: number[]): void
  • setStates(node: Node, values: number[], time: number | null): void
  • setStates(variable: Variable, values: number[], time: number | null): void
  • inheritdoc

    Parameters

    Returns void

  • inheritdoc

    Parameters

    • node: Node
    • values: number[]

    Returns void

  • inheritdoc

    Parameters

    • node: Node
    • values: number[]
    • time: number | null

    Returns void

  • inheritdoc

    Parameters

    • variable: Variable
    • values: number[]
    • time: number | null

    Returns void

Static _ut_x_

  • _ut_x_(p_autogen102: Variable, p_autogen103: number | null): void
  • Parameters

    • p_autogen102: Variable
    • p_autogen103: number | null

    Returns void