bayesian

package
v0.0.0-...-461edb3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	// contains filtered or unexported fields
}

Instance is the Bayesian object

func New

func New(prior float64, threshold float64) *Instance

New creates a new instance of a Bayesian object

func (*Instance) AddInput

func (b *Instance) AddInput(id int64, truestate bool, probGivenTrue float64, probGivenFalse float64)

AddInput is there to add an input to the bayesian observation

func (*Instance) ReadState

func (b *Instance) ReadState() bool

ReadState will return true/false according to the bayesian computation

func (*Instance) SetInputState

func (b *Instance) SetInputState(id int64, state bool)

SetInputState will set the input state of one of the inputs that is identified by ID 'id'

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL