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

stats

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultQuantiles = []float64{0.01, 0.10, 0.50, 0.90, 0.99}

Functions

func AggregateStats

func AggregateStats(list []EpisodeStats) map[string]map[string]any

func ToJSONSerializable

func ToJSONSerializable(stats map[string]map[string]any) map[string]map[string]any

Types

type EpisodeInput

type EpisodeInput struct {
	Columns    map[string]any
	FramePaths map[string][]string
	FrameBytes map[string][][]byte
}

type EpisodeStats

type EpisodeStats map[string]FeatureStats

func ComputeEpisodeStats

func ComputeEpisodeStats(in EpisodeInput, features map[string]FeatureDesc, opts Options) EpisodeStats

func SanitizeEpisodeStats added in v1.1.0

func SanitizeEpisodeStats(ep EpisodeStats) EpisodeStats

SanitizeEpisodeStats replaces non-finite floats so JSON encoding succeeds.

type FeatureDesc

type FeatureDesc struct {
	DType string
	Shape []int
}

type FeatureStats

type FeatureStats map[string]any

type ImageStat311

type ImageStat311 [][][]float64

ImageStat311 is the (3,1,1) nested layout used by LeRobot image/video stats.

func ImageStat311FromChannels

func ImageStat311FromChannels(ch []float64) ImageStat311

func (ImageStat311) Channels

func (s ImageStat311) Channels() []float64

type Mode

type Mode int

Mode controls how image/video statistics are computed.

const (
	// ModeSampled matches official compute_episode_stats (estimate_num_samples heuristic).
	ModeSampled Mode = iota
	// ModeFull uses every frame path when computing image/video statistics.
	ModeFull
)

type Options

type Options struct {
	Mode Mode
}

Jump to

Keyboard shortcuts

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