occam

package module
v0.0.0-...-75a983a Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: BSD-3-Clause Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// B1 exponential decay of the rate for the first moment estimates
	B1 = 0.9
	// B2 exponential decay rate for the second-moment estimates
	B2 = 0.999
	// S is the scaling factor for the softmax
	S = 1.0 - 1e-300
	// Eta is the learning rate
	Eta = .001
)
View Source
const (
	// StateM is the state for the mean
	StateM = iota
	// StateV is the state for the variance
	StateV
	// StateTotal is the total number of states
	StateTotal
)

Variables

This section is empty.

Functions

func Softmax

func Softmax(k tf32.Continuation, node int, a *tf32.V, options ...map[string]interface{}) bool

Softmax is the softmax function for big numbers

func SphericalSoftmax

func SphericalSoftmax(k tf32.Continuation, node int, a *tf32.V, options ...map[string]interface{}) bool

SphericalSoftmax is the spherical softmax function https://arxiv.org/abs/1511.05042

Types

type Entropy

type Entropy struct {
	Entropy   float32
	Label     string
	Measures  []float64
	Index     int
	Order     int
	Optimized float32
}

Entropy is the self entropy of a point

type Network

type Network struct {
	Rnd    *rand.Rand
	Width  int
	Length int
	Set    tf32.Set
	Others tf32.Set
	Input  *tf32.V
	Point  *tf32.V
	L1     tf32.Meta
	L2     tf32.Meta
	Cost   tf32.Meta
	I      int
	Points plotter.XYs
}

Network is a clustering neural network

func NewNetwork

func NewNetwork(width, length int) *Network

Creates a new neural network

func (*Network) Analyzer

func (n *Network) Analyzer(in []iris.Iris)

Analyzer calculates properties of the network

func (*Network) GetEntropy

func (n *Network) GetEntropy(inputs []iris.Iris) []Entropy

GetEntropy returns the entropy of the network

func (*Network) GetGradients

func (n *Network) GetGradients(inputs []iris.Iris) [][]float32

GetGradients returns the gradients of the network

func (*Network) GetVectors

func (n *Network) GetVectors(inputs []iris.Iris) []iris.Iris

func (*Network) GetVectors2

func (n *Network) GetVectors2(inputs []iris.Iris) []iris.Iris

func (*Network) Iterate

func (n *Network) Iterate(data []float64) float32

Iterate does a gradient descent operation

Directories

Path Synopsis
cmd
grammar command
iris command
occam_complex command
rnn command

Jump to

Keyboard shortcuts

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