Documentation ¶
Index ¶
- type Context
- func (ctx *Context) GetAccountQuality(acc *models.Account, window int) (float64, error)
- func (ctx *Context) GetRecordingLabels(recID string, opener int, closer int, threshold float64, ...) (sort.StringSlice, error)
- func (ctx *Context) Init() error
- func (ctx *Context) UpdateAccountQualities(window int) error
- func (ctx *Context) WriteCSV(threshold float64, output string, window int) error
- type RollingMCC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Db *gorm.DB System *models.Benchmark // bluwhaze reference benchmarks Accounts *models.Benchmark // user mapped benchmarks AccountQuality *models.AccountQuality }
Context wraps the database connection and other useful resources
func (*Context) GetAccountQuality ¶
GetAccountQuality gets the feedback quality for a user requires that ctx.System is initialized
func (*Context) GetRecordingLabels ¶
func (ctx *Context) GetRecordingLabels(recID string, opener int, closer int, threshold float64, rb *models.RecordingLabelsTree) (sort.StringSlice, error)
GetRecordingLabels gets the corrected labels for a given recording ID and time window
Assumes ctx.AccountQuality is set.
func (*Context) Init ¶
Init initializes the context required for many benchmark actions with data from the database
func (*Context) UpdateAccountQualities ¶
UpdateAccountQualities sets all accounts feedback
Click to show internal directories.
Click to hide internal directories.