Help us shape the future of Go! Take the 2026 Go Developer Survey

aucspec

package
v1.0.0-alpha.21 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package aucspec holds AGG_AUC's configuration rules, shared by the runtime constructor (internal/processing) and predict (internal/descriptor) so the two refuse the same request with the same code, message and details by construction.

It is a leaf: it imports only the public errors / encoding / types packages and internal/fieldaccept, never internal/processing or internal/service, so internal/descriptor may import it without breaking TestPredictNoExecutionImports.

Index

Constants

Name is the operator's wire name.

Variables

This section is empty.

Functions

func ConfigError

func ConfigError(field string, p Params, schema *encoding.Schema) error

ConfigError is the slot's configuration refusal, in the runtime constructor's order: a missing outcome, a positive other than 0 / 1, then the accepted-types table on the score (field) and the outcome. A name the schema does not carry is the field-reference rule's refusal, never this one's; a nil schema judges no type.

func NotBinary

func NotBinary(outcome string, value float64) error

NotBinary is the run-time refusal of an outcome value other than 0 or 1 (NaN included). Predict cannot raise it: it reads no record. A non-finite value is null in details (JSON has no NaN); the message names it.

Types

type Params

type Params struct {
	// Outcome names the binary outcome column (0/1 numeric or
	// packed_bool). Required.
	Outcome string `json:"outcome"`
	// Positive is the outcome value counted as the event: 0 or 1,
	// default 1.
	Positive *float64 `json:"positive,omitempty"`
}

Params is AGG_AUC's typed params decode. Both sides decode into this one type, so a decode error quotes the same Go type on both.

func (Params) PositiveValue

func (p Params) PositiveValue() float64

PositiveValue is the event value: params.positive, or 1.

Jump to

Keyboard shortcuts

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