model

package
v0.0.0-...-2a7e3b4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

LDA

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	K     int       // num topics
	V     int       // num words
	M     int       // num docs
	N     int       // total word instances
	Word  []int     // word n
	Doc   []int     // doc ID for word n
	Alpha []float64 // topic prior
	Beta  []float64 // word prior
	Gamma float64   // regularization prior
}

data are the observations

func (*Model) FetchSimplices

func (m *Model) FetchSimplices(
	px *[]float64,
	k int,
	simplices [][]float64,
)

FetchmSimplices fetches simplices from the parameter slice. The parameter slice is advanced in place, hence a shallow copy of the slice must be passed.

func (*Model) Observe

func (m *Model) Observe(x []float64) float64

Jump to

Keyboard shortcuts

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