decay

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package decay provides functionality parameter decayer functions, particularly for SOM learning rate and neighborhood radius.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constant added in v0.2.0

type Constant struct {
	Value float64
}

func (*Constant) Decay added in v0.2.0

func (c *Constant) Decay(epoch, total int) float64

func (*Constant) Name added in v0.2.0

func (c *Constant) Name() string

func (*Constant) SetArgs added in v0.2.0

func (c *Constant) SetArgs(args ...float64) error

type Decay

type Decay interface {
	Name() string
	Decay(epoch, total int) float64
	SetArgs(args ...float64) error
}

func FromString

func FromString(nameAndArgs string) (Decay, error)

type Linear

type Linear struct {
	Start float64
	End   float64
}

func (*Linear) Decay

func (l *Linear) Decay(epoch, total int) float64

func (*Linear) Name

func (l *Linear) Name() string

func (*Linear) SetArgs

func (l *Linear) SetArgs(args ...float64) error

type Polynomial

type Polynomial struct {
	Start float64
	End   float64
	Exp   float64
}

func (*Polynomial) Decay

func (p *Polynomial) Decay(epoch, total int) float64

func (*Polynomial) Name

func (p *Polynomial) Name() string

func (*Polynomial) SetArgs

func (p *Polynomial) SetArgs(args ...float64) error

type Power

type Power struct {
	Start float64
	End   float64
}

func (*Power) Decay

func (p *Power) Decay(epoch, total int) float64

func (*Power) Name

func (p *Power) Name() string

func (*Power) SetArgs

func (p *Power) SetArgs(args ...float64) error

Jump to

Keyboard shortcuts

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