features

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package features provides a feature store for the Wolf time-series ML platform. It supports offline CSV loading and online ring-buffer ingestion with point-in-time correctness guarantees (no future data leakage).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeatureStore

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

FeatureStore manages offline (CSV-loaded) and online (ring-buffer) feature data per asset, enforcing point-in-time correctness on reads.

func NewFeatureStore

func NewFeatureStore() *FeatureStore

NewFeatureStore creates a FeatureStore ready for use.

func (*FeatureStore) GetFeatures

func (fs *FeatureStore) GetFeatures(asset string, asOf time.Time) ([]Tick, error)

GetFeatures returns all ticks for the asset with timestamp <= asOf, combining offline and online data in time order. This enforces point-in-time correctness: no future data is ever returned.

func (*FeatureStore) LoadOffline

func (fs *FeatureStore) LoadOffline(asset, csvPath string, start, end time.Time) error

LoadOffline reads a CSV file with columns: timestamp, f1, f2, ... and stores rows whose timestamp falls within [start, end]. Timestamps must be in RFC3339 format.

func (*FeatureStore) UpdateOnline

func (fs *FeatureStore) UpdateOnline(asset string, tick Tick) error

UpdateOnline appends a tick to the asset's ring buffer. The buffer evicts the oldest entry when it reaches capacity (500).

type Tick

type Tick struct {
	Timestamp time.Time
	Features  []float64
}

Tick represents a single timestamped feature vector.

Jump to

Keyboard shortcuts

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