data

package
v1.2.10 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: BSD-3-Clause Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KiT_DataLoopOrder = kit.Enums.AddEnum(DataLoopOrderN, kit.NotBitFlag, nil)
View Source
var USTimeInVals map[string]int = map[string]int{}/* 321 elements not displayed */

Functions

func IntSequence

func IntSequence(begin, end, step int) (sequence []int)

Types

type ConditionParams added in v1.1.15

type ConditionParams struct {

	// identifier for this type of configuration
	Nm string `desc:"identifier for this type of configuration"`

	// description of this configuration
	Desc string `desc:"description of this configuration"`

	// trial group name
	TrialBlkNm string `desc:"trial group name"`

	// fixed probability for each trial group
	FixedProb bool `desc:"fixed probability for each trial group"`

	// number of iterations to run
	NIters int `desc:"number of iterations to run"`

	// number of blocks (1 block = one behavioral trial = sequence of CS, US) in each iteration -- needs to be higher if there are stochastic variables (probabilities).
	BlocksPerIter int `` /* 168-byte string literal not displayed */

	// permute list of fully-instantiated trials after generation
	PermuteTrialGps bool `desc:"permute list of fully-instantiated trials after generation"`

	// save final weights after training
	SaveFinalWts bool `desc:"save final weights after training"`

	// how frequently to save weights during training (in blocks)
	SaveWtsInterval int `desc:"how frequently to save weights during training (in blocks)"`

	// how frequently (blocks) to run a test during training
	TestInterval int `desc:"how frequently (blocks) to run a test during training"`

	// should trial-level data be saved to log files?
	LogTrials bool `desc:"should trial-level data be saved to log files?"`

	// load initial weights from a file (specified in weights_file)
	LoadWeights bool `desc:"load initial weights from a file (specified in weights_file)"`

	// full relative path (from project) of weights file to load -- use CRR: prefix to load from cluster run results directory
	WeightsFile string `` /* 126-byte string literal not displayed */

	// after loading weights, reset block counter to this value (-1 = leave at value from the loaded weights)
	LoadStBlk int `desc:"after loading weights, reset block counter to this value (-1 = leave at value from the loaded weights)"`

	// learning rate schedule blocks per step of decrease in learning rate
	LrsStepBlks int `desc:"learning rate schedule blocks per step of decrease in learning rate"`

	// number of steps in the learning rate schedule
	LrsNSteps int `desc:"number of steps in the learning rate schedule"`

	// if positive (3 is typical), then bump up the learning rate at this step in the schedule -- can help improve final performance level
	LrsBumpStep int `` /* 138-byte string literal not displayed */
}

ConditionParams contains settings for one portion of a Run. A ConditionParams refers to a single ConditionParams, along with other information such as the number of times to run each instantiated Block. A single Block can be referenced by many RunBlocks.

type ConditionParamsMap added in v1.1.15

type ConditionParamsMap map[string]ConditionParams

func AllConditionParams added in v1.1.15

func AllConditionParams() ConditionParamsMap

type DataLoopOrder

type DataLoopOrder int
const (
	SEQUENTIAL DataLoopOrder = iota
	PERMUTED
	RANDOM
	DataLoopOrderN
)

type IRecs

type IRecs interface {
	Length() int
	Append(interface{}) IRecs
	Get(int) interface{}
}

type Recs

type Recs struct {
	Records IRecs
	DType   reflect.Kind
	Index   []int
	INext   int
	NRead   int
	Order   DataLoopOrder
}

func NewRecs

func NewRecs(irecs IRecs) *Recs

func (*Recs) AtEnd

func (recs *Recs) AtEnd() bool

func (*Recs) Cur

func (recs *Recs) Cur() int

func (*Recs) GetIndex

func (recs *Recs) GetIndex() []int

func (*Recs) Length

func (recs *Recs) Length() int

func (*Recs) Permute

func (recs *Recs) Permute()

func (*Recs) ReadNext

func (recs *Recs) ReadNext() interface{}

func (*Recs) Reset

func (recs *Recs) Reset()

Set to initial state just before reading

func (*Recs) Sequential

func (recs *Recs) Sequential()

func (*Recs) SetIndex

func (recs *Recs) SetIndex(ix []int) error

Set the entire index array for the TrialInstanceRecs

func (*Recs) SetOrder

func (recs *Recs) SetOrder(order DataLoopOrder)

func (*Recs) SetPos

func (recs *Recs) SetPos(i int)

func (*Recs) WriteNext

func (recs *Recs) WriteNext(rec interface{})

type RunParams

