Documentation
¶
Index ¶
- type Model
- func (g *Model) Clear()
- func (g *Model) Dim() int
- func (g *Model) Estimate() error
- func (g *Model) LogProb(obs model.Obs) float64
- func (g *Model) Name() string
- func (g *Model) Predict(x model.Observer) ([]model.Labeler, error)
- func (g *Model) Sample(r *rand.Rand) model.Obs
- func (g *Model) SampleChan(r *rand.Rand, size int) <-chan model.Obs
- func (g *Model) String() string
- func (g *Model) ToJSON() (string, error)
- func (g *Model) Update(x model.Observer, w func(model.Obs) float64) error
- func (g *Model) UpdateOne(o model.Obs, w float64)
- func (g *Model) Write(w io.Writer) error
- func (g *Model) WriteFile(fn string) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct { Type string `json:"type"` ModelName string `json:"name,omitempty"` ModelDim int `json:"dim"` NSamples float64 `json:"nsamples"` Diag bool `json:"diag"` Sumx []float64 `json:"sumx,omitempty"` Sumxsq []float64 `json:"sumx_sq,omitempty"` Mean []float64 `json:"mean"` StdDev []float64 `json:"sd"` // contains filtered or unexported fields }
Model is a multivariate Gaussian distribution.
func (*Model) SampleChan ¶
SampleChan returns a channel with "size" samples drawn from the model. The sequence ends when the channel closes.
Click to show internal directories.
Click to hide internal directories.