model

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: MIT Imports: 21 Imported by: 0

README

pip install -r requirements.txt
pip install pystan==2.19.1.1
pip install prophet==1.0.1

Documentation

Index

Constants

View Source
const TypeProphet = "Prophet"
View Source
const TypeTangram = "Tangram"

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column string
const (
	Yhat      Column = "yhat"
	YhatUpper Column = "yhat_upper"
	YhatLower Column = "yhat_lower"
)

type Forecast

type Forecast struct {
	Timestamp int64
	Values    map[Column]float64
}

func (Forecast) IsZero

func (f Forecast) IsZero() bool

type Forecasts

type Forecasts []Forecast

func (Forecasts) Nearest

func (f Forecasts) Nearest(timestamp int64) Forecast

type Prophet

type Prophet struct {
	// contains filtered or unexported fields
}

func NewProphet

func NewProphet(cf *config.Config, lg *zap.Logger) Prophet

func (Prophet) Train

func (p Prophet) Train(ctx context.Context, data prom.Metric, duration time.Duration) (Forecasts, error)

type Server added in v0.5.0

type Server struct {
	// contains filtered or unexported fields
}

func NewServer added in v0.5.0

func NewServer(lg *zap.Logger, sig chan os.Signal) Server

func (Server) Start added in v0.5.0

func (s Server) Start(ctx context.Context) func() error

type Tangram added in v0.6.0

type Tangram struct {
	// contains filtered or unexported fields
}

func NewTangram added in v0.6.0

func NewTangram(lg *zap.Logger) Tangram

func (Tangram) Train added in v0.6.0

func (t Tangram) Train(ctx context.Context, data prom.Metric, duration time.Duration) (Forecasts, error)

type Trainer

type Trainer interface {
	Train(context.Context, prom.Metric, time.Duration) (Forecasts, error)
}

func New

func New(cf *config.Config, lg *zap.Logger, name string) (Trainer, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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