popcode

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OneD

type OneD struct {
	Code   PopCodes `desc:"how to encode the value"`
	Min    float32  `` /* 168-byte string literal not displayed */
	Max    float32  `` /* 168-byte string literal not displayed */
	Sigma  float32  `` /* 149-byte string literal not displayed */
	Clip   bool     `desc:"ensure that encoded and decoded value remains within specified range"`
	Thr    float32  `` /* 201-byte string literal not displayed */
	MinSum float32  `` /* 174-byte string literal not displayed */
}

popcode.OneD provides encoding and decoding of population codes, used to represent a single continuous (scalar) value across a population of units / neurons (1 dimensional)

func (*OneD) Decode

func (pc *OneD) Decode(pat []float32) float32

Decode decodes value from a pattern of activation as the activation-weighted-average of the unit's preferred tuning values. must have 2 or more values in pattern pat.

func (*OneD) Defaults

func (pc *OneD) Defaults()

func (*OneD) Encode

func (pc *OneD) Encode(pat *[]float32, val float32, n int)

Encode generates a pattern of activation of given size to encode given value. n must be 2 or more. pat slice will be constructed if len != n

func (*OneD) Values

func (pc *OneD) Values(vals *[]float32, n int)

Values sets the vals slice to the target preferred tuning values for each unit, for a distribution of given size n. n must be 2 or more. vals slice will be constructed if len != n

type PopCodes

type PopCodes int
const (
	// GaussBump = gaussian bump, with value = weighted average of tuned unit values
	GaussBump PopCodes = iota

	// Localist = each unit represents a distinct value; intermediate values represented by graded activity of neighbors; overall activity is weighted-average across all units
	Localist
)

Jump to

Keyboard shortcuts

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