Documentation ¶
Index ¶
- func CaContinuousAvg(p Parameters, data Data) float64
- func CalculateABins(p Parameters, d Data) int
- func CalculateSBins(p Parameters, d Data) int
- func CalculateWBins(p Parameters, d Data) int
- func CiContinuousAvg(p Parameters, data Data) float64
- func ContinuousAvgCalculations(p Parameters, d Data) float64
- func ContinuousSDCalculations(p Parameters, d Data)
- func DiscreteAvgCalculations(p Parameters, d Data)
- func DiscreteAvgCalculationsSparse(p Parameters, d Data)
- func DiscreteSDCalculations(p Parameters, d Data)
- func DiscreteSDCalculationsSparse(p Parameters, d Data)
- func MakeA1S1Discrete(d Data, p Parameters) [][]int
- func MakePA1S1(d Data, p Parameters) [][]float64
- func MakePA1S1Sparse(d Data, p Parameters) sm.SparseMatrix
- func MakePS2S1A1(d Data, p Parameters) [][][]float64
- func MakePW2A1(d Data, p Parameters) [][]float64
- func MakePW2A1W1(d Data, p Parameters) [][][]float64
- func MakePW2A1W1Sparse(d Data, p Parameters) sm.SparseMatrix
- func MakePW2W1(d Data, p Parameters) [][]float64
- func MakePW2W1A1(d Data, p Parameters) [][][]float64
- func MakePW2W1A1Sparse(d Data, p Parameters) sm.SparseMatrix
- func MakePW2W1S1(d Data, p Parameters) [][][]float64
- func MakePW2W1Sparse(d Data, p Parameters) sm.SparseMatrix
- func MakeS2S1A1Discrete(d Data, p Parameters) [][]int
- func MakeW2A1Discrete(d Data, p Parameters) [][]int
- func MakeW2A1W1Discrete(d Data, p Parameters) [][]int
- func MakeW2W1A1(d Data, p Parameters) ([][]float64, []int, []int, []int)
- func MakeW2W1A1Discrete(d Data, p Parameters) [][]int
- func MakeW2W1Discrete(d Data, p Parameters) [][]int
- func MakeW2W1S1(d Data, p Parameters) ([][]float64, []int, []int, []int)
- func MakeW2W1S1A1(d Data, p Parameters) ([][]float64, []int, []int, []int, []int)
- func MakeW2W1S1Discrete(d Data, p Parameters) [][]int
- func MiAContinuousAvg(p Parameters, data Data) (result float64)
- func MiAPrimeContinuousAvg(p Parameters, data Data) float64
- func MiCaContinuousAvg(p Parameters, data Data) (result float64)
- func MiInContinuousAvg(p Parameters, data Data) float64
- func MiMiContinuousAvg(p Parameters, data Data) (result float64)
- func MiSyContinuousAvg(p Parameters, data Data) float64
- func MiWContinuousAvg(p Parameters, data Data) (result float64)
- func MiWaContinuousAvg(p Parameters, data Data) (result float64)
- func MiWpContinuousAvg(p Parameters, data Data) float64
- func MiWsContinuousAvg(p Parameters, data Data) (result float64)
- func NormaliseContinuousData(data [][]float64, minArray, maxArray [][]float64, p *Parameters) [][]float64
- func NormaliseContinuousDataByColumn(data [][]float64, p *Parameters) [][]float64
- func UIContinuousAvg(p Parameters, data Data) float64
- type CfgT
- type Data
- type DataDiscretised
- type Output
- func (o *Output) CreateBins()
- func (o *Output) CreateContinuous()
- func (o *Output) CreateData()
- func (o *Output) CreateDataFile()
- func (o *Output) CreateDataIndices()
- func (o *Output) CreateDomainAFile()
- func (o *Output) CreateDomainFile()
- func (o *Output) CreateDomainSFile()
- func (o *Output) CreateDomainWFile()
- func (o *Output) CreateMeasure()
- func (o *Output) CreateMeasureDiscrete()
- func (o *Output) CreateMinMax()
- func (o *Output) CreateResults()
- func (o *Output) CreateW2W1A1()
- func (o *Output) CreateW2W1S1A1()
- func (o Output) ExportJSON(filename string)
- func (o *Output) SetABins(bins []int)
- func (o *Output) SetAFile(name string)
- func (o *Output) SetAIndices(indices []int)
- func (o *Output) SetAvgResult(r float64)
- func (o *Output) SetContinuousMode(mode int)
- func (o *Output) SetDate()
- func (o *Output) SetDomainAMinMax(min, max []float64)
- func (o *Output) SetDomainName(name string)
- func (o *Output) SetDomainSMinMax(min, max []float64)
- func (o *Output) SetDomainWMinMax(min, max []float64)
- func (o *Output) SetGlobalBins(bins int)
- func (o *Output) SetGlobalFile(name string)
- func (o *Output) SetIterations(iterations int)
- func (o *Output) SetK(k int)
- func (o *Output) SetName(name string)
- func (o *Output) SetNormalisation(min, max []float64)
- func (o *Output) SetParameters(p Parameters)
- func (o *Output) SetPointWiseResult(r []float64)
- func (o *Output) SetSBins(bins []int)
- func (o *Output) SetSFile(name string)
- func (o *Output) SetSIndices(indices []int)
- func (o *Output) SetUseContinuous(b bool)
- func (o *Output) SetUseStateDependent(b bool)
- func (o *Output) SetW2W1A1Normalised(data [][]float64)
- func (o *Output) SetW2W1A1Raw(data [][]float64)
- func (o *Output) SetW2W1S1A1Normalised(data [][]float64)
- func (o *Output) SetW2W1S1A1Raw(data [][]float64)
- func (o *Output) SetWBins(bins []int)
- func (o *Output) SetWFile(name string)
- func (o *Output) SetWIndices(indices []int)
- type OutputBins
- type OutputData
- type OutputDataFile
- type OutputDataIndices
- type OutputDataRawNormalised
- type OutputDomainFile
- type OutputMeasure
- type OutputMeasureContinuous
- type OutputMeasureDiscrete
- type OutputMinMax
- type OutputResult
- type Parameters
- func (p *Parameters) CheckParameters()
- func (p Parameters) GenerateString(prefix string) string
- func (p *Parameters) SetABins(aBins string)
- func (p *Parameters) SetAFile(file string)
- func (p *Parameters) SetAIndices(wIndices string)
- func (p *Parameters) SetAMinMax(min []float64, max []float64)
- func (p *Parameters) SetConfigFile(file string)
- func (p *Parameters) SetContinuousMode(cm int)
- func (p *Parameters) SetDFile(file string)
- func (p *Parameters) SetGlobalBins(bins int)
- func (p *Parameters) SetGlobalFile(file string)
- func (p *Parameters) SetIterations(iterations int)
- func (p *Parameters) SetK(k int)
- func (p *Parameters) SetLogData(log bool)
- func (p *Parameters) SetMeasureName(name string)
- func (p *Parameters) SetOutput(output string)
- func (p *Parameters) SetSBins(sBins string)
- func (p *Parameters) SetSFile(file string)
- func (p *Parameters) SetSIndices(wIndices string)
- func (p *Parameters) SetSMinMax(min []float64, max []float64)
- func (p *Parameters) SetUseContinuous(b bool)
- func (p *Parameters) SetUseSparseMatrix(b bool)
- func (p *Parameters) SetUseStateDependent(b bool)
- func (p *Parameters) SetVerbose(verbose bool)
- func (p *Parameters) SetWBins(wBins string)
- func (p *Parameters) SetWFile(file string)
- func (p *Parameters) SetWIndices(wIndices string)
- func (p *Parameters) SetWMinMax(min []float64, max []float64)
- func (p Parameters) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaContinuousAvg ¶
func CaContinuousAvg(p Parameters, data Data) float64
CaContinuousAvg returns the result of the quantification CA. This function also writes the result to a file as specified in the parameters p This function returns -1.0, because the quantification is not implemented based on entropy estimators for continuous state spaces yet.
func CalculateABins ¶
func CalculateABins(p Parameters, d Data) int
CalculateABins returns the number of bins for the actuator states depending on provided data
func CalculateSBins ¶
func CalculateSBins(p Parameters, d Data) int
CalculateSBins returns the number of bins for the sensor states depending on provided data
func CalculateWBins ¶
func CalculateWBins(p Parameters, d Data) int
CalculateWBins returns the number of bins for the world states depending on provided data
func CiContinuousAvg ¶
func CiContinuousAvg(p Parameters, data Data) float64
CiContinuousAvg returns the result of the quantification CI. This function also writes the result to a file as specified in the parameters p This function returns -1.0, because the quantification is not implemented based on entropy estimators for continuous state spaces yet.
func ContinuousAvgCalculations ¶
func ContinuousAvgCalculations(p Parameters, d Data) float64
ContinuousAvgCalculations returns the averaged morphological computation based on estimators for continuous data. Note that not all measures are available on continuous state spaces.
func ContinuousSDCalculations ¶
func ContinuousSDCalculations(p Parameters, d Data)
ContinuousSDCalculations returns the value of the selected continuous measure state-dependent (or point-wise)
func DiscreteAvgCalculations ¶
func DiscreteAvgCalculations(p Parameters, d Data)
DiscreteAvgCalculations ...
func DiscreteAvgCalculationsSparse ¶
func DiscreteAvgCalculationsSparse(p Parameters, d Data)
DiscreteAvgCalculationsSparse ...
func DiscreteSDCalculations ¶
func DiscreteSDCalculations(p Parameters, d Data)
DiscreteSDCalculations ...
func DiscreteSDCalculationsSparse ¶
func DiscreteSDCalculationsSparse(p Parameters, d Data)
DiscreteSDCalculationsSparse ...
func MakeA1S1Discrete ¶
func MakeA1S1Discrete(d Data, p Parameters) [][]int
MakeA1S1Discrete returns a slice with (a,s) The retuned slice has two columns.
func MakePA1S1 ¶
func MakePA1S1(d Data, p Parameters) [][]float64
MakePA1S1 return the joint distribution p(a,s)
func MakePA1S1Sparse ¶
func MakePA1S1Sparse(d Data, p Parameters) sm.SparseMatrix
MakePA1S1Sparse return the joint distribution p(a,s)
func MakePS2S1A1 ¶
func MakePS2S1A1(d Data, p Parameters) [][][]float64
MakePS2S1A1 return the joint distribution p(s',s,a)
func MakePW2A1 ¶
func MakePW2A1(d Data, p Parameters) [][]float64
MakePW2A1 return the joint distribution p(w',a)
func MakePW2A1W1 ¶
func MakePW2A1W1(d Data, p Parameters) [][][]float64
MakePW2A1W1 return the joint distribution p(w',a,w)
func MakePW2A1W1Sparse ¶
func MakePW2A1W1Sparse(d Data, p Parameters) sm.SparseMatrix
MakePW2A1W1Sparse return the joint distribution p(w',a,w)
func MakePW2W1 ¶
func MakePW2W1(d Data, p Parameters) [][]float64
MakePW2W1 return the joint distribution p(w',w)
func MakePW2W1A1 ¶
func MakePW2W1A1(d Data, p Parameters) [][][]float64
MakePW2W1A1 returns the joint distribution p(w',w,a)
func MakePW2W1A1Sparse ¶
func MakePW2W1A1Sparse(d Data, p Parameters) sm.SparseMatrix
MakePW2W1A1Sparse returns the joint distribution p(w',w,a) as SparseMatrix
func MakePW2W1S1 ¶
func MakePW2W1S1(d Data, p Parameters) [][][]float64
MakePW2W1S1 return the joint distribution p(w',w,s)
func MakePW2W1Sparse ¶
func MakePW2W1Sparse(d Data, p Parameters) sm.SparseMatrix
MakePW2W1Sparse return the joint distribution p(w',w)
func MakeS2S1A1Discrete ¶
func MakeS2S1A1Discrete(d Data, p Parameters) [][]int
MakeS2S1A1Discrete returns a slice with (s',s,a) The retuned slice has three columns.
func MakeW2A1Discrete ¶
func MakeW2A1Discrete(d Data, p Parameters) [][]int
MakeW2A1Discrete returns a slice with (w',a) The retuned slice has two columns.
func MakeW2A1W1Discrete ¶
func MakeW2A1W1Discrete(d Data, p Parameters) [][]int
MakeW2A1W1Discrete returns a slice with (w',a,w). The retuned slice has three columns.
func MakeW2W1A1 ¶
MakeW2W1A1 returns a slice with (w',w,a) and list of indices, which indicate which columns contain which information
func MakeW2W1A1Discrete ¶
func MakeW2W1A1Discrete(d Data, p Parameters) [][]int
MakeW2W1A1Discrete returns a slice with (w',w,s,a). The retuned slice has four columns.
func MakeW2W1Discrete ¶
func MakeW2W1Discrete(d Data, p Parameters) [][]int
MakeW2W1Discrete returns a slice with (w',w). The retuned slice has two columns.
func MakeW2W1S1 ¶
MakeW2W1S1 returns a slice with (w',w,s) and list of indices, which indicate which columns contain which information
func MakeW2W1S1A1 ¶
MakeW2W1S1A1 returns a slice with (w',w,s,a) and list of indices, which indicate which columns contain which information
func MakeW2W1S1Discrete ¶
func MakeW2W1S1Discrete(d Data, p Parameters) [][]int
MakeW2W1S1Discrete returns a slice with (w',w,s) The retuned slice has three columns.
func MiAContinuousAvg ¶
func MiAContinuousAvg(p Parameters, data Data) (result float64)
MiAContinuousAvg returns the result of the quantification MI_A. This function also writes the result to a file as specified in the parameters p
MI_A = I(W';A|W)
func MiAPrimeContinuousAvg ¶
func MiAPrimeContinuousAvg(p Parameters, data Data) float64
MiAPrimeContinuousAvg returns the result of the quantification MI_A'. This function also writes the result to a file as specified in the parameters p
MI_A' = 1 - I(W';A|W)/log|W|
func MiCaContinuousAvg ¶
func MiCaContinuousAvg(p Parameters, data Data) (result float64)
MiCaContinuousAvg returns the result of the quantification MI_CA. This function also writes the result to a file as specified in the parameters p
MI_CA = I(W';W) - I(W';A)
func MiInContinuousAvg ¶
func MiInContinuousAvg(p Parameters, data Data) float64
MiInContinuousAvg returns the result of the quantification MI_IN. This function also writes the result to a file as specified in the parameters p
MI_IN = log|A| - I(A;S)
This function returns -1.0, because the quantification is not implemented based on entropy estimators for continuous state spaces yet.
func MiMiContinuousAvg ¶
func MiMiContinuousAvg(p Parameters, data Data) (result float64)
MiMiContinuousAvg returns the result of the quantification MI_MI. This function also writes the result to a file as specified in the parameters p
MI_MI = I(W';W) - I(A;S)
func MiSyContinuousAvg ¶
func MiSyContinuousAvg(p Parameters, data Data) float64
MiSyContinuousAvg returns the result of the quantification MI_SY. This function also writes the result to a file as specified in the parameters p This function returns -1.0, because the quantification is not implemented based on entropy estimators for continuous state spaces yet.
func MiWContinuousAvg ¶
func MiWContinuousAvg(p Parameters, data Data) (result float64)
MiWContinuousAvg returns the result of the quantification MI_W. This function also writes the result to a file as specified in the parameters p
MI_W = I(W';W|A)
func MiWaContinuousAvg ¶
func MiWaContinuousAvg(p Parameters, data Data) (result float64)
MiWaContinuousAvg returns the result of the quantification MI_WA. This function also writes the result to a file as specified in the parameters p
MI_WA = I(W;{W,A}) - I(W';A)
func MiWpContinuousAvg ¶
func MiWpContinuousAvg(p Parameters, data Data) float64
MiWpContinuousAvg returns the result of the quantification MI_Wp. This function also writes the result to a file as specified in the parameters p This function returns -1.0, because the quantification is not implemented based on entropy estimators for continuous state spaces yet.
func MiWsContinuousAvg ¶
func MiWsContinuousAvg(p Parameters, data Data) (result float64)
MiWsContinuousAvg returns the result of the quantification MI_WS. This function also writes the result to a file as specified in the parameters p
MI_WS = I(W;{W,S}) - I(W';S)
func NormaliseContinuousData ¶
func NormaliseContinuousData(data [][]float64, minArray, maxArray [][]float64, p *Parameters) [][]float64
NormaliseContinuousData ...
func NormaliseContinuousDataByColumn ¶
func NormaliseContinuousDataByColumn(data [][]float64, p *Parameters) [][]float64
NormaliseContinuousDataByColumn ...
func UIContinuousAvg ¶
func UIContinuousAvg(p Parameters, data Data) float64
UIContinuousAvg returns the result of the quantification UI. This function also writes the result to a file as specified in the parameters p This function returns -1.0, because the quantification is not implemented based on entropy estimators for continuous state spaces yet.
Types ¶
type CfgT ¶
type CfgT struct { Measure string `yaml:"Measure"` Continuous bool `yaml:"Continuous"` ContinuousMode int `yaml:"Continuous mode"` UseState bool `yaml:"State-dependent"` Verbose bool `yaml:"Verbose"` Bins int `yaml:"Bins"` Iterations int `yaml:"Iterations"` K int `yaml:"k"` Output string `yaml:"Output file"` WBins string `yaml:"W Bins"` ABins string `yaml:"A Bins"` SBins string `yaml:"S Bins"` WIndices string `yaml:"W Indices"` AIndices string `yaml:"A Indices"` SIndices string `yaml:"S Indices"` File string `yaml:"Full data file"` WFile string `yaml:"W data file"` AFile string `yaml:"A data file"` SFile string `yaml:"S data file"` DFile string `yaml:"Domain file"` }
CfgT ...
type Data ¶
type Data struct { W [][]float64 S [][]float64 A [][]float64 Discretised DataDiscretised }
Data contains the raw data an the discretised data (if discrete measure are used)
func (*Data) Discretise ¶
func (d *Data) Discretise(p Parameters)
Discretise discretises the available data and stores in the in the Discretised portion of the struct
func (*Data) Read ¶
func (d *Data) Read(p Parameters)
type DataDiscretised ¶
DataDiscretised is container for the discretised data
type Output ¶
type Output struct { Date *string `json:"date,omitempty"` Measure *OutputMeasure `json:"measure,omitempty"` Result *OutputResult `json:"result,omitempty"` Data *OutputData `json:"data,omitempty"` W2W1A1 *OutputDataRawNormalised `json:"w2w1a1,omitempty"` W2W1S1A1 *OutputDataRawNormalised `json:"w2w1s1a1,omitempty"` }
Output is the JSON struct that will be exported as result of gomi
func (*Output) CreateMeasureDiscrete ¶
func (o *Output) CreateMeasureDiscrete()
CreateMeasureDiscrete ...
func (*Output) SetContinuousMode ¶
SetContinuousMode ...
func (*Output) SetDomainAMinMax ¶
SetDomainAMinMax ...
func (*Output) SetDomainSMinMax ¶
SetDomainSMinMax ...
func (*Output) SetDomainWMinMax ¶
SetDomainWMinMax ...
func (*Output) SetNormalisation ¶
SetNormalisation ...
func (*Output) SetParameters ¶
func (o *Output) SetParameters(p Parameters)
SetParameters copies from Parameters
func (*Output) SetPointWiseResult ¶
SetPointWiseResult sets the name
func (*Output) SetUseContinuous ¶
SetUseContinuous sets the name
func (*Output) SetUseStateDependent ¶
SetUseStateDependent sets the name
func (*Output) SetW2W1A1Normalised ¶
SetW2W1A1Normalised ...
func (*Output) SetW2W1S1A1Normalised ¶
SetW2W1S1A1Normalised ...
func (*Output) SetW2W1S1A1Raw ¶
SetW2W1S1A1Raw ...
type OutputBins ¶
type OutputBins struct { W *[]int `json:"w,omitempty"` S *[]int `json:"s,omitempty"` A *[]int `json:"a,omitempty"` Global *int `json:"global,omitempty"` }
OutputBins ...
type OutputData ¶
type OutputData struct { File *OutputDataFile `json:"file,omitempty"` Indices *OutputDataIndices `json:"indices,omitempty"` }
OutputData ...
type OutputDataFile ¶
type OutputDataFile struct { Global *string `json:"global,omitempty"` W *string `json:"world,omitempty"` S *string `json:"sensors,omitempty"` A *string `json:"actuators,omitempty"` Domain *OutputDomainFile `json:"domain,omitempty"` }
OutputDataFile ...
type OutputDataIndices ¶
type OutputDataIndices struct { W *[]int `json:"world,omitempty"` S *[]int `json:"sensors,omitempty"` A *[]int `json:"actuators,omitempty"` }
OutputDataIndices ...
type OutputDataRawNormalised ¶
type OutputDataRawNormalised struct { Raw *[][]float64 `json:"raw,omitempty"` Normalised *[][]float64 `json:"normalised,omitempty"` }
OutputDataRawNormalised ...
type OutputDomainFile ¶
type OutputDomainFile struct { Name *string `json:"name,omitempty"` World *OutputMinMax `json:"world,omitempty"` Sensor *OutputMinMax `json:"sensors,omitempty"` Actuator *OutputMinMax `json:"actuators,omitempty"` }
OutputDomainFile ...
type OutputMeasure ¶
type OutputMeasure struct { Name *string `json:"name,omitempty"` UseContinuous *bool `json:"useContinuous,omitempty"` UseStateDependent *bool `json:"stateDependent,omitempty"` Continuous *OutputMeasureContinuous `json:"continuous,omitempty"` Discrete *OutputMeasureDiscrete `json:"discrete,omitempty"` }
OutputMeasure ...
type OutputMeasureContinuous ¶
type OutputMeasureContinuous struct { Mode *int `json:"mode,omitempty"` K *int `json:"k,omitempty"` Normalisation *OutputMinMax `json:"normalisation,omitempty"` }
OutputMeasureContinuous ...
type OutputMeasureDiscrete ¶
type OutputMeasureDiscrete struct { Iterations *int `json:"iterations,omitempty"` Bins *OutputBins `json:"bins,omitempty"` }
OutputMeasureDiscrete ...
type OutputMinMax ¶
type OutputMinMax struct { Min *[]float64 `json:"min,omitempty"` Max *[]float64 `json:"max,omitempty"` }
OutputMinMax ...
type OutputResult ¶
type OutputResult struct { Average *float64 `json:"averaged,omitempty"` PointWise *[]float64 `json:"point-wise,omitempty"` }
OutputResult ...
type Parameters ¶
type Parameters struct { MeasureName string Output string ConfigFile string UseContinuous bool UseStateDependent bool Verbose bool LogData bool UseSparseMatrix bool ContinuousMode int K int GlobalBins int Iterations int WBins []int SBins []int ABins []int GlobalFile string WIndices []int SIndices []int AIndices []int WFile string SFile string AFile string DFile string WorldMin []float64 SensorMin []float64 ActuatorMin []float64 WorldMax []float64 SensorMax []float64 ActuatorMax []float64 NormalisationMin []float64 NormalisationMax []float64 }
Parameters ...
func CreateParametersContainer ¶
func CreateParametersContainer() Parameters
CreateParametersContainer ...
func (*Parameters) CheckParameters ¶
func (p *Parameters) CheckParameters()
CheckParameters checks for the sanity of the command line parameters
func (Parameters) GenerateString ¶
func (p Parameters) GenerateString(prefix string) string
GenerateString ...
func (*Parameters) SetAMinMax ¶
func (p *Parameters) SetAMinMax(min []float64, max []float64)
SetAMinMax ...
func (*Parameters) SetContinuousMode ¶
func (p *Parameters) SetContinuousMode(cm int)
SetContinuousMode ...
func (*Parameters) SetGlobalFile ¶
func (p *Parameters) SetGlobalFile(file string)
SetGlobalFile ...
func (*Parameters) SetIterations ¶
func (p *Parameters) SetIterations(iterations int)
SetIterations ...
func (*Parameters) SetMeasureName ¶
func (p *Parameters) SetMeasureName(name string)
SetMeasureName set the name of the measure to use, if
func (*Parameters) SetSMinMax ¶
func (p *Parameters) SetSMinMax(min []float64, max []float64)
SetSMinMax ...
func (*Parameters) SetUseContinuous ¶
func (p *Parameters) SetUseContinuous(b bool)
SetUseContinuous ...
func (*Parameters) SetUseSparseMatrix ¶
func (p *Parameters) SetUseSparseMatrix(b bool)
SetUseSparseMatrix ...
func (*Parameters) SetUseStateDependent ¶
func (p *Parameters) SetUseStateDependent(b bool)
SetUseStateDependent ...
func (*Parameters) SetWMinMax ¶
func (p *Parameters) SetWMinMax(min []float64, max []float64)
SetWMinMax ...