bayes

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

Model implements a Bayes model for accounts and text tokens derived from transactions.

func NewModel

func NewModel(exclude *journal.Account) *Model

NewModel creates a new model.

func (*Model) Infer

func (m *Model) Infer(t *journal.Transaction, tbd *journal.Account)

Infer replaces the given account with an inferred account. P(A | T1 & T2 & ... & Tn) ~ P(A) * P(T1|A) * P(T2|A) * ... * P(Tn|A)

func (*Model) Update

func (m *Model) Update(t *journal.Transaction)

Update updates the model with the given transaction.

Jump to

Keyboard shortcuts

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