Documentation ¶
Index ¶
- Variables
- func ScopeName(mode Modes, time Times) string
- type Modes
- type ScopeKey
- func CloneScopeSlice(ss []ScopeKey) []ScopeKey
- func Scope(mode Modes, time Times) ScopeKey
- func ScopeStr(mode, time string) ScopeKey
- func Scopes(modes []Modes, times []Times) ScopeKey
- func ScopesMap(modes, times map[string]bool) ScopeKey
- func ScopesStr(modes, times []string) ScopeKey
- func SortScopes(scopes []ScopeKey) []ScopeKey
- func (sk *ScopeKey) FromScope(mode Modes, time Times)
- func (sk *ScopeKey) FromScopeStr(mode, time string)
- func (sk *ScopeKey) FromScopes(modes []Modes, times []Times)
- func (sk *ScopeKey) FromScopesMap(modes, times map[string]bool)
- func (sk *ScopeKey) FromScopesStr(modes, times []string)
- func (sk *ScopeKey) ModeAndTime() (mode Modes, time Times)
- func (sk *ScopeKey) ModeAndTimeStr() (mode, time string)
- func (sk *ScopeKey) ModesAndTimes() (modes, times []string)
- func (sk *ScopeKey) ModesAndTimesMap() (modes, times map[string]bool)
- type Times
Constants ¶
This section is empty.
Variables ¶
var ( ScopeKeySeparator = "&" // between mode and time ScopeKeyList = "|" // between multiple modes, times )
Like "Train|Test&Epoch|Trial"
var KiT_Modes = kit.Enums.AddEnum(ModesN, kit.NotBitFlag, nil)
var KiT_Times = kit.Enums.AddEnum(TimesN, kit.NotBitFlag, nil)
Functions ¶
Types ¶
type Modes ¶
type Modes int32
Modes are evaluation modes (Training, Testing, etc)
const ( NoEvalMode Modes = iota // AllModes indicates that the log should occur over all modes present in other items. AllModes // Train is this a training mode for the env Train // Test is this a test mode for the env Test // Validate is this a validation mode for the env Validate // Analyze when analyzing the representations and behavior of the network Analyze ModesN )
The evaluation modes
func (*Modes) FromString ¶
func (Modes) MarshalJSON ¶
func (*Modes) UnmarshalJSON ¶
type ScopeKey ¶
type ScopeKey string
ScopeKey the associated string representation of a scope or scopes. They include one or more Modes and one or more Times. It is fully extensible with arbitrary mode and time strings -- the enums are a convenience for standard cases. Ultimately a single mode, time pair is used concretely, but the All* cases and lists of multiple can be used as a convenience to specify ranges
func CloneScopeSlice ¶
CloneScopeSlice returns a copy of given ScopeKey slice
func ScopesMap ¶
ScopesMap generates a scope key from maps of modes and times (warning: ordering is random!)
func SortScopes ¶
SortScopes sorts a list of concrete mode, time scopes according to the Modes and Times enum ordering
func (*ScopeKey) FromScopeStr ¶
FromScopeStr create an associated scope from given mode and time as strings
func (*ScopeKey) FromScopes ¶
FromScopes creates an associated scope merging the modes and times that are specified If you modify this, also modify ModesAndTimes, below.
func (*ScopeKey) FromScopesMap ¶
FromScopesMap creates an associated scope key merging the modes and times that are specified by map of strings.
func (*ScopeKey) FromScopesStr ¶
FromScopesStr creates an associated scope merging the modes and times that are specified as strings If you modify this, also modify ModesAndTimes, below.
func (*ScopeKey) ModeAndTime ¶
ModeAndTime returns the singular mode and time as enums from a concrete scope key having one of each (No* cases if not standard)
func (*ScopeKey) ModeAndTimeStr ¶
ModeAndTimeStr returns the mode and time as strings from the current key value. Returns the first of each if there are multiple (intended for case when only 1).
func (*ScopeKey) ModesAndTimes ¶
ModesAndTimes returns the mode(s) and time(s) as strings from the current key value. This must be the inverse of FromScopesStr
func (*ScopeKey) ModesAndTimesMap ¶
ModesAndTimesMap returns maps of modes and times as strings parsed from the current scopekey
type Times ¶
type Times int32
Times the enum
const ( // NoTime represents a non-initialized value, or a null result NoTime Times = iota // AllTimes indicates that the log should occur over all times present in other items. AllTimes // Cycle is the finest time scale -- typically 1 msec -- a single activation update. Cycle // FastSpike is typically 10 cycles = 10 msec (100hz) = the fastest spiking time // generally observed in the brain. This can be useful for visualizing updates // at a granularity in between Cycle and GammaCycle. FastSpike // GammaCycle is typically 25 cycles = 25 msec (40hz) GammaCycle // Phase is typically a Minus or Plus phase, where plus phase is bursting / outcome // that drives positive learning relative to prediction in minus phase. // It can also be used for other time scales involving multiple Cycles. Phase // BetaCycle is typically 50 cycles = 50 msec (20 hz) = one beta-frequency cycle. // Gating in the basal ganglia and associated updating in prefrontal cortex // occurs at this frequency. BetaCycle // AlphaCycle is typically 100 cycles = 100 msec (10 hz) = one alpha-frequency cycle. AlphaCycle // ThetaCycle is typically 200 cycles = 200 msec (5 hz) = two alpha-frequency cycles. // This is the modal duration of a saccade, the update frequency of medial temporal lobe // episodic memory, and the minimal predictive learning cycle (perceive an Alpha 1, predict on 2). ThetaCycle // Event is the smallest unit of naturalistic experience that coheres unto itself // (e.g., something that could be described in a sentence). // Typically this is on the time scale of a few seconds: e.g., reaching for // something, catching a ball. Event // Trial is one unit of behavior in an experiment -- it is typically environmentally // defined instead of endogenously defined in terms of basic brain rhythms. // In the minimal case it could be one ThetaCycle, but could be multiple, and // could encompass multiple Events (e.g., one event is fixation, next is stimulus, // last is response) Trial // Tick is one step in a sequence -- often it is useful to have Trial count // up throughout the entire Epoch but also include a Tick to count trials // within a Sequence Tick // Sequence is a sequential group of Trials (not always needed). Sequence // Condition is a collection of Blocks that share the same set of parameters. // This is intermediate between Block and Run levels. Condition // Block is a collection of Trials, Sequences or Events, often used in experiments // when conditions are varied across blocks. Block // Epoch is used in two different contexts. In machine learning, it represents a // collection of Trials, Sequences or Events that constitute a "representative sample" // of the environment. In the simplest case, it is the entire collection of Trials // used for training. In electrophysiology, it is a timing window used for organizing // the analysis of electrode data. Epoch // Run is a complete run of a model / subject, from training to testing, etc. // Often multiple runs are done in an Expt to obtain statistics over initial // random weights etc. Run // Expt is an entire experiment -- multiple Runs through a given protocol / set of // parameters. Expt // Scene is a sequence of events that constitutes the next larger-scale coherent unit // of naturalistic experience corresponding e.g., to a scene in a movie. // Typically consists of events that all take place in one location over // e.g., a minute or so. This could be a paragraph or a page or so in a book. Scene // Episode is a sequence of scenes that constitutes the next larger-scale unit // of naturalistic experience e.g., going to the grocery store or eating at a // restaurant, attending a wedding or other "event". // This could be a chapter in a book. Episode TimesN )
A list of predefined time scales at which logging can occur