-
Notifications
You must be signed in to change notification settings - Fork 25
/
timescales_string.go
71 lines (61 loc) · 3.92 KB
/
timescales_string.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Code generated by "stringer -type=TimeScales"; DO NOT EDIT.
package env
import (
"errors"
"strconv"
)
var _ = errors.New("dummy error")
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[Event-9]
_ = x[Trial-10]
_ = x[Tick-11]
_ = x[Sequence-12]
_ = x[Epoch-13]
_ = x[Block-14]
_ = x[Condition-15]
_ = x[Run-16]
_ = x[Expt-17]
_ = x[Scene-18]
_ = x[Episode-19]
_ = x[TimeScalesN-20]
}
const _TimeScales_name = "EventTrialTickSequenceEpochBlockConditionRunExptSceneEpisodeTimeScalesN"
var _TimeScales_index = [...]uint8{0, 5, 10, 14, 22, 27, 32, 41, 44, 48, 53, 60, 71}
func (i TimeScales) String() string {
i -= 9
if i < 0 || i >= TimeScales(len(_TimeScales_index)-1) {
return "TimeScales(" + strconv.FormatInt(int64(i+9), 10) + ")"
}
return _TimeScales_name[_TimeScales_index[i]:_TimeScales_index[i+1]]
}
func StringToTimeScales(s string) (TimeScales, error) {
for i := 0; i < len(_TimeScales_index)-1; i++ {
if s == _TimeScales_name[_TimeScales_index[i]:_TimeScales_index[i+1]] {
return TimeScales(i + 9), nil
}
}
return 0, errors.New("String: " + s + " is not a valid option for type: TimeScales")
}
var _TimeScales_descMap = map[TimeScales]string{
9: `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. In an experiment it could just be the onset of a stimulus, or the generation of a response.`,
10: `Trial is one unit of behavior in an experiment, and could potentially encompass multiple Events (e.g., one event is fixation, next is stimulus, last is response, all comprising one Trial). It is also conventionally used as a single Input / Output learning instance in a standard error-driven learning paradigm.`,
11: `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`,
12: `Sequence is a sequential group of Trials (not always needed).`,
13: `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.`,
14: `Block is a collection of Trials, Sequences or Events, often used in experiments when conditions are varied across blocks.`,
15: `Condition is a collection of Blocks that share the same set of parameters. This is intermediate between Block and Run levels. Aggregation of stats at this level is based on the last 5 rows by default.`,
16: `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. Aggregation of stats at this level is based on the last 5 rows by default.`,
17: `Expt is an entire experiment -- multiple Runs through a given protocol / set of parameters.`,
18: `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.`,
19: `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.`,
20: ``,
}
func (i TimeScales) Desc() string {
if str, ok := _TimeScales_descMap[i]; ok {
return str
}
return "TimeScales(" + strconv.FormatInt(int64(i), 10) + ")"
}