mark2

package
v0.0.0-...-5f2bfed Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModelWindow is the window size
	ModelWindow = 32
	// GaussianWindow is the gaussian window
	GaussianWindow = 8
	// ModelSamples is the number of samples
	ModelSamples = 256
	// Inputs is the number of inputs
	Inputs = 4
	// Outputs is the number of outputs
	Outputs = 4
	// Embedding is the embedding size
	Embedding = 3 * 4
	// Clusters is the number of clusters
	Clusters = 3
)

Variables

This section is empty.

Functions

func Mark2

func Mark2()

Mark2 is the mark2 model

func XGMM

func XGMM(flowers []Iris)

XGMM is a gaussian mixture model clustering algorithm https://github.com/Ransaka/GMM-from-scratch https://en.wikipedia.org/wiki/Multivariate_normal_distribution

Types

type Iris

type Iris struct {
	iris.Iris
	I         int
	Embedding []float32
	Cluster   int
}

Iris is a iris data point

type Rand

type Rand struct {
	Mean   float32
	StdDev float32
	Count  float32
}

Random is a random variable

type XNet

type XNet struct {
	Inputs  int
	Outputs int
	Rng     *rand.Rand
	Q       XSet
	K       XSet
	V       XSet
}

XNet is a net

func XNewNet

func XNewNet(seed int64, inputs, outputs int) XNet

XNewNet makes a new network

func (XNet) CalculateStatistics

func (n XNet) CalculateStatistics(systems []XSample) XSet

CalculateStatistics calculates the statistics of systems

func (*XNet) Fire

func (n *XNet) Fire(query, key, value Matrix) (float32, Matrix, Matrix, Matrix)

Fire runs the network

type XSample

type XSample struct {
	Entropy float32
	Neurons []Matrix
	Outputs Matrix
	Out     Matrix
}

XSample is a sample of a random neural network

type XSet

type XSet [][]Random

XSet is a set of statistics

func XNewStatistics

func XNewStatistics(inputs, outputs int) XSet

XNewStatistics generates a new statistics model

func (XSet) Sample

func (s XSet) Sample(rng *rand.Rand, inputs, outputs int) []Matrix

Sample samples from the statistics

Jump to

Keyboard shortcuts

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