bayes

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 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(account string) *Model

NewModel creates a new model.

func (*Model) Infer

func (m *Model) Infer(t *syntax.Transaction)

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 *syntax.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