type RunParams struct {

	// Name of the sequence
	Nm string `desc:"Name of the sequence"`

	// Description
	Desc string `desc:"Description"`

	// name of condition 1
	Cond1Nm string `desc:"name of condition 1"`

	// name of condition 2
	Cond2Nm string `desc:"name of condition 2"`

	// name of condition 3
	Cond3Nm string `desc:"name of condition 3"`

	// name of condition 4
	Cond4Nm string `desc:"name of condition 4"`

	// name of condition 5
	Cond5Nm string `desc:"name of condition 5"`
}

A sequence of runs (each step is a ConditionParams object)

type RunParamsMap

type RunParamsMap map[string]RunParams

func AllRunParams

func AllRunParams() RunParamsMap

type TrialBlock added in v1.1.14

type TrialBlock []*TrialBlockParams

func (*TrialBlock) Append added in v1.1.14

func (epl *TrialBlock) Append(ins interface{}) IRecs

func (*TrialBlock) Get added in v1.1.14

func (epl *TrialBlock) Get(i int) interface{}

func (*TrialBlock) Length added in v1.1.14

func (epl *TrialBlock) Length() int

type TrialBlockMap added in v1.1.14

type TrialBlockMap map[string]TrialBlock

func AllTrialBlocks added in v1.1.14

func AllTrialBlocks() TrialBlockMap

imported from PVLVEnv->EnvBlockParams_Group in cemer

type TrialBlockParams added in v1.1.15

type TrialBlockParams struct {

	// name
	TrialBlkName string `desc:"name"`

	// Percent of all trials for this type
	PercentOfTotal float64 `desc:"Percent of all trials for this type"`

	// Positive or negative reward valence
	ValenceContext p.Valence `desc:"Positive or negative reward valence"`

	// Probability of US
	USProb float64 `desc:"Probability of US"`

	// Fixed probability?
	FixedProb bool `desc:"Fixed probability?"`

	// Mixed US set?
	MixedUS bool `desc:"Mixed US set?"`

	// US magnitude
	USMagnitude float64 `desc:"US magnitude"`

	// Number of ticks for a trial
	AlphTicksPerTrialGp int `desc:"Number of ticks for a trial"`

	// Conditioned stimulus
	CS string `desc:"Conditioned stimulus"`

	// Tick of CS start
	CSTimeStart p.Tick `desc:"Tick of CS start"`

	// Tick of CS end
	CSTimeEnd p.Tick `desc:"Tick of CS end"`

	// Tick of CS2 start
	CS2TimeStart p.Tick `desc:"Tick of CS2 start"`

	// Tick of CS2 end
	CS2TimeEnd p.Tick `desc:"Tick of CS2 end"`

	// Unconditioned stimulus
	USType p.US `desc:"Unconditioned stimulus"`

	// Tick for start of US presentation
	USTimeStart p.Tick `desc:"Tick for start of US presentation"`

	// Tick for end of US presentation
	USTimeEnd p.Tick `desc:"Tick for end of US presentation"`

	// Context
	Context string `desc:"Context"`

	// Location
	Location string `desc:"Location"`
}

TrialGp : block-level state aka TrialBlock

type TrialBlockRecs added in v1.1.14

type TrialBlockRecs struct {
	Recs
}

func NewTrialBlockRecs added in v1.1.14

func NewTrialBlockRecs(epl *TrialBlock) *TrialBlockRecs

func (*TrialBlockRecs) ReadNext added in v1.1.14

func (eps *TrialBlockRecs) ReadNext() *TrialBlockParams

type TrialInstance

type TrialInstance struct {
	TrialName            string
	ValenceContext       pvlv.Valence
	USFlag               bool
	TestFlag             bool
	MixedUS              bool
	USProb               float64
	USMagnitude          float64
	AlphaTicksPerTrialGp int
	CS                   string
	CSTimeStart          int
	CSTimeEnd            int
	CS2TimeStart         int
	CS2TimeEnd           int
	USTimeStart          int
	USTimeEnd            int
	Context              string
	USType               string
}

A set of trial groups, sourced from an TrialParams list, instantiated according to the PercentOfTotal field in the source list. this is what we get after calling SetActiveTrialList Still not fully instantiated, US is still a probability

type TrialInstanceList

type TrialInstanceList []*TrialInstance

func (*TrialInstanceList) Append

func (til *TrialInstanceList) Append(ins interface{}) IRecs

func (*TrialInstanceList) Get

func (til *TrialInstanceList) Get(i int) interface{}

func (*TrialInstanceList) Length

func (til *TrialInstanceList) Length() int

type TrialInstanceRecs

type TrialInstanceRecs struct {
	Recs
}

func NewTrialInstanceRecs

func NewTrialInstanceRecs(til *TrialInstanceList) *TrialInstanceRecs

func (*TrialInstanceRecs) ReadNext

func (til *TrialInstanceRecs) ReadNext() *TrialInstance

type USTVal

type USTVal struct {
	Enum   int
	Coords [4]int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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