moon-online-models

    A native MoonBit toolkit for online learning, sparse and dense models, streaming features, evaluation, monitoring, serving, and reproducible model lifecycle workflows.

    machine-learning
    regression
    online-learning
    incremental-learning
    classification
    streaming-data
    model-monitoring
    moonbit
    Download zip
    Author
    Version
    0.2.3
    License
    Apache-2.0
    Last updated
    2 months ago
    Downloads
    40

    No dependencies

    #moon-online-models

    moon-online-models is a native MoonBit toolkit for machine learning on streaming data. It provides online models, incremental feature processing, evaluation metrics, monitoring utilities, and deployment primitives for use cases such as CTR prediction, risk scoring, device telemetry, ranking, and real-time forecasting.

    The library is designed for event-by-event updates, bounded state, explicit validation, deterministic experiments, and compilation to MoonBit-supported targets.

    #Core capabilities

    #Online learning

    • RLS, SGD/FTRL logistic regression, Adagrad, ridge, Huber, and quantile regression.
    • Softmax regression, Gaussian and Bernoulli Naive Bayes, online k-means, kernel models, PCA, factorization, tree stumps, ensembles, and time-series models.
    • Epsilon-greedy, UCB, softmax, posterior, and contextual bandits with deterministic exploration and online reward evaluation.

    #Streaming data and features

    • Dense and sparse vectors with dimension-safe operations.
    • Feature hashing, categorical encoding, CSV parsing, feature crosses, and polynomial features.
    • Online joins, rolling windows, reservoirs, stratified sampling, bootstrap counters, schema validation, and bounded feature storage.
    • Typed data contracts, missing-value policies, idempotency ledgers, online graph/co-occurrence models, and user-item recommendation primitives.

    #Evaluation and reliability

    • Exact and histogram AUC, calibration, regression, ranking, CTR, and confusion-matrix metrics.
    • Conformal intervals, drift detection, fairness diagnostics, cost-sensitive thresholds, gradient guards, and prediction guards.
    • Snapshots with checksums, model registries, deployment state transitions, canary experiments, serving batchers, alerts, error budgets, audit trails, data lineage, privacy budgets, and reproducibility manifests.
    • Model routing with health-aware fallbacks and score caches, Holt-Winters and intermittent-demand forecasts, adaptive histograms, streaming stump ensembles, and reliability/conformal calibration monitors.

    #Quick start

    Add the package to a MoonBit project:

    moon add phjphj676/moon-online-models

    Create and update a dense online classifier:

    let model = @moon-online-models.AdagradLogisticRegression::new(
    3,
    learning_rate=0.1,
    )
    model.update([1.0, 0.0, 0.2], 1.0)
    model.update([0.0, 1.0, -0.2], 0.0)
    let probability = model.predict([1.0, 0.0, 0.2])

    Use sparse hashed features for high-cardinality event data:

    let hasher = @moon-online-models.FeatureHasher::new(1_000_000)
    let features = hasher.encode(["country=CN", "device=mobile", "slot=home"])
    let model = @moon-online-models.SparseAdagradClassifier::new(1_000_000)
    model.update(features, 1.0)
    let probability = model.predict(features)

    #CLI and reproducible commands

    The repository includes a native benchmark command under cmd/benchmark and a PowerShell wrapper under benchmarks/run.ps1.

    moon version --all moon update moon check --target all moon test --target all moon run --target native cmd/benchmark

    On Windows, the wrapper records the benchmark wall-clock time:

    .\benchmarks\run.ps1

    Formatting and generated-interface checks:

    moon fmt && git diff --exit-code moon info && git diff --exit-code

    #Architecture

    moon-online-models/ ├── *.mbt Core models and streaming primitives ├── production_extensions_test.mbt Boundary and behavior coverage ├── cmd/benchmark/ Native reproducible benchmark command ├── benchmarks/ Runner, methodology, and measured results └── .github/workflows/ Cross-platform checks and package publishing

    The root package is dependency-light and uses MoonBit core packages for math and JSON support. Algorithms expose explicit counters, reset operations, and dimension-safe boundaries so they can be embedded in long-running streams.

    #Benchmark

    The benchmark trains an AdagradLogisticRegression model on 20,000 deterministic events and reports update count, exact AUC, final weight norm, and a stable weight checksum. The latest measured reference is maintained in benchmarks/RESULTS.md; elapsed time is hardware- and runtime-dependent.

    #Tests

    The black-box suite covers empty inputs, dimension mismatches, out-of-range indices, non-finite values, sparse features, CSV quoting, metric degeneracy, bounded capacities, drift detection, feature storage, serving, deployment, audit logging, and cost-sensitive decisions.

    Run all configured targets with:

    moon test --target all

    #CI

    GitHub Actions installs the current stable MoonBit toolchain and checks Ubuntu, macOS, and Windows. Each job runs moon version --all, moon update, moon check --target all, moon test --target all, moon fmt, and moon info. The publishing workflow is manual and runs the same prepublish checks before calling moon publish.

    #Package and license

    OnlineLearner

    pub trait OnlineLearner {
    fn update(Self, Array[Double], Double) -> Unit
    fn predict(Self, Array[Double]) -> Double
    }

    A trait for online learning models that can be incrementally updated.

    Snapshot

    pub trait Snapshot {
    fn to_bytes(Self) -> Bytes
    fn from_bytes(Self, Bytes) -> Bool
    }

    A trait for models that support saving and loading state.

    AdagradLinearRegression

    pub struct AdagradLinearRegression {
    weights : Array[Double]
    accumulator : Array[Double]
    learning_rate : Double
    epsilon : Double
    l2 : Double
    steps : Int
    }

    A linear regressor with Adagrad updates, useful when labels are continuous and the stream has heterogeneous feature scales.

    AdagradLinearRegression::dimension

    AdagradLinearRegression::loss

    fn AdagradLinearRegression::loss(self : AdagradLinearRegression, features : Array[Double], label : Double) -> Double

    AdagradLinearRegression::new

    fn AdagradLinearRegression::new(dimension : Int, learning_rate? : Double, epsilon? : Double, l2? : Double) -> AdagradLinearRegression

    AdagradLinearRegression::predict

    fn AdagradLinearRegression::predict(self : AdagradLinearRegression, features : Array[Double]) -> Double

    AdagradLinearRegression::reset

    AdagradLinearRegression::residual

    fn AdagradLinearRegression::residual(self : AdagradLinearRegression, features : Array[Double], label : Double) -> Double

    AdagradLinearRegression::steps

    AdagradLinearRegression::update

    fn AdagradLinearRegression::update(self : AdagradLinearRegression, features : Array[Double], label : Double) -> Unit

    AdagradLinearRegression::weights

    AdagradLogisticRegression

    pub struct AdagradLogisticRegression {
    weights : Array[Double]
    accumulator : Array[Double]
    learning_rate : Double
    epsilon : Double
    l1 : Double
    l2 : Double
    steps : Int
    seen : Double
    }

    Online binary classifier trained with Adagrad and optional elastic-net regularization. It is a practical dense counterpart to FTRL for streams where feature values are dense but their scales change over time.

    AdagradLogisticRegression::accumulator

    fn AdagradLogisticRegression::accumulator(self : AdagradLogisticRegression) -> Array[Double]

    AdagradLogisticRegression::dimension

    AdagradLogisticRegression::feature_importance

    fn AdagradLogisticRegression::feature_importance(self : AdagradLogisticRegression) -> Array[Double]

    AdagradLogisticRegression::logit

    fn AdagradLogisticRegression::logit(self : AdagradLogisticRegression, features : Array[Double]) -> Double

    AdagradLogisticRegression::loss

    fn AdagradLogisticRegression::loss(self : AdagradLogisticRegression, features : Array[Double], label : Double) -> Double

    AdagradLogisticRegression::new

    fn AdagradLogisticRegression::new(dimension : Int, learning_rate? : Double, epsilon? : Double, l1? : Double, l2? : Double) -> AdagradLogisticRegression

    AdagradLogisticRegression::predict

    fn AdagradLogisticRegression::predict(self : AdagradLogisticRegression, features : Array[Double]) -> Double

    AdagradLogisticRegression::predict_label

    fn AdagradLogisticRegression::predict_label(self : AdagradLogisticRegression, features : Array[Double], threshold? : Double) -> Double

    AdagradLogisticRegression::regularization

    fn AdagradLogisticRegression::regularization(self : AdagradLogisticRegression) -> Double

    AdagradLogisticRegression::reset

    AdagradLogisticRegression::seen

    AdagradLogisticRegression::sparsity

    fn AdagradLogisticRegression::sparsity(self : AdagradLogisticRegression, tolerance? : Double) -> Double

    AdagradLogisticRegression::steps

    AdagradLogisticRegression::update

    fn AdagradLogisticRegression::update(self : AdagradLogisticRegression, features : Array[Double], label : Double) -> Unit

    AdagradLogisticRegression::update_weighted

    fn AdagradLogisticRegression::update_weighted(self : AdagradLogisticRegression, features : Array[Double], label : Double, sample_weight : Double) -> Unit

    AdagradLogisticRegression::weights

    AdagradOptimizer

    pub struct AdagradOptimizer {
    learning_rate : Double
    epsilon : Double
    schedule : LearningRateSchedule
    accumulator : Array[Double]
    clipper : GradientClipper
    step_count : Int
    statistics : OptimizerStatistics
    }

    AdagradOptimizer::accumulated

    fn AdagradOptimizer::accumulated(self : AdagradOptimizer) -> Array[Double]

    AdagradOptimizer::apply

    fn AdagradOptimizer::apply(self : AdagradOptimizer, parameters : Array[Double], gradients : Array[Double]) -> Unit

    AdagradOptimizer::dimension

    fn AdagradOptimizer::dimension(self : AdagradOptimizer) -> Int

    AdagradOptimizer::new

    fn AdagradOptimizer::new(dimension : Int, learning_rate? : Double, epsilon? : Double, schedule? : LearningRateSchedule, clipper? : GradientClipper) -> AdagradOptimizer

    AdagradOptimizer::rate

    fn AdagradOptimizer::rate(self : AdagradOptimizer) -> Double

    AdagradOptimizer::reset

    fn AdagradOptimizer::reset(self : AdagradOptimizer) -> Unit

    AdagradOptimizer::statistics

    AdagradOptimizer::step_count

    fn AdagradOptimizer::step_count(self : AdagradOptimizer) -> Int

    AdagradOptimizer::update

    fn AdagradOptimizer::update(self : AdagradOptimizer, gradients : Array[Double]) -> Array[Double]

    AdamOptimizer

    pub struct AdamOptimizer {
    learning_rate : Double
    beta1 : Double
    beta2 : Double
    epsilon : Double
    first_moment : Array[Double]
    second_moment : Array[Double]
    clipper : GradientClipper
    step_count : Int
    }

    AdamOptimizer::apply

    fn AdamOptimizer::apply(self : AdamOptimizer, parameters : Array[Double], gradients : Array[Double]) -> Unit

    AdamOptimizer::first_moment

    fn AdamOptimizer::first_moment(self : AdamOptimizer) -> Array[Double]

    AdamOptimizer::new

    fn AdamOptimizer::new(dimension : Int, learning_rate? : Double, beta1? : Double, beta2? : Double, epsilon? : Double, clipper? : GradientClipper) -> AdamOptimizer

    AdamOptimizer::reset

    fn AdamOptimizer::reset(self : AdamOptimizer) -> Unit

    AdamOptimizer::second_moment

    fn AdamOptimizer::second_moment(self : AdamOptimizer) -> Array[Double]

    AdamOptimizer::step_count

    fn AdamOptimizer::step_count(self : AdamOptimizer) -> Int

    AdamOptimizer::update

    fn AdamOptimizer::update(self : AdamOptimizer, gradients : Array[Double]) -> Array[Double]

    AdaptiveHistogram

    pub struct AdaptiveHistogram {
    lower : Double
    upper : Double
    bins : Array[HistogramBin]
    seen : Double
    outliers : Int
    }

    AdaptiveHistogram::bin

    fn AdaptiveHistogram::bin(self : AdaptiveHistogram, index : Int) -> HistogramBin?

    AdaptiveHistogram::bin_count

    fn AdaptiveHistogram::bin_count(self : AdaptiveHistogram) -> Int

    AdaptiveHistogram::cdf

    fn AdaptiveHistogram::cdf(self : AdaptiveHistogram, value : Double) -> Double

    AdaptiveHistogram::mean

    fn AdaptiveHistogram::mean(self : AdaptiveHistogram) -> Double

    AdaptiveHistogram::new

    fn AdaptiveHistogram::new(lower : Double, upper : Double, bin_count? : Int) -> AdaptiveHistogram

    AdaptiveHistogram::observe

    fn AdaptiveHistogram::observe(self : AdaptiveHistogram, value : Double, weight? : Double, positive? : Bool) -> Bool

    AdaptiveHistogram::outliers

    fn AdaptiveHistogram::outliers(self : AdaptiveHistogram) -> Int

    AdaptiveHistogram::positive_rate

    fn AdaptiveHistogram::positive_rate(self : AdaptiveHistogram) -> Double

    AdaptiveHistogram::quantile

    fn AdaptiveHistogram::quantile(self : AdaptiveHistogram, probability : Double) -> Double

    AdaptiveHistogram::reset

    fn AdaptiveHistogram::reset(self : AdaptiveHistogram) -> Unit

    AdaptiveHistogram::seen

    fn AdaptiveHistogram::seen(self : AdaptiveHistogram) -> Double

    AdaptiveHistogram::variance

    fn AdaptiveHistogram::variance(self : AdaptiveHistogram) -> Double

    AdaptiveThreshold

    pub struct AdaptiveThreshold {
    target_rate : Double
    histogram : AdaptiveHistogram
    threshold : Double
    updates : Int
    }

    AdaptiveThreshold::is_anomaly

    fn AdaptiveThreshold::is_anomaly(self : AdaptiveThreshold, value : Double) -> Bool

    AdaptiveThreshold::new

    fn AdaptiveThreshold::new(lower : Double, upper : Double, target_rate? : Double, bins? : Int) -> AdaptiveThreshold

    AdaptiveThreshold::observe

    fn AdaptiveThreshold::observe(self : AdaptiveThreshold, value : Double) -> Bool

    AdaptiveThreshold::reset

    fn AdaptiveThreshold::reset(self : AdaptiveThreshold) -> Unit

    AdaptiveThreshold::score

    fn AdaptiveThreshold::score(self : AdaptiveThreshold, value : Double) -> Double

    AdaptiveThreshold::target_rate

    fn AdaptiveThreshold::target_rate(self : AdaptiveThreshold) -> Double

    AdaptiveThreshold::threshold

    fn AdaptiveThreshold::threshold(self : AdaptiveThreshold) -> Double

    AdaptiveThreshold::updates

    fn AdaptiveThreshold::updates(self : AdaptiveThreshold) -> Int

    AggregateSummary

    pub struct AggregateSummary {
    start : Int64
    end : Int64
    count : Int
    weight : Double
    sum : Double
    square_sum : Double
    minimum : Double
    maximum : Double
    }

    AggregateSummary::count

    fn AggregateSummary::count(self : AggregateSummary) -> Int

    AggregateSummary::end

    fn AggregateSummary::end(self : AggregateSummary) -> Int64

    AggregateSummary::maximum

    fn AggregateSummary::maximum(self : AggregateSummary) -> Double

    AggregateSummary::mean

    fn AggregateSummary::mean(self : AggregateSummary) -> Double

    AggregateSummary::merge

    fn AggregateSummary::merge(self : AggregateSummary, other : AggregateSummary) -> Unit

    AggregateSummary::minimum

    fn AggregateSummary::minimum(self : AggregateSummary) -> Double

    AggregateSummary::new

    fn AggregateSummary::new(start : Int64, end : Int64) -> AggregateSummary

    AggregateSummary::observe

    fn AggregateSummary::observe(self : AggregateSummary, value : Double, weight? : Double) -> Bool

    AggregateSummary::reset

    fn AggregateSummary::reset(self : AggregateSummary) -> Unit

    AggregateSummary::start

    fn AggregateSummary::start(self : AggregateSummary) -> Int64

    AggregateSummary::sum

    fn AggregateSummary::sum(self : AggregateSummary) -> Double

    AggregateSummary::variance

    fn AggregateSummary::variance(self : AggregateSummary) -> Double

    AggregateSummary::weight

    fn AggregateSummary::weight(self : AggregateSummary) -> Double

    AlertCondition

    pub(all) enum AlertCondition {
    GreaterThan
    LessThan
    OutsideRange
    Stale
    } derive(Eq,
    Debug
    )

    AlertRule

    pub struct AlertRule {
    name : String
    metric : String
    condition : AlertCondition
    lower : Double
    upper : Double
    severity : AlertSeverity
    cooldown : Int64
    last_alert : Int64?
    }

    AlertRule::evaluate

    fn AlertRule::evaluate(self : AlertRule, snapshot : MetricSnapshot, now : Int64) -> Bool

    AlertRule::greater

    fn AlertRule::greater(name : String, metric : String, threshold : Double, severity? : AlertSeverity, cooldown? : Int64) -> AlertRule

    AlertRule::less

    fn AlertRule::less(name : String, metric : String, threshold : Double, severity? : AlertSeverity, cooldown? : Int64) -> AlertRule

    AlertRule::metric

    fn AlertRule::metric(self : AlertRule) -> String

    AlertRule::name

    fn AlertRule::name(self : AlertRule) -> String

    AlertRule::outside

    fn AlertRule::outside(name : String, metric : String, lower : Double, upper : Double, severity? : AlertSeverity, cooldown? : Int64) -> AlertRule

    AlertRule::reset

    fn AlertRule::reset(self : AlertRule) -> Unit

    AlertRule::severity

    fn AlertRule::severity(self : AlertRule) -> AlertSeverity

    AlertRule::stale

    fn AlertRule::stale(name : String, metric : String, max_age : Int64, severity? : AlertSeverity) -> AlertRule

    AlertSeverity

    pub(all) enum AlertSeverity {
    Info
    Warn
    Critical
    } derive(Eq,
    Debug
    )

    ArmStatistics

    pub struct ArmStatistics {
    arm : Int
    pulls : Int
    reward_sum : Double
    reward_square_sum : Double
    last_reward : Double
    }

    ArmStatistics::arm

    fn ArmStatistics::arm(self : ArmStatistics) -> Int

    ArmStatistics::last_reward

    fn ArmStatistics::last_reward(self : ArmStatistics) -> Double

    ArmStatistics::mean

    fn ArmStatistics::mean(self : ArmStatistics) -> Double

    ArmStatistics::new

    fn ArmStatistics::new(arm : Int) -> ArmStatistics

    ArmStatistics::pulls

    fn ArmStatistics::pulls(self : ArmStatistics) -> Int

    ArmStatistics::reset

    fn ArmStatistics::reset(self : ArmStatistics) -> Unit

    ArmStatistics::reward_sum

    fn ArmStatistics::reward_sum(self : ArmStatistics) -> Double

    ArmStatistics::standard_error

    fn ArmStatistics::standard_error(self : ArmStatistics) -> Double

    ArmStatistics::update

    fn ArmStatistics::update(self : ArmStatistics, reward : Double) -> Unit

    ArmStatistics::variance

    fn ArmStatistics::variance(self : ArmStatistics) -> Double

    AucTracker

    pub struct AucTracker {
    scores : Array[Double]
    labels : Array[Bool]
    }

    Exact incremental AUC. The tracker stores event scores, so memory is O(n) and the final computation is deterministic with tie handling.

    AucTracker::auc

    fn AucTracker::auc(self : AucTracker) -> Double

    AucTracker::negative_count

    fn AucTracker::negative_count(self : AucTracker) -> Int

    AucTracker::new

    fn AucTracker::new() -> AucTracker

    AucTracker::positive_count

    fn AucTracker::positive_count(self : AucTracker) -> Int

    AucTracker::reset

    fn AucTracker::reset(self : AucTracker) -> Unit

    AucTracker::size

    fn AucTracker::size(self : AucTracker) -> Int

    AucTracker::update

    fn AucTracker::update(self : AucTracker, score : Double, label : Double) -> Unit

    AuditAction

    pub(all) enum AuditAction {
    Train
    Predict
    Promote
    Rollback
    Reject
    Snapshot
    } derive(Eq,
    Debug
    )

    Auditable metadata for model updates, data lineage, and privacy budgets.

    AuditRecord

    pub struct AuditRecord {
    event_id : String
    actor : String
    action : AuditAction
    model : String
    version : String
    timestamp : Int64
    detail : String
    success : Bool
    }

    AuditRecord::action

    fn AuditRecord::action(self : AuditRecord) -> AuditAction

    AuditRecord::actor

    fn AuditRecord::actor(self : AuditRecord) -> String

    AuditRecord::detail

    fn AuditRecord::detail(self : AuditRecord) -> String

    AuditRecord::event_id

    fn AuditRecord::event_id(self : AuditRecord) -> String

    AuditRecord::model

    fn AuditRecord::model(self : AuditRecord) -> String

    AuditRecord::new

    fn AuditRecord::new(event_id : String, actor : String, action : AuditAction, model : String, version : String, timestamp : Int64, detail? : String, success? : Bool) -> AuditRecord

    AuditRecord::success

    fn AuditRecord::success(self : AuditRecord) -> Bool

    AuditRecord::timestamp

    fn AuditRecord::timestamp(self : AuditRecord) -> Int64

    AuditRecord::version

    fn AuditRecord::version(self : AuditRecord) -> String

    AuditTrail

    pub struct AuditTrail {
    capacity : Int
    records : Array[AuditRecord]
    ids : Map[String, Bool]
    accepted : Int
    duplicates : Int
    evicted : Int
    }

    AuditTrail::accepted

    fn AuditTrail::accepted(self : AuditTrail) -> Int

    AuditTrail::append

    fn AuditTrail::append(self : AuditTrail, record : AuditRecord) -> Bool

    AuditTrail::clear

    fn AuditTrail::clear(self : AuditTrail) -> Unit

    AuditTrail::count_action

    fn AuditTrail::count_action(self : AuditTrail, action : AuditAction) -> Int

    AuditTrail::duplicates

    fn AuditTrail::duplicates(self : AuditTrail) -> Int

    AuditTrail::evicted

    fn AuditTrail::evicted(self : AuditTrail) -> Int

    AuditTrail::failed

    fn AuditTrail::failed(self : AuditTrail) -> Int

    AuditTrail::find

    fn AuditTrail::find(self : AuditTrail, event_id : String) -> AuditRecord?

    AuditTrail::new

    fn AuditTrail::new(capacity? : Int) -> AuditTrail

    AuditTrail::records

    fn AuditTrail::records(self : AuditTrail) -> Array[AuditRecord]

    AuditTrail::size

    fn AuditTrail::size(self : AuditTrail) -> Int

    BanditAction

    pub(all) enum BanditAction {
    Explore
    Exploit
    } derive(Eq,
    Debug
    )

    Online decision policies for recommendation, routing, and experimentation.

    The policies in this file are stateful by design. Each policy exposes its counters and reset operation so it can be checkpointed between service instances and tested with deterministic event streams.

    BanditEvaluator

    pub struct BanditEvaluator {
    observations : Int
    reward_sum : Double
    optimal_sum : Double
    regret_sum : Double
    successes : Int
    }

    BanditEvaluator::cumulative_regret

    fn BanditEvaluator::cumulative_regret(self : BanditEvaluator) -> Double

    BanditEvaluator::mean_optimal_reward

    fn BanditEvaluator::mean_optimal_reward(self : BanditEvaluator) -> Double

    BanditEvaluator::mean_reward

    fn BanditEvaluator::mean_reward(self : BanditEvaluator) -> Double

    BanditEvaluator::new

    BanditEvaluator::observations

    fn BanditEvaluator::observations(self : BanditEvaluator) -> Int

    BanditEvaluator::observe

    fn BanditEvaluator::observe(self : BanditEvaluator, reward : Double, optimal_reward : Double, success? : Bool) -> Unit

    BanditEvaluator::regret_rate

    fn BanditEvaluator::regret_rate(self : BanditEvaluator) -> Double

    BanditEvaluator::reset

    fn BanditEvaluator::reset(self : BanditEvaluator) -> Unit

    BanditEvaluator::success_rate

    fn BanditEvaluator::success_rate(self : BanditEvaluator) -> Double

    BanditHistory

    pub struct BanditHistory {
    capacity : Int
    arms : Array[Int]
    rewards : Array[Double]
    actions : Array[BanditAction]
    }

    BanditHistory::actions

    BanditHistory::append

    fn BanditHistory::append(self : BanditHistory, arm : Int, reward : Double, action : BanditAction) -> Unit

    BanditHistory::arms

    fn BanditHistory::arms(self : BanditHistory) -> Array[Int]

    BanditHistory::exploration_rate

    fn BanditHistory::exploration_rate(self : BanditHistory) -> Double

    BanditHistory::mean_reward

    fn BanditHistory::mean_reward(self : BanditHistory) -> Double

    BanditHistory::new

    fn BanditHistory::new(capacity? : Int) -> BanditHistory

    BanditHistory::reset

    fn BanditHistory::reset(self : BanditHistory) -> Unit

    BanditHistory::rewards

    fn BanditHistory::rewards(self : BanditHistory) -> Array[Double]

    BanditHistory::size

    fn BanditHistory::size(self : BanditHistory) -> Int

    BatchNormalizer

    pub struct BatchNormalizer {
    moments : VectorMoments
    dimension : Int
    batches : Int
    }

    BatchNormalizer::batches

    fn BatchNormalizer::batches(self : BatchNormalizer) -> Int

    BatchNormalizer::fit

    fn BatchNormalizer::fit(self : BatchNormalizer, batch : DataBatch) -> Unit

    BatchNormalizer::mean

    fn BatchNormalizer::mean(self : BatchNormalizer) -> Array[Double]

    BatchNormalizer::new

    fn BatchNormalizer::new(dimension : Int) -> BatchNormalizer

    BatchNormalizer::reset

    fn BatchNormalizer::reset(self : BatchNormalizer) -> Unit

    BatchNormalizer::transform

    fn BatchNormalizer::transform(self : BatchNormalizer, batch : DataBatch) -> DataBatch

    BatchNormalizer::variance

    fn BatchNormalizer::variance(self : BatchNormalizer) -> Array[Double]

    BernoulliSampler

    pub struct BernoulliSampler {
    probability : Double
    rng : DeterministicRng
    accepted : Int
    seen : Int
    }

    BernoulliSampler::accept

    fn BernoulliSampler::accept(self : BernoulliSampler) -> Bool

    BernoulliSampler::accepted

    fn BernoulliSampler::accepted(self : BernoulliSampler) -> Int

    BernoulliSampler::new

    fn BernoulliSampler::new(probability : Double, seed? : UInt64) -> BernoulliSampler

    BernoulliSampler::probability

    fn BernoulliSampler::probability(self : BernoulliSampler) -> Double

    BernoulliSampler::rate

    fn BernoulliSampler::rate(self : BernoulliSampler) -> Double

    BernoulliSampler::reset

    fn BernoulliSampler::reset(self : BernoulliSampler) -> Unit

    BernoulliSampler::seen

    fn BernoulliSampler::seen(self : BernoulliSampler) -> Int

    BootstrapCounter

    pub struct BootstrapCounter {
    counts : Array[Int]
    rng : DeterministicRng
    rounds : Int
    }

    BootstrapCounter::counts

    fn BootstrapCounter::counts(self : BootstrapCounter) -> Array[Int]

    BootstrapCounter::coverage

    fn BootstrapCounter::coverage(self : BootstrapCounter) -> Double

    BootstrapCounter::draw

    fn BootstrapCounter::draw(self : BootstrapCounter) -> Array[Int]

    BootstrapCounter::new

    fn BootstrapCounter::new(size : Int, seed? : UInt64) -> BootstrapCounter

    BootstrapCounter::reset

    fn BootstrapCounter::reset(self : BootstrapCounter) -> Unit

    BootstrapCounter::rounds

    fn BootstrapCounter::rounds(self : BootstrapCounter) -> Int

    CalibratedInterval

    pub struct CalibratedInterval {
    center : Double
    radius : Double
    confidence : Double
    }

    CalibratedInterval::center

    fn CalibratedInterval::center(self : CalibratedInterval) -> Double

    CalibratedInterval::confidence

    fn CalibratedInterval::confidence(self : CalibratedInterval) -> Double

    CalibratedInterval::contains

    fn CalibratedInterval::contains(self : CalibratedInterval, value : Double) -> Bool

    CalibratedInterval::lower

    fn CalibratedInterval::lower(self : CalibratedInterval) -> Double

    CalibratedInterval::new

    fn CalibratedInterval::new(center : Double, radius : Double, confidence : Double) -> CalibratedInterval

    CalibratedInterval::radius

    fn CalibratedInterval::radius(self : CalibratedInterval) -> Double

    CalibratedInterval::upper

    fn CalibratedInterval::upper(self : CalibratedInterval) -> Double

    CalibrationBin

    pub struct CalibrationBin {
    count : Double
    predicted : Double
    observed : Double
    }

    CalibrationBin::count

    fn CalibrationBin::count(self : CalibrationBin) -> Double

    CalibrationBin::mean_observed

    fn CalibrationBin::mean_observed(self : CalibrationBin) -> Double

    CalibrationBin::mean_prediction

    fn CalibrationBin::mean_prediction(self : CalibrationBin) -> Double

    CalibrationBin::new

    CalibrationBin::update

    fn CalibrationBin::update(self : CalibrationBin, prediction : Double, label : Double) -> Unit

    CalibrationTracker

    pub struct CalibrationTracker {
    bins : Array[CalibrationBin]
    total : Double
    weighted_gap : Double
    }

    CalibrationTracker::bins

    CalibrationTracker::ece

    fn CalibrationTracker::ece(self : CalibrationTracker) -> Double

    CalibrationTracker::mce

    fn CalibrationTracker::mce(self : CalibrationTracker) -> Double

    CalibrationTracker::new

    fn CalibrationTracker::new(bin_count? : Int) -> CalibrationTracker

    CalibrationTracker::reset

    fn CalibrationTracker::reset(self : CalibrationTracker) -> Unit

    CalibrationTracker::update

    fn CalibrationTracker::update(self : CalibrationTracker, prediction : Double, label : Double) -> Unit

    CanaryExperiment

    pub struct CanaryExperiment {
    name : String
    baseline : String
    candidate : String
    target_samples : Int
    baseline_metric : Double
    candidate_metric : Double
    samples : Int
    }

    CanaryExperiment::baseline

    fn CanaryExperiment::baseline(self : CanaryExperiment) -> Double

    CanaryExperiment::candidate

    fn CanaryExperiment::candidate(self : CanaryExperiment) -> Double

    CanaryExperiment::complete

    fn CanaryExperiment::complete(self : CanaryExperiment) -> Bool

    CanaryExperiment::improvement

    fn CanaryExperiment::improvement(self : CanaryExperiment) -> Double

    CanaryExperiment::new

    fn CanaryExperiment::new(name : String, baseline : String, candidate : String, target_samples? : Int) -> CanaryExperiment

    CanaryExperiment::observe

    fn CanaryExperiment::observe(self : CanaryExperiment, baseline : Double, candidate : Double) -> Unit

    CanaryExperiment::samples

    fn CanaryExperiment::samples(self : CanaryExperiment) -> Int

    CanaryExperiment::winner

    fn CanaryExperiment::winner(self : CanaryExperiment) -> String

    CategoricalEncoder

    pub struct CategoricalEncoder {
    values : Map[String, Int]
    next_index : Int
    unknown_index : Int?
    }

    CategoricalEncoder::contains

    fn CategoricalEncoder::contains(self : CategoricalEncoder, value : String) -> Bool

    CategoricalEncoder::dimension

    fn CategoricalEncoder::dimension(self : CategoricalEncoder) -> Int

    CategoricalEncoder::encode

    fn CategoricalEncoder::encode(self : CategoricalEncoder, value : String) -> Int

    CategoricalEncoder::entries

    fn CategoricalEncoder::entries(self : CategoricalEncoder) -> Array[(String, Int)]

    CategoricalEncoder::new

    fn CategoricalEncoder::new(unknown_index? : Int) -> CategoricalEncoder

    CategoricalEncoder::reset

    fn CategoricalEncoder::reset(self : CategoricalEncoder) -> Unit

    ChangePointDetector

    pub struct ChangePointDetector {
    short : SequenceWindow
    long : SequenceWindow
    threshold : Double
    changes : Int
    last_score : Double
    }

    ChangePointDetector::changes

    fn ChangePointDetector::changes(self : ChangePointDetector) -> Int

    ChangePointDetector::new

    fn ChangePointDetector::new(short_window? : Int, long_window? : Int, threshold? : Double) -> ChangePointDetector

    ChangePointDetector::observe

    fn ChangePointDetector::observe(self : ChangePointDetector, value : Double) -> Bool

    ChangePointDetector::reset

    fn ChangePointDetector::reset(self : ChangePointDetector) -> Unit

    ChangePointDetector::score

    fn ChangePointDetector::score(self : ChangePointDetector) -> Double

    ClassCost

    pub struct ClassCost {
    false_positive : Double
    false_negative : Double
    true_positive : Double
    true_negative : Double
    }

    Cost-sensitive decision rules for imbalanced streaming classification.

    ClassCost::balanced_threshold

    fn ClassCost::balanced_threshold(self : ClassCost) -> Double

    ClassCost::cost

    fn ClassCost::cost(self : ClassCost, prediction : Double, label : Double, threshold : Double) -> Double

    ClassCost::expected_cost

    fn ClassCost::expected_cost(self : ClassCost, probability : Double, threshold : Double) -> Double

    ClassCost::negative_weight

    fn ClassCost::negative_weight(self : ClassCost) -> Double

    ClassCost::new

    fn ClassCost::new(false_positive? : Double, false_negative? : Double, true_positive? : Double, true_negative? : Double) -> ClassCost

    ClassCost::positive_weight

    fn ClassCost::positive_weight(self : ClassCost) -> Double

    ClassCountTracker

    pub struct ClassCountTracker {
    counts : Array[Int]
    }

    ClassCountTracker::count

    fn ClassCountTracker::count(self : ClassCountTracker, label : Int) -> Int

    ClassCountTracker::counts

    fn ClassCountTracker::counts(self : ClassCountTracker) -> Array[Int]

    ClassCountTracker::new

    fn ClassCountTracker::new(classes : Int) -> ClassCountTracker

    ClassCountTracker::observe

    fn ClassCountTracker::observe(self : ClassCountTracker, label : Int) -> Bool

    ClassCountTracker::prior

    fn ClassCountTracker::prior(self : ClassCountTracker, label : Int, smoothing? : Double) -> Double

    ClassCountTracker::priors

    fn ClassCountTracker::priors(self : ClassCountTracker, smoothing? : Double) -> Array[Double]

    ClassCountTracker::total

    fn ClassCountTracker::total(self : ClassCountTracker) -> Int

    ClickThroughRateTracker

    pub struct ClickThroughRateTracker {
    impressions : Double
    clicks : Double
    predicted_sum : Double
    squared_calibration_error : Double
    }

    ClickThroughRateTracker::brier

    ClickThroughRateTracker::ctr

    ClickThroughRateTracker::impressions

    fn ClickThroughRateTracker::impressions(self : ClickThroughRateTracker) -> Double

    ClickThroughRateTracker::new

    ClickThroughRateTracker::predicted_ctr

    fn ClickThroughRateTracker::predicted_ctr(self : ClickThroughRateTracker) -> Double

    ClickThroughRateTracker::reset

    ClickThroughRateTracker::update

    fn ClickThroughRateTracker::update(self : ClickThroughRateTracker, probability : Double, clicked : Bool, weight? : Double) -> Unit

    ConformalInterval

    pub struct ConformalInterval {
    residuals : Array[Double]
    capacity : Int
    confidence : Double
    seen : Int
    }

    Bounded conformal residual tracker for distribution-free prediction bands.

    ConformalInterval::confidence

    fn ConformalInterval::confidence(self : ConformalInterval) -> Double

    ConformalInterval::coverage

    fn ConformalInterval::coverage(self : ConformalInterval, prediction : Double, label : Double) -> Bool

    ConformalInterval::interval

    fn ConformalInterval::interval(self : ConformalInterval, prediction : Double) -> (Double, Double)

    ConformalInterval::new

    fn ConformalInterval::new(capacity? : Int, confidence? : Double) -> ConformalInterval

    ConformalInterval::observe

    fn ConformalInterval::observe(self : ConformalInterval, prediction : Double, label : Double) -> Unit

    ConformalInterval::radius

    fn ConformalInterval::radius(self : ConformalInterval) -> Double

    ConformalInterval::reset

    fn ConformalInterval::reset(self : ConformalInterval) -> Unit

    ConformalInterval::seen

    fn ConformalInterval::seen(self : ConformalInterval) -> Int

    ConformalInterval::size

    fn ConformalInterval::size(self : ConformalInterval) -> Int

    ConfusionMatrix

    pub struct ConfusionMatrix {
    true_positive : Double
    false_positive : Double
    true_negative : Double
    false_negative : Double
    }

    Mutable binary classification confusion matrix for a stream.

    ConfusionMatrix::accuracy

    fn ConfusionMatrix::accuracy(self : ConfusionMatrix) -> Double

    ConfusionMatrix::balanced_accuracy

    fn ConfusionMatrix::balanced_accuracy(self : ConfusionMatrix) -> Double

    ConfusionMatrix::f1

    fn ConfusionMatrix::f1(self : ConfusionMatrix) -> Double

    ConfusionMatrix::false_negative_count

    fn ConfusionMatrix::false_negative_count(self : ConfusionMatrix) -> Double

    ConfusionMatrix::fp

    fn ConfusionMatrix::fp(self : ConfusionMatrix) -> Double

    ConfusionMatrix::mcc

    fn ConfusionMatrix::mcc(self : ConfusionMatrix) -> Double

    ConfusionMatrix::merge

    fn ConfusionMatrix::merge(self : ConfusionMatrix, other : ConfusionMatrix) -> Unit

    ConfusionMatrix::new

    ConfusionMatrix::precision

    fn ConfusionMatrix::precision(self : ConfusionMatrix) -> Double

    ConfusionMatrix::recall

    fn ConfusionMatrix::recall(self : ConfusionMatrix) -> Double

    ConfusionMatrix::reset

    fn ConfusionMatrix::reset(self : ConfusionMatrix) -> Unit

    ConfusionMatrix::specificity

    fn ConfusionMatrix::specificity(self : ConfusionMatrix) -> Double

    ConfusionMatrix::tn

    fn ConfusionMatrix::tn(self : ConfusionMatrix) -> Double

    ConfusionMatrix::total

    fn ConfusionMatrix::total(self : ConfusionMatrix) -> Double

    ConfusionMatrix::tp

    fn ConfusionMatrix::tp(self : ConfusionMatrix) -> Double

    ConfusionMatrix::update

    fn ConfusionMatrix::update(self : ConfusionMatrix, prediction : Double, label : Double, threshold? : Double) -> Unit

    ContextualBandit

    pub struct ContextualBandit {
    models : Array[OnlineRidgeRegression]
    exploration : Double
    steps : Int
    }

    ContextualBandit::arm_count

    fn ContextualBandit::arm_count(self : ContextualBandit) -> Int

    ContextualBandit::choose

    fn ContextualBandit::choose(self : ContextualBandit, features : Array[Double]) -> Int?

    ContextualBandit::new

    fn ContextualBandit::new(arm_count : Int, dimension : Int, exploration? : Double, learning_rate? : Double) -> ContextualBandit

    ContextualBandit::predict

    fn ContextualBandit::predict(self : ContextualBandit, arm : Int, features : Array[Double]) -> Double

    ContextualBandit::reset

    fn ContextualBandit::reset(self : ContextualBandit) -> Unit

    ContextualBandit::steps

    fn ContextualBandit::steps(self : ContextualBandit) -> Int

    ContextualBandit::update

    fn ContextualBandit::update(self : ContextualBandit, arm : Int, features : Array[Double], reward : Double) -> Bool

    ContextualBandit::weights

    fn ContextualBandit::weights(self : ContextualBandit, arm : Int) -> Array[Double]

    ContractField

    pub struct ContractField {
    name : String
    expected : ContractType
    required : Bool
    minimum : Double?
    maximum : Double?
    vector_length : Int
    allow_empty : Bool
    }

    ContractField::boolean

    fn ContractField::boolean(name : String, required? : Bool) -> ContractField

    ContractField::expected

    fn ContractField::expected(self : ContractField) -> ContractType

    ContractField::name

    fn ContractField::name(self : ContractField) -> String

    ContractField::number

    fn ContractField::number(name : String, required? : Bool, minimum? : Double, maximum? : Double) -> ContractField

    ContractField::required

    fn ContractField::required(self : ContractField) -> Bool

    ContractField::text

    fn ContractField::text(name : String, required? : Bool, allow_empty? : Bool) -> ContractField

    ContractField::vector

    fn ContractField::vector(name : String, length : Int, required? : Bool) -> ContractField

    ContractField::vector_length

    fn ContractField::vector_length(self : ContractField) -> Int

    ContractReport

    pub struct ContractReport {
    accepted : Bool
    checked_fields : Int
    violations : Array[ContractViolation]
    }

    ContractReport::accepted

    fn ContractReport::accepted(self : ContractReport) -> Bool

    ContractReport::checked_fields

    fn ContractReport::checked_fields(self : ContractReport) -> Int

    ContractReport::violation_count

    fn ContractReport::violation_count(self : ContractReport) -> Int

    ContractReport::violations

    ContractType

    pub(all) enum ContractType {
    Number
    Text
    Boolean
    Vector
    } derive(Eq,
    Debug
    )

    ContractValue

    pub(all) enum ContractValue {
    Number(Double)
    Text(String)
    Boolean(Bool)
    Vector(Array[Double])
    Missing
    } derive(Eq,
    Debug
    )

    Runtime data contracts for validating records before they reach a model.

    Contracts make the online path explicit: fields are ordered, typed, and checked with the same rules used by batch ingestion. The implementation deliberately returns structured violations so callers can route bad rows to a dead-letter stream instead of silently dropping them.

    ContractViolation

    pub struct ContractViolation {
    field : String
    kind : ContractViolationKind
    detail : String
    }

    ContractViolation::detail

    fn ContractViolation::detail(self : ContractViolation) -> String

    ContractViolation::field

    fn ContractViolation::field(self : ContractViolation) -> String

    ContractViolation::kind

    ContractViolation::new

    fn ContractViolation::new(field : String, kind : ContractViolationKind, detail : String) -> ContractViolation

    ContractViolationKind

    pub(all) enum ContractViolationKind {
    MissingRequired
    TypeMismatch
    BelowMinimum
    AboveMaximum
    InvalidVectorLength
    EmptyText
    } derive(Eq,
    Debug
    )

    CostSensitiveEvaluator

    pub struct CostSensitiveEvaluator {
    costs : ClassCost
    total : Double
    count : Int
    }

    CostSensitiveEvaluator::count

    CostSensitiveEvaluator::mean

    CostSensitiveEvaluator::new

    CostSensitiveEvaluator::observe

    fn CostSensitiveEvaluator::observe(self : CostSensitiveEvaluator, prediction : Double, label : Double, threshold : Double) -> Double

    CostSensitiveEvaluator::reset

    CostSensitiveEvaluator::total

    CountMinSketch

    pub struct CountMinSketch {
    width : Int
    depth : Int
    table : Array[Array[Int]]
    seeds : Array[Int]
    updates : Int
    }

    CountMinSketch::depth

    fn CountMinSketch::depth(self : CountMinSketch) -> Int

    CountMinSketch::estimate

    fn CountMinSketch::estimate(self : CountMinSketch, key : String) -> Int

    CountMinSketch::new

    fn CountMinSketch::new(width : Int, depth : Int) -> CountMinSketch

    CountMinSketch::reset

    fn CountMinSketch::reset(self : CountMinSketch) -> Unit

    CountMinSketch::update

    fn CountMinSketch::update(self : CountMinSketch, key : String, amount? : Int) -> Unit

    CountMinSketch::updates

    fn CountMinSketch::updates(self : CountMinSketch) -> Int

    CountMinSketch::width

    fn CountMinSketch::width(self : CountMinSketch) -> Int

    CrossValidationFold

    pub struct CrossValidationFold {
    train : DataBatch
    validation : DataBatch
    index : Int
    }

    CrossValidationFold::index

    fn CrossValidationFold::index(self : CrossValidationFold) -> Int

    CrossValidationFold::train

    CrossValidationFold::validation

    CsvOptions

    pub struct CsvOptions {
    separator : Char
    quote : Char
    escape : Char
    trim_fields : Bool
    skip_empty : Bool
    }

    CsvOptions::new

    fn CsvOptions::new(separator? : Char, quote? : Char, escape? : Char, trim_fields? : Bool, skip_empty? : Bool) -> CsvOptions

    CsvOptions::parse_line

    fn CsvOptions::parse_line(self : CsvOptions, line : String) -> Array[String]

    CsvOptions::parse_lines

    fn CsvOptions::parse_lines(self : CsvOptions, text : String) -> Array[Array[String]]

    CsvOptions::separator

    fn CsvOptions::separator(self : CsvOptions) -> Char

    CumulativeSumDetector

    pub struct CumulativeSumDetector {
    target : Double
    allowance : Double
    threshold : Double
    positive : Double
    negative : Double
    }

    Two-sided CUSUM detector for abrupt shifts around a target level.

    CumulativeSumDetector::negative

    fn CumulativeSumDetector::negative(self : CumulativeSumDetector) -> Double

    CumulativeSumDetector::new

    fn CumulativeSumDetector::new(target? : Double, allowance? : Double, threshold? : Double) -> CumulativeSumDetector

    CumulativeSumDetector::positive

    fn CumulativeSumDetector::positive(self : CumulativeSumDetector) -> Double

    CumulativeSumDetector::reset

    CumulativeSumDetector::update

    fn CumulativeSumDetector::update(self : CumulativeSumDetector, value : Double) -> Bool

    DataBatch

    pub struct DataBatch {
    features : Array[Array[Double]]
    labels : Array[Double]
    weights : Array[Double]
    }

    DataBatch::add

    fn DataBatch::add(self : DataBatch, features : Array[Double], label : Double, weight? : Double) -> Bool

    DataBatch::dimension

    fn DataBatch::dimension(self : DataBatch) -> Int

    DataBatch::features

    fn DataBatch::features(self : DataBatch) -> Array[Array[Double]]

    DataBatch::from_arrays

    fn DataBatch::from_arrays(features : Array[Array[Double]], labels : Array[Double]) -> DataBatch

    DataBatch::labels

    fn DataBatch::labels(self : DataBatch) -> Array[Double]

    DataBatch::new

    fn DataBatch::new(dimension? : Int) -> DataBatch

    DataBatch::shuffle

    fn DataBatch::shuffle(self : DataBatch, random_index : (Int) -> Int) -> Unit

    DataBatch::size

    fn DataBatch::size(self : DataBatch) -> Int

    DataBatch::slice

    fn DataBatch::slice(self : DataBatch, start : Int, end : Int) -> DataBatch

    DataBatch::validate

    fn DataBatch::validate(self : DataBatch) -> ValidationReport

    DataBatch::weights

    fn DataBatch::weights(self : DataBatch) -> Array[Double]

    DataContract

    pub struct DataContract {
    name : String
    version : String
    fields : Array[ContractField]
    rows : Int
    accepted_rows : Int
    rejected_rows : Int
    }

    DataContract::acceptance_rate

    fn DataContract::acceptance_rate(self : DataContract) -> Double

    DataContract::accepted_rows

    fn DataContract::accepted_rows(self : DataContract) -> Int

    DataContract::add_field

    fn DataContract::add_field(self : DataContract, field : ContractField) -> Bool

    DataContract::field_count

    fn DataContract::field_count(self : DataContract) -> Int

    DataContract::fields

    DataContract::name

    fn DataContract::name(self : DataContract) -> String

    DataContract::new

    fn DataContract::new(name : String, version? : String) -> DataContract

    DataContract::rejected_rows

    fn DataContract::rejected_rows(self : DataContract) -> Int

    DataContract::reset

    fn DataContract::reset(self : DataContract) -> Unit

    DataContract::rows

    fn DataContract::rows(self : DataContract) -> Int

    DataContract::validate

    fn DataContract::validate(self : DataContract, values : Array[ContractValue]) -> ContractReport

    DataContract::version

    fn DataContract::version(self : DataContract) -> String

    DataLineage

    pub struct DataLineage {
    nodes : Map[String, LineageNode]
    edges : Map[String, Array[String]]
    registrations : Int
    }

    DataLineage::clear

    fn DataLineage::clear(self : DataLineage) -> Unit

    DataLineage::connect

    fn DataLineage::connect(self : DataLineage, input : String, output : String) -> Bool

    DataLineage::inputs

    fn DataLineage::inputs(self : DataLineage, dataset : String) -> Array[String]

    DataLineage::new

    DataLineage::node

    fn DataLineage::node(self : DataLineage, dataset : String) -> LineageNode?

    DataLineage::register

    fn DataLineage::register(self : DataLineage, node : LineageNode) -> Bool

    DataLineage::registrations

    fn DataLineage::registrations(self : DataLineage) -> Int

    DataLineage::upstream

    fn DataLineage::upstream(self : DataLineage, dataset : String) -> Array[String]

    DataQualityReport

    pub struct DataQualityReport {
    rows : Int
    accepted : Int
    rejected : Int
    missing_values : Int
    dimension_errors : Int
    out_of_range : Int
    }

    DataQualityReport::acceptance_rate

    fn DataQualityReport::acceptance_rate(self : DataQualityReport) -> Double

    DataQualityReport::accepted

    fn DataQualityReport::accepted(self : DataQualityReport) -> Int

    DataQualityReport::dimension_errors

    fn DataQualityReport::dimension_errors(self : DataQualityReport) -> Int

    DataQualityReport::missing_values

    fn DataQualityReport::missing_values(self : DataQualityReport) -> Int

    DataQualityReport::new

    DataQualityReport::observe

    fn DataQualityReport::observe(self : DataQualityReport, accepted : Bool, missing : Int, dimension_error : Bool, range_error : Bool) -> Unit

    DataQualityReport::out_of_range

    fn DataQualityReport::out_of_range(self : DataQualityReport) -> Int

    DataQualityReport::rejected

    fn DataQualityReport::rejected(self : DataQualityReport) -> Int

    DataQualityReport::reset

    fn DataQualityReport::reset(self : DataQualityReport) -> Unit

    DataQualityReport::rows

    fn DataQualityReport::rows(self : DataQualityReport) -> Int

    DenseVector

    pub struct DenseVector {
    values : Array[Double]
    } derive(ToJson,
    Debug
    ,
    FromJson
    )

    An owned dense vector with explicit dimension-safe operations.

    DenseVector is useful at API boundaries where callers want a named value rather than a raw array. Model hot paths still accept Array[Double] to keep interop with MoonBit data processing code allocation-free.

    DenseVector::add

    fn DenseVector::add(self : DenseVector, other : DenseVector) -> DenseVector

    DenseVector::append

    fn DenseVector::append(self : DenseVector, value : Double) -> Unit

    DenseVector::argmax

    fn DenseVector::argmax(self : DenseVector) -> Int?

    DenseVector::axpy

    fn DenseVector::axpy(self : DenseVector, factor : Double, other : DenseVector) -> Unit

    DenseVector::clamp

    fn DenseVector::clamp(self : DenseVector, lower : Double, upper : Double) -> DenseVector

    DenseVector::concat

    fn DenseVector::concat(self : DenseVector, other : DenseVector) -> DenseVector

    DenseVector::cosine

    fn DenseVector::cosine(self : DenseVector, other : DenseVector) -> Double

    DenseVector::dimension

    fn DenseVector::dimension(self : DenseVector) -> Int

    DenseVector::distance

    fn DenseVector::distance(self : DenseVector, other : DenseVector) -> Double

    DenseVector::distance_squared

    fn DenseVector::distance_squared(self : DenseVector, other : DenseVector) -> Double

    DenseVector::dot

    fn DenseVector::dot(self : DenseVector, other : DenseVector) -> Double

    DenseVector::dot_checked

    fn DenseVector::dot_checked(self : DenseVector, other : DenseVector) -> Double?

    DenseVector::fill

    fn DenseVector::fill(self : DenseVector, value : Double) -> Unit

    DenseVector::from_array

    fn DenseVector::from_array(values : Array[Double]) -> DenseVector

    DenseVector::from_view

    fn DenseVector::from_view(values : ArrayView[Double]) -> DenseVector

    DenseVector::get

    fn DenseVector::get(self : DenseVector, index : Int) -> Double?

    DenseVector::hadamard

    fn DenseVector::hadamard(self : DenseVector, other : DenseVector) -> DenseVector

    DenseVector::is_empty

    fn DenseVector::is_empty(self : DenseVector) -> Bool

    DenseVector::is_zero

    fn DenseVector::is_zero(self : DenseVector, tolerance? : Double) -> Bool

    DenseVector::l1_norm

    fn DenseVector::l1_norm(self : DenseVector) -> Double

    DenseVector::l2_norm

    fn DenseVector::l2_norm(self : DenseVector) -> Double

    DenseVector::map

    fn DenseVector::map(self : DenseVector, transform : (Double) -> Double) -> DenseVector

    DenseVector::max_abs

    fn DenseVector::max_abs(self : DenseVector) -> Double

    DenseVector::mean

    fn DenseVector::mean(self : DenseVector) -> Double

    DenseVector::new

    fn DenseVector::new(size : Int, fill? : Double) -> DenseVector

    DenseVector::normalize

    fn DenseVector::normalize(self : DenseVector) -> DenseVector

    DenseVector::ones

    fn DenseVector::ones(size : Int) -> DenseVector

    DenseVector::scale

    fn DenseVector::scale(self : DenseVector, factor : Double) -> DenseVector

    DenseVector::set

    fn DenseVector::set(self : DenseVector, index : Int, value : Double) -> Bool

    DenseVector::slice

    fn DenseVector::slice(self : DenseVector, start : Int, end : Int) -> DenseVector

    DenseVector::softmax

    fn DenseVector::softmax(self : DenseVector) -> DenseVector

    DenseVector::subtract

    fn DenseVector::subtract(self : DenseVector, other : DenseVector) -> DenseVector

    DenseVector::sum

    fn DenseVector::sum(self : DenseVector) -> Double

    DenseVector::top_index

    fn DenseVector::top_index(self : DenseVector, rank : Int) -> Int?

    DenseVector::validate

    fn DenseVector::validate(self : DenseVector, expected : Int) -> ValidationReport

    DenseVector::values

    fn DenseVector::values(self : DenseVector) -> Array[Double]

    DenseVector::variance

    fn DenseVector::variance(self : DenseVector) -> Double

    DenseVector::zeros

    fn DenseVector::zeros(size : Int) -> DenseVector

    DenseVector::zip_map

    fn DenseVector::zip_map(self : DenseVector, other : DenseVector, transform : (Double, Double) -> Double) -> DenseVector

    Deployment

    pub struct Deployment {
    model : String
    version : String
    state : DeploymentState
    created_at : Int64
    updated_at : Int64
    traffic : Double
    }

    Deployment::model

    fn Deployment::model(self : Deployment) -> String

    Deployment::new

    fn Deployment::new(model : String, version : String, timestamp : Int64) -> Deployment

    Deployment::set_traffic

    fn Deployment::set_traffic(self : Deployment, share : Double) -> Bool

    Deployment::state

    Deployment::traffic

    fn Deployment::traffic(self : Deployment) -> Double

    Deployment::transition

    fn Deployment::transition(self : Deployment, next : DeploymentState, timestamp : Int64) -> Bool

    Deployment::version

    fn Deployment::version(self : Deployment) -> String

    DeploymentManager

    pub struct DeploymentManager {
    deployments : Map[String, Deployment]
    policy : RollbackPolicy
    transitions : Int
    rollbacks : Int
    }

    DeploymentManager::clear

    fn DeploymentManager::clear(self : DeploymentManager) -> Unit

    DeploymentManager::create

    fn DeploymentManager::create(self : DeploymentManager, deployment : Deployment) -> Bool

    DeploymentManager::get

    fn DeploymentManager::get(self : DeploymentManager, model : String, version : String) -> Deployment?

    DeploymentManager::healthy

    fn DeploymentManager::healthy(self : DeploymentManager, accuracy : Double, loss : Double, error_rate : Double) -> Bool

    DeploymentManager::new

    DeploymentManager::rollbacks

    fn DeploymentManager::rollbacks(self : DeploymentManager) -> Int

    DeploymentManager::transition

    fn DeploymentManager::transition(self : DeploymentManager, model : String, version : String, next : DeploymentState, timestamp : Int64) -> Bool

    DeploymentManager::transitions

    fn DeploymentManager::transitions(self : DeploymentManager) -> Int

    DeploymentState

    pub(all) enum DeploymentState {
    Draft
    Staging
    Canary
    Active
    Paused
    RolledBack
    Retired
    } derive(Eq,
    Debug
    )

    Explicit deployment state machine used by registry and serving layers.

    DeterministicRng

    pub struct DeterministicRng {
    state : UInt64
    }

    Small deterministic pseudo-random generator for reproducible benchmarks.

    DeterministicRng::new

    fn DeterministicRng::new(seed : UInt64) -> DeterministicRng

    DeterministicRng::next_double

    fn DeterministicRng::next_double(self : DeterministicRng) -> Double

    DeterministicRng::next_int

    fn DeterministicRng::next_int(self : DeterministicRng, limit : Int) -> Int

    DeterministicRng::next_u64

    fn DeterministicRng::next_u64(self : DeterministicRng) -> UInt64

    DeterministicRng::normal

    fn DeterministicRng::normal(self : DeterministicRng) -> Double

    DeterministicRng::shuffle

    fn DeterministicRng::shuffle(self : DeterministicRng, values : Array[Int]) -> Unit

    DeterministicRng::uniform

    fn DeterministicRng::uniform(self : DeterministicRng, lower : Double, upper : Double) -> Double

    DistinctCounter

    pub struct DistinctCounter {
    buckets : Int
    bits : Array[Bool]
    observations : Int
    }

    DistinctCounter::estimate

    fn DistinctCounter::estimate(self : DistinctCounter) -> Double

    DistinctCounter::fill_rate

    fn DistinctCounter::fill_rate(self : DistinctCounter) -> Double

    DistinctCounter::new

    fn DistinctCounter::new(buckets : Int) -> DistinctCounter

    DistinctCounter::observations

    fn DistinctCounter::observations(self : DistinctCounter) -> Int

    DistinctCounter::observe

    fn DistinctCounter::observe(self : DistinctCounter, value : String) -> Unit

    DistinctCounter::reset

    fn DistinctCounter::reset(self : DistinctCounter) -> Unit

    DriftMonitor

    pub struct DriftMonitor {
    feature_detectors : Array[PageHinkleyDetector]
    target_detector : PageHinkleyDetector
    feature_drift_events : Int
    target_drift_events : Int
    }

    DriftMonitor::feature_events

    fn DriftMonitor::feature_events(self : DriftMonitor) -> Int

    DriftMonitor::new

    fn DriftMonitor::new(dimension : Int, threshold? : Double, delta? : Double) -> DriftMonitor

    DriftMonitor::reset

    fn DriftMonitor::reset(self : DriftMonitor) -> Unit

    DriftMonitor::target_events

    fn DriftMonitor::target_events(self : DriftMonitor) -> Int

    DriftMonitor::update

    fn DriftMonitor::update(self : DriftMonitor, features : Array[Double], target? : Double) -> Bool

    DuplicateSignatureTracker

    pub struct DuplicateSignatureTracker {
    signatures : Map[String, Int]
    rows : Int
    duplicates : Int
    }

    DuplicateSignatureTracker::duplicate_rate

    fn DuplicateSignatureTracker::duplicate_rate(self : DuplicateSignatureTracker) -> Double

    DuplicateSignatureTracker::duplicates

    DuplicateSignatureTracker::new

    DuplicateSignatureTracker::observe

    fn DuplicateSignatureTracker::observe(self : DuplicateSignatureTracker, features : Array[Double]) -> Bool

    DuplicateSignatureTracker::reset

    DuplicateSignatureTracker::rows

    EarlyStopping

    pub struct EarlyStopping {
    patience : Int
    minimum_delta : Double
    best : Double
    bad_rounds : Int
    initialized : Bool
    }

    EarlyStopping::bad_rounds

    fn EarlyStopping::bad_rounds(self : EarlyStopping) -> Int

    EarlyStopping::best

    fn EarlyStopping::best(self : EarlyStopping) -> Double

    EarlyStopping::new

    fn EarlyStopping::new(patience? : Int, minimum_delta? : Double) -> EarlyStopping

    EarlyStopping::observe

    fn EarlyStopping::observe(self : EarlyStopping, loss : Double) -> Bool

    EarlyStopping::reset

    fn EarlyStopping::reset(self : EarlyStopping) -> Unit

    EarlyStopping::should_stop

    fn EarlyStopping::should_stop(self : EarlyStopping) -> Bool

    EpsilonGreedyBandit

    pub struct EpsilonGreedyBandit {
    arms : Array[ArmStatistics]
    epsilon : Double
    rng : DeterministicRng
    history : BanditHistory
    steps : Int
    explored : Int
    }

    EpsilonGreedyBandit::arm_count

    fn EpsilonGreedyBandit::arm_count(self : EpsilonGreedyBandit) -> Int

    EpsilonGreedyBandit::choose

    EpsilonGreedyBandit::epsilon

    fn EpsilonGreedyBandit::epsilon(self : EpsilonGreedyBandit) -> Double

    EpsilonGreedyBandit::explored

    fn EpsilonGreedyBandit::explored(self : EpsilonGreedyBandit) -> Int

    EpsilonGreedyBandit::history

    EpsilonGreedyBandit::new

    fn EpsilonGreedyBandit::new(arm_count : Int, epsilon? : Double, seed? : UInt64, history_capacity? : Int) -> EpsilonGreedyBandit

    EpsilonGreedyBandit::reset

    fn EpsilonGreedyBandit::reset(self : EpsilonGreedyBandit) -> Unit

    EpsilonGreedyBandit::statistics

    fn EpsilonGreedyBandit::statistics(self : EpsilonGreedyBandit, arm : Int) -> ArmStatistics?

    EpsilonGreedyBandit::steps

    fn EpsilonGreedyBandit::steps(self : EpsilonGreedyBandit) -> Int

    EpsilonGreedyBandit::update

    fn EpsilonGreedyBandit::update(self : EpsilonGreedyBandit, arm : Int, reward : Double, action? : BanditAction) -> Bool

    ErrorBudget

    pub struct ErrorBudget {
    target : Double
    window : Int
    successes : Int
    failures : Int
    }

    ErrorBudget::availability

    fn ErrorBudget::availability(self : ErrorBudget) -> Double

    ErrorBudget::failures

    fn ErrorBudget::failures(self : ErrorBudget) -> Int

    ErrorBudget::healthy

    fn ErrorBudget::healthy(self : ErrorBudget) -> Bool

    ErrorBudget::new

    fn ErrorBudget::new(target? : Double, window? : Int) -> ErrorBudget

    ErrorBudget::observe

    fn ErrorBudget::observe(self : ErrorBudget, success : Bool) -> Unit

    ErrorBudget::remaining

    fn ErrorBudget::remaining(self : ErrorBudget) -> Double

    ErrorBudget::reset

    fn ErrorBudget::reset(self : ErrorBudget) -> Unit

    ErrorBudget::successes

    fn ErrorBudget::successes(self : ErrorBudget) -> Int

    ErrorBudget::target

    fn ErrorBudget::target(self : ErrorBudget) -> Double

    EvaluationSummary

    pub struct EvaluationSummary {
    samples : Double
    log_loss : Double
    mse : Double
    accuracy : Double
    precision : Double
    recall : Double
    f1 : Double
    auc : Double
    ece : Double
    } derive(ToJson,
    Debug
    ,
    FromJson
    )

    EvaluationSummary::accuracy

    fn EvaluationSummary::accuracy(self : EvaluationSummary) -> Double

    EvaluationSummary::auc

    fn EvaluationSummary::auc(self : EvaluationSummary) -> Double

    EvaluationSummary::ece

    fn EvaluationSummary::ece(self : EvaluationSummary) -> Double

    EvaluationSummary::f1

    fn EvaluationSummary::f1(self : EvaluationSummary) -> Double

    EvaluationSummary::log_loss

    fn EvaluationSummary::log_loss(self : EvaluationSummary) -> Double

    EvaluationSummary::mse

    fn EvaluationSummary::mse(self : EvaluationSummary) -> Double

    EvaluationSummary::precision

    fn EvaluationSummary::precision(self : EvaluationSummary) -> Double

    EvaluationSummary::recall

    fn EvaluationSummary::recall(self : EvaluationSummary) -> Double

    EvaluationSummary::samples

    fn EvaluationSummary::samples(self : EvaluationSummary) -> Double

    EventLog

    pub struct EventLog {
    capacity : Int
    events : Array[TrainingEvent]
    ids : Map[String, Bool]
    appended : Int
    evicted : Int
    }

    EventLog::append

    fn EventLog::append(self : EventLog, event : TrainingEvent) -> Bool

    EventLog::appended

    fn EventLog::appended(self : EventLog) -> Int

    EventLog::capacity

    fn EventLog::capacity(self : EventLog) -> Int

    EventLog::clear

    fn EventLog::clear(self : EventLog) -> Unit

    EventLog::events

    fn EventLog::events(self : EventLog) -> Array[TrainingEvent]

    EventLog::evicted

    fn EventLog::evicted(self : EventLog) -> Int

    EventLog::first_timestamp

    fn EventLog::first_timestamp(self : EventLog) -> Int64?

    EventLog::last_timestamp

    fn EventLog::last_timestamp(self : EventLog) -> Int64?

    EventLog::new

    fn EventLog::new(capacity : Int) -> EventLog

    EventLog::positive_rate

    fn EventLog::positive_rate(self : EventLog) -> Double

    EventLog::replay

    fn EventLog::replay(self : EventLog, consume : (TrainingEvent) -> Unit) -> Unit

    EventLog::size

    fn EventLog::size(self : EventLog) -> Int

    EventRateWindow

    pub struct EventRateWindow {
    width : Int64
    capacity : Int
    timestamps : Array[Int64]
    invalid : Int
    }

    EventRateWindow::capacity

    fn EventRateWindow::capacity(self : EventRateWindow) -> Int

    EventRateWindow::invalid

    fn EventRateWindow::invalid(self : EventRateWindow) -> Int

    EventRateWindow::new

    fn EventRateWindow::new(width : Int64, capacity? : Int) -> EventRateWindow

    EventRateWindow::observe

    fn EventRateWindow::observe(self : EventRateWindow, timestamp : Int64) -> Bool

    EventRateWindow::rate

    fn EventRateWindow::rate(self : EventRateWindow, now : Int64) -> Double

    EventRateWindow::reset

    fn EventRateWindow::reset(self : EventRateWindow) -> Unit

    EventRateWindow::size

    fn EventRateWindow::size(self : EventRateWindow) -> Int

    EwmaAnomalyDetector

    pub struct EwmaAnomalyDetector {
    baseline : ExponentialMovingVariance
    threshold : Double
    anomalies : Int
    }

    EWMA z-score detector. It reports an anomaly before updating its baseline, which prevents a single spike from hiding itself.

    EwmaAnomalyDetector::anomalies

    fn EwmaAnomalyDetector::anomalies(self : EwmaAnomalyDetector) -> Int

    EwmaAnomalyDetector::new

    fn EwmaAnomalyDetector::new(alpha? : Double, threshold? : Double) -> EwmaAnomalyDetector

    EwmaAnomalyDetector::reset

    fn EwmaAnomalyDetector::reset(self : EwmaAnomalyDetector) -> Unit

    EwmaAnomalyDetector::score

    fn EwmaAnomalyDetector::score(self : EwmaAnomalyDetector, value : Double) -> Double

    EwmaAnomalyDetector::update

    fn EwmaAnomalyDetector::update(self : EwmaAnomalyDetector, value : Double) -> Bool

    ExponentialImportance

    pub struct ExponentialImportance {
    scores : Array[Double]
    alpha : Double
    observations : Int
    }

    ExponentialImportance::new

    fn ExponentialImportance::new(dimension : Int, alpha? : Double) -> ExponentialImportance

    ExponentialImportance::observations

    fn ExponentialImportance::observations(self : ExponentialImportance) -> Int

    ExponentialImportance::reset

    ExponentialImportance::scores

    fn ExponentialImportance::scores(self : ExponentialImportance) -> Array[Double]

    ExponentialImportance::top_k

    fn ExponentialImportance::top_k(self : ExponentialImportance, k : Int) -> Array[Int]

    ExponentialImportance::update

    fn ExponentialImportance::update(self : ExponentialImportance, gradients : Array[Double]) -> Unit

    ExponentialMovingAverage

    pub struct ExponentialMovingAverage {
    alpha : Double
    value : Double
    initialized : Bool
    }

    ExponentialMovingAverage::initialized

    fn ExponentialMovingAverage::initialized(self : ExponentialMovingAverage) -> Bool

    ExponentialMovingAverage::new

    ExponentialMovingAverage::reset

    ExponentialMovingAverage::update

    fn ExponentialMovingAverage::update(self : ExponentialMovingAverage, value : Double) -> Double

    ExponentialMovingAverage::value

    ExponentialMovingVariance

    pub struct ExponentialMovingVariance {
    alpha : Double
    mean : Double
    variance : Double
    initialized : Bool
    }

    ExponentialMovingVariance::initialized

    ExponentialMovingVariance::mean

    ExponentialMovingVariance::new

    ExponentialMovingVariance::reset

    ExponentialMovingVariance::standard_deviation

    fn ExponentialMovingVariance::standard_deviation(self : ExponentialMovingVariance) -> Double

    ExponentialMovingVariance::update

    fn ExponentialMovingVariance::update(self : ExponentialMovingVariance, value : Double) -> Unit

    ExponentialMovingVariance::variance

    ExponentialMovingVariance::z_score

    fn ExponentialMovingVariance::z_score(self : ExponentialMovingVariance, value : Double) -> Double

    FTRL

    pub struct FTRL {
    alpha : Double
    beta : Double
    l1 : Double
    l2 : Double
    z : Array[Double]
    n : Array[Double]
    } derive(ToJson,
    FromJson
    )

    FTRL-Proximal Online Logistic Regression Model. Supports L1 and L2 regularization, ideal for large-scale features.

    FTRL::new

    fn FTRL::new(dim : Int, alpha? : Double, beta? : Double, l1? : Double, l2? : Double) -> FTRL

    Create a new FTRL model with dim features.

    FTRL::predict

    fn FTRL::predict(self : FTRL, features : Array[Double]) -> Double

    Predict the probability for a given feature vector.

    FTRL::update

    fn FTRL::update(self : FTRL, features : Array[Double], label : Double) -> Unit

    Update the model with a single sample (features and label). Label should be 0.0 or 1.0.

    FactorizationMachine

    pub struct FactorizationMachine {
    linear : Array[Double]
    factors : Array[Array[Double]]
    learning_rate : Double
    l2 : Double
    updates : Int
    }

    FactorizationMachine::new

    fn FactorizationMachine::new(dimension : Int, rank : Int, learning_rate? : Double, l2? : Double) -> FactorizationMachine

    FactorizationMachine::predict

    fn FactorizationMachine::predict(self : FactorizationMachine, features : SparseVector) -> Double

    FactorizationMachine::updates

    fn FactorizationMachine::updates(self : FactorizationMachine) -> Int

    FairnessMonitor

    pub struct FairnessMonitor {
    groups : Map[String, GroupMetric]
    observations : Int
    }

    FairnessMonitor::group

    fn FairnessMonitor::group(self : FairnessMonitor, group : String) -> GroupMetric?

    FairnessMonitor::groups

    fn FairnessMonitor::groups(self : FairnessMonitor) -> Array[String]

    FairnessMonitor::max_positive_rate_gap

    fn FairnessMonitor::max_positive_rate_gap(self : FairnessMonitor) -> Double

    FairnessMonitor::max_recall_gap

    fn FairnessMonitor::max_recall_gap(self : FairnessMonitor) -> Double

    FairnessMonitor::new

    FairnessMonitor::observations

    fn FairnessMonitor::observations(self : FairnessMonitor) -> Int

    FairnessMonitor::observe

    fn FairnessMonitor::observe(self : FairnessMonitor, group : String, prediction : Double, label : Double, threshold? : Double) -> Unit

    FairnessMonitor::reset

    fn FairnessMonitor::reset(self : FairnessMonitor) -> Unit

    FallbackMode

    pub(all) enum FallbackMode {
    Reject
    BestAvailable
    DefaultRoute
    } derive(Eq,
    Debug
    )

    FeatureAttribution

    pub struct FeatureAttribution {
    index : Int
    contribution : Double
    }

    Lightweight local explanations for linear and sparse predictions.

    FeatureAttribution::contribution

    fn FeatureAttribution::contribution(self : FeatureAttribution) -> Double

    FeatureAttribution::index

    fn FeatureAttribution::index(self : FeatureAttribution) -> Int

    FeatureAttribution::new

    fn FeatureAttribution::new(index : Int, contribution : Double) -> FeatureAttribution

    FeatureCrossEncoder

    pub struct FeatureCrossEncoder {
    hasher : FeatureHasher
    separator : String
    crosses : Int
    }

    FeatureCrossEncoder::buckets

    fn FeatureCrossEncoder::buckets(self : FeatureCrossEncoder) -> Int

    FeatureCrossEncoder::crosses

    fn FeatureCrossEncoder::crosses(self : FeatureCrossEncoder) -> Int

    FeatureCrossEncoder::encode

    fn FeatureCrossEncoder::encode(self : FeatureCrossEncoder, values : Array[String]) -> SparseVector

    FeatureCrossEncoder::encode_ordered

    fn FeatureCrossEncoder::encode_ordered(self : FeatureCrossEncoder, values : Array[String], order : Int) -> SparseVector

    FeatureCrossEncoder::new

    fn FeatureCrossEncoder::new(buckets : Int, separator? : String) -> FeatureCrossEncoder

    FeatureCrossEncoder::reset

    fn FeatureCrossEncoder::reset(self : FeatureCrossEncoder) -> Unit

    FeatureDriftSummary

    pub struct FeatureDriftSummary {
    changed : Array[Bool]
    scores : Array[Double]
    }

    FeatureDriftSummary::changed

    fn FeatureDriftSummary::changed(self : FeatureDriftSummary, index : Int) -> Bool

    FeatureDriftSummary::changed_count

    fn FeatureDriftSummary::changed_count(self : FeatureDriftSummary) -> Int

    FeatureDriftSummary::new

    fn FeatureDriftSummary::new(scores : Array[Double], threshold : Double) -> FeatureDriftSummary

    FeatureDriftSummary::scores

    fn FeatureDriftSummary::scores(self : FeatureDriftSummary) -> Array[Double]

    FeatureHasher

    pub struct FeatureHasher {
    buckets : Int
    signed : Bool
    }

    FeatureHasher::buckets

    fn FeatureHasher::buckets(self : FeatureHasher) -> Int

    FeatureHasher::encode

    fn FeatureHasher::encode(self : FeatureHasher, tokens : Array[String]) -> SparseVector

    FeatureHasher::encode_map

    fn FeatureHasher::encode_map(self : FeatureHasher, values : Map[String, Double]) -> SparseVector

    FeatureHasher::encode_weighted

    fn FeatureHasher::encode_weighted(self : FeatureHasher, tokens : Array[(String, Double)]) -> SparseVector

    FeatureHasher::index

    fn FeatureHasher::index(self : FeatureHasher, token : String) -> Int

    FeatureHasher::new

    fn FeatureHasher::new(buckets : Int, signed? : Bool) -> FeatureHasher

    FeatureMaterializer

    pub struct FeatureMaterializer {
    schema : FeatureSchema
    defaults : Array[Double]
    materialized : Int
    fallback : Int
    }

    FeatureMaterializer::fallback

    fn FeatureMaterializer::fallback(self : FeatureMaterializer) -> Int

    FeatureMaterializer::materialize

    fn FeatureMaterializer::materialize(self : FeatureMaterializer, values : Array[Double]) -> Array[Double]

    FeatureMaterializer::materialized

    fn FeatureMaterializer::materialized(self : FeatureMaterializer) -> Int

    FeatureMaterializer::new

    fn FeatureMaterializer::new(schema : FeatureSchema, defaults? : Array[Double]) -> FeatureMaterializer

    FeatureMaterializer::reset

    fn FeatureMaterializer::reset(self : FeatureMaterializer) -> Unit

    FeaturePipeline

    pub struct FeaturePipeline {
    standardizer : Standardizer
    lower : Array[Double]
    upper : Array[Double]
    clip_enabled : Bool
    hasher : FeatureHasher?
    transformed : Int
    }

    A reusable online feature pipeline: optional clipping, Welford standardization, and deterministic sparse hashing.

    FeaturePipeline::dimension

    fn FeaturePipeline::dimension(self : FeaturePipeline) -> Int

    FeaturePipeline::disable_clip

    fn FeaturePipeline::disable_clip(self : FeaturePipeline) -> Unit

    FeaturePipeline::fit_only

    fn FeaturePipeline::fit_only(self : FeaturePipeline, features : Array[Double]) -> Unit

    FeaturePipeline::mean

    fn FeaturePipeline::mean(self : FeaturePipeline) -> Array[Double]

    FeaturePipeline::new

    fn FeaturePipeline::new(dimension : Int, clip_lower? : Double, clip_upper? : Double, hashing_buckets? : Int) -> FeaturePipeline

    FeaturePipeline::reset

    fn FeaturePipeline::reset(self : FeaturePipeline) -> Unit

    FeaturePipeline::set_clip

    fn FeaturePipeline::set_clip(self : FeaturePipeline, lower : Double, upper : Double) -> Bool

    FeaturePipeline::transform

    fn FeaturePipeline::transform(self : FeaturePipeline, features : Array[Double]) -> Array[Double]

    FeaturePipeline::transform_tokens

    fn FeaturePipeline::transform_tokens(self : FeaturePipeline, tokens : Array[String]) -> SparseVector?

    FeaturePipeline::transformed

    fn FeaturePipeline::transformed(self : FeaturePipeline) -> Int

    FeaturePipeline::variance

    fn FeaturePipeline::variance(self : FeaturePipeline) -> Array[Double]

    FeatureRangeMonitor

    pub struct FeatureRangeMonitor {
    lower : Array[Double]
    upper : Array[Double]
    minimum : Array[Double]
    maximum : Array[Double]
    violations : Array[Int]
    }

    FeatureRangeMonitor::maximum

    fn FeatureRangeMonitor::maximum(self : FeatureRangeMonitor) -> Array[Double]

    FeatureRangeMonitor::minimum

    fn FeatureRangeMonitor::minimum(self : FeatureRangeMonitor) -> Array[Double]

    FeatureRangeMonitor::new

    fn FeatureRangeMonitor::new(lower : Array[Double], upper : Array[Double]) -> FeatureRangeMonitor

    FeatureRangeMonitor::observe

    fn FeatureRangeMonitor::observe(self : FeatureRangeMonitor, features : Array[Double]) -> Bool

    FeatureRangeMonitor::reset

    fn FeatureRangeMonitor::reset(self : FeatureRangeMonitor) -> Unit

    FeatureRangeMonitor::violations

    fn FeatureRangeMonitor::violations(self : FeatureRangeMonitor) -> Array[Int]

    FeatureRecord

    pub struct FeatureRecord {
    key : String
    version : Int
    values : Array[Double]
    timestamp : Int64
    source : String
    }

    FeatureRecord::checksum

    fn FeatureRecord::checksum(self : FeatureRecord) -> String

    FeatureRecord::key

    fn FeatureRecord::key(self : FeatureRecord) -> String

    FeatureRecord::new

    fn FeatureRecord::new(key : String, values : Array[Double], timestamp : Int64, source? : String, version? : Int) -> FeatureRecord

    FeatureRecord::source

    fn FeatureRecord::source(self : FeatureRecord) -> String

    FeatureRecord::timestamp

    fn FeatureRecord::timestamp(self : FeatureRecord) -> Int64

    FeatureRecord::values

    fn FeatureRecord::values(self : FeatureRecord) -> Array[Double]

    FeatureRecord::version

    fn FeatureRecord::version(self : FeatureRecord) -> Int

    FeatureSchema

    pub struct FeatureSchema {
    name : String
    dimension : Int
    minimum : Array[Double]
    maximum : Array[Double]
    required : Bool
    }

    In-memory feature registry with schema checks, versioning, and bounded history.

    FeatureSchema::dimension

    fn FeatureSchema::dimension(self : FeatureSchema) -> Int

    FeatureSchema::name

    fn FeatureSchema::name(self : FeatureSchema) -> String

    FeatureSchema::new

    fn FeatureSchema::new(name : String, dimension : Int, minimum? : Array[Double], maximum? : Array[Double], required? : Bool) -> FeatureSchema

    FeatureSchema::required

    fn FeatureSchema::required(self : FeatureSchema) -> Bool

    FeatureSchema::validate

    fn FeatureSchema::validate(self : FeatureSchema, values : Array[Double]) -> ValidationReport

    FeatureStore

    pub struct FeatureStore {
    schemas : Map[String, FeatureSchema]
    records : Map[String, Array[FeatureRecord]]
    capacity : Int
    writes : Int
    reads : Int
    misses : Int
    rejected : Int
    }

    FeatureStore::at_version

    fn FeatureStore::at_version(self : FeatureStore, name : String, version : Int) -> FeatureRecord?

    FeatureStore::clear

    fn FeatureStore::clear(self : FeatureStore) -> Unit

    FeatureStore::history

    fn FeatureStore::history(self : FeatureStore, name : String) -> Array[FeatureRecord]

    FeatureStore::hit_rate

    fn FeatureStore::hit_rate(self : FeatureStore) -> Double

    FeatureStore::latest

    fn FeatureStore::latest(self : FeatureStore, name : String) -> FeatureRecord?

    FeatureStore::misses

    fn FeatureStore::misses(self : FeatureStore) -> Int

    FeatureStore::new

    fn FeatureStore::new(capacity? : Int) -> FeatureStore

    FeatureStore::put

    fn FeatureStore::put(self : FeatureStore, name : String, record : FeatureRecord) -> Bool

    FeatureStore::reads

    fn FeatureStore::reads(self : FeatureStore) -> Int

    FeatureStore::register

    fn FeatureStore::register(self : FeatureStore, schema : FeatureSchema) -> Bool

    FeatureStore::rejected

    fn FeatureStore::rejected(self : FeatureStore) -> Int

    FeatureStore::schema

    fn FeatureStore::schema(self : FeatureStore, name : String) -> FeatureSchema?

    FeatureStore::writes

    fn FeatureStore::writes(self : FeatureStore) -> Int

    FeatureValue

    pub enum FeatureValue {
    Number(Double)
    Category(String)
    Boolean(Bool)
    Missing
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    A scalar feature value before it is encoded into a numeric vector.

    FeatureValue::as_number

    fn FeatureValue::as_number(self : FeatureValue, missing_value? : Double) -> Double

    FeatureValue::is_missing

    fn FeatureValue::is_missing(self : FeatureValue) -> Bool

    ForecastBlendModel

    pub struct ForecastBlendModel {
    weights : Map[String, Double]
    forecasts : Map[String, Array[ForecastPoint]]
    updates : Int
    }

    ForecastBlendModel::models

    fn ForecastBlendModel::models(self : ForecastBlendModel) -> Array[String]

    ForecastBlendModel::new

    ForecastBlendModel::observe

    fn ForecastBlendModel::observe(self : ForecastBlendModel, model : String, points : Array[ForecastPoint]) -> Bool

    ForecastBlendModel::predict

    ForecastBlendModel::reset

    fn ForecastBlendModel::reset(self : ForecastBlendModel) -> Unit

    ForecastBlendModel::set_weight

    fn ForecastBlendModel::set_weight(self : ForecastBlendModel, model : String, weight : Double) -> Bool

    ForecastBlendModel::updates

    fn ForecastBlendModel::updates(self : ForecastBlendModel) -> Int

    ForecastBlendModel::weight

    fn ForecastBlendModel::weight(self : ForecastBlendModel, model : String) -> Double

    ForecastErrorTracker

    pub struct ForecastErrorTracker {
    observations : Int
    absolute_error : Double
    squared_error : Double
    percentage_error : Double
    bias : Double
    underestimates : Int
    overestimates : Int
    worst_error : Double
    }

    ForecastErrorTracker::bias

    fn ForecastErrorTracker::bias(self : ForecastErrorTracker) -> Double

    ForecastErrorTracker::mae

    fn ForecastErrorTracker::mae(self : ForecastErrorTracker) -> Double

    ForecastErrorTracker::mape

    fn ForecastErrorTracker::mape(self : ForecastErrorTracker) -> Double

    ForecastErrorTracker::new

    ForecastErrorTracker::observations

    fn ForecastErrorTracker::observations(self : ForecastErrorTracker) -> Int

    ForecastErrorTracker::observe

    fn ForecastErrorTracker::observe(self : ForecastErrorTracker, actual : Double, forecast : Double) -> Unit

    ForecastErrorTracker::overestimates

    fn ForecastErrorTracker::overestimates(self : ForecastErrorTracker) -> Int

    ForecastErrorTracker::reset

    fn ForecastErrorTracker::reset(self : ForecastErrorTracker) -> Unit

    ForecastErrorTracker::rmse

    fn ForecastErrorTracker::rmse(self : ForecastErrorTracker) -> Double

    ForecastErrorTracker::underestimates

    fn ForecastErrorTracker::underestimates(self : ForecastErrorTracker) -> Int

    ForecastErrorTracker::worst_error

    fn ForecastErrorTracker::worst_error(self : ForecastErrorTracker) -> Double

    ForecastPoint

    pub struct ForecastPoint {
    timestamp : Int64
    value : Double
    lower : Double
    upper : Double
    }

    Streaming forecasting models for operational demand and metric series.

    The models expose both point forecasts and uncertainty bands. They update in O(1) or O(period) per observation, which keeps them useful for service health metrics, inventory signals, and low-latency baseline prediction.

    ForecastPoint::lower

    fn ForecastPoint::lower(self : ForecastPoint) -> Double

    ForecastPoint::new

    fn ForecastPoint::new(timestamp : Int64, value : Double, lower : Double, upper : Double) -> ForecastPoint

    ForecastPoint::timestamp

    fn ForecastPoint::timestamp(self : ForecastPoint) -> Int64

    ForecastPoint::upper

    fn ForecastPoint::upper(self : ForecastPoint) -> Double

    ForecastPoint::value

    fn ForecastPoint::value(self : ForecastPoint) -> Double

    ForecastTracker

    pub struct ForecastTracker {
    metrics : RegressionMetrics
    predictions : Int
    }

    ForecastTracker::mae

    fn ForecastTracker::mae(self : ForecastTracker) -> Double

    ForecastTracker::new

    ForecastTracker::observe

    fn ForecastTracker::observe(self : ForecastTracker, prediction : Double, actual : Double) -> Unit

    ForecastTracker::predictions

    fn ForecastTracker::predictions(self : ForecastTracker) -> Int

    ForecastTracker::r2

    fn ForecastTracker::r2(self : ForecastTracker) -> Double

    ForecastTracker::reset

    fn ForecastTracker::reset(self : ForecastTracker) -> Unit

    ForecastTracker::rmse

    fn ForecastTracker::rmse(self : ForecastTracker) -> Double

    GatedRegressor

    pub struct GatedRegressor {
    low : OnlineRidgeRegression
    high : OnlineRidgeRegression
    boundary : Double
    low_count : Int
    high_count : Int
    }

    GatedRegressor::high_count

    fn GatedRegressor::high_count(self : GatedRegressor) -> Int

    GatedRegressor::low_count

    fn GatedRegressor::low_count(self : GatedRegressor) -> Int

    GatedRegressor::new

    fn GatedRegressor::new(dimension : Int, boundary? : Double) -> GatedRegressor

    GatedRegressor::predict

    fn GatedRegressor::predict(self : GatedRegressor, features : Array[Double], gate : Double) -> Double

    GatedRegressor::update

    fn GatedRegressor::update(self : GatedRegressor, features : Array[Double], gate : Double, label : Double) -> Unit

    GaussianClassStats

    pub struct GaussianClassStats {
    count : Double
    mean : Array[Double]
    m2 : Array[Double]
    }

    Per-class Gaussian sufficient statistics.

    GaussianClassStats::count

    fn GaussianClassStats::count(self : GaussianClassStats) -> Double

    GaussianClassStats::log_likelihood

    fn GaussianClassStats::log_likelihood(self : GaussianClassStats, features : Array[Double], smoothing? : Double) -> Double

    GaussianClassStats::mean

    fn GaussianClassStats::mean(self : GaussianClassStats) -> Array[Double]

    GaussianClassStats::new

    fn GaussianClassStats::new(dimension : Int) -> GaussianClassStats

    GaussianClassStats::reset

    fn GaussianClassStats::reset(self : GaussianClassStats) -> Unit

    GaussianClassStats::update

    fn GaussianClassStats::update(self : GaussianClassStats, features : Array[Double], weight? : Double) -> Unit

    GaussianClassStats::variance

    fn GaussianClassStats::variance(self : GaussianClassStats, smoothing? : Double) -> Array[Double]

    GradientAccumulator

    pub struct GradientAccumulator {
    gradients : Array[Double]
    count : Int
    }

    GradientAccumulator::add

    fn GradientAccumulator::add(self : GradientAccumulator, gradients : Array[Double]) -> Unit

    GradientAccumulator::count

    fn GradientAccumulator::count(self : GradientAccumulator) -> Int

    GradientAccumulator::mean

    fn GradientAccumulator::mean(self : GradientAccumulator) -> Array[Double]

    GradientAccumulator::new

    fn GradientAccumulator::new(dimension : Int) -> GradientAccumulator

    GradientAccumulator::sum

    fn GradientAccumulator::sum(self : GradientAccumulator) -> Array[Double]

    GradientAccumulator::take_mean

    fn GradientAccumulator::take_mean(self : GradientAccumulator) -> Array[Double]

    GradientClipper

    pub struct GradientClipper {
    max_norm : Double
    max_value : Double
    }

    GradientClipper::clip

    fn GradientClipper::clip(self : GradientClipper, gradients : Array[Double]) -> Array[Double]

    GradientClipper::max_norm

    fn GradientClipper::max_norm(self : GradientClipper) -> Double

    GradientClipper::max_value

    fn GradientClipper::max_value(self : GradientClipper) -> Double

    GradientClipper::new

    fn GradientClipper::new(max_norm? : Double, max_value? : Double) -> GradientClipper

    GradientGuard

    pub struct GradientGuard {
    lower : Double
    upper : Double
    clipped : Int
    invalid : Int
    }

    GradientGuard::apply

    fn GradientGuard::apply(self : GradientGuard, gradient : Array[Double]) -> Array[Double]

    GradientGuard::clipped

    fn GradientGuard::clipped(self : GradientGuard) -> Int

    GradientGuard::invalid

    fn GradientGuard::invalid(self : GradientGuard) -> Int

    GradientGuard::new

    fn GradientGuard::new(lower? : Double, upper? : Double) -> GradientGuard

    GradientGuard::reset

    fn GradientGuard::reset(self : GradientGuard) -> Unit

    GraphNeighbor

    pub struct GraphNeighbor {
    node : String
    weight : Double
    }

    Incremental graph primitives for recommendation, similarity, and dependency analysis.

    The graph stores directed weighted edges and maintains enough aggregate state for bounded online updates. It is suitable for co-visitation graphs, feature-dependency graphs, and lightweight personalized retrieval.

    GraphNeighbor::new

    fn GraphNeighbor::new(node : String, weight : Double) -> GraphNeighbor

    GraphNeighbor::node

    fn GraphNeighbor::node(self : GraphNeighbor) -> String

    GraphNeighbor::weight

    fn GraphNeighbor::weight(self : GraphNeighbor) -> Double

    GraphNodeScore

    pub struct GraphNodeScore {
    node : String
    score : Double
    rank : Int
    }

    GraphNodeScore::new

    fn GraphNodeScore::new(node : String, score : Double, rank : Int) -> GraphNodeScore

    GraphNodeScore::node

    fn GraphNodeScore::node(self : GraphNodeScore) -> String

    GraphNodeScore::rank

    fn GraphNodeScore::rank(self : GraphNodeScore) -> Int

    GraphNodeScore::score

    fn GraphNodeScore::score(self : GraphNodeScore) -> Double

    GraphSummary

    pub struct GraphSummary {
    nodes : Int
    edges : Int
    total_weight : Double
    density : Double
    average_degree : Double
    self_loops : Int
    }

    GraphSummary::average_degree

    fn GraphSummary::average_degree(self : GraphSummary) -> Double

    GraphSummary::density

    fn GraphSummary::density(self : GraphSummary) -> Double

    GraphSummary::edges

    fn GraphSummary::edges(self : GraphSummary) -> Int

    GraphSummary::nodes

    fn GraphSummary::nodes(self : GraphSummary) -> Int

    GraphSummary::self_loops

    fn GraphSummary::self_loops(self : GraphSummary) -> Int

    GraphSummary::total_weight

    fn GraphSummary::total_weight(self : GraphSummary) -> Double

    GroupMetric

    pub struct GroupMetric {
    group : String
    count : Int
    positives : Int
    true_positives : Int
    false_positives : Int
    false_negatives : Int
    }

    Group-level diagnostics for online classification services.

    GroupMetric::count

    fn GroupMetric::count(self : GroupMetric) -> Int

    GroupMetric::false_positive_rate

    fn GroupMetric::false_positive_rate(self : GroupMetric) -> Double

    GroupMetric::group

    fn GroupMetric::group(self : GroupMetric) -> String

    GroupMetric::new

    fn GroupMetric::new(group : String) -> GroupMetric

    GroupMetric::observe

    fn GroupMetric::observe(self : GroupMetric, prediction : Double, label : Double, threshold? : Double) -> Unit

    GroupMetric::positive_rate

    fn GroupMetric::positive_rate(self : GroupMetric) -> Double

    GroupMetric::precision

    fn GroupMetric::precision(self : GroupMetric) -> Double

    GroupMetric::recall

    fn GroupMetric::recall(self : GroupMetric) -> Double

    GroupMetric::reset

    fn GroupMetric::reset(self : GroupMetric) -> Unit

    HashedFeatureSelector

    pub struct HashedFeatureSelector {
    dimension : Int
    importance : ExponentialImportance
    threshold : Double
    }

    A bounded vocabulary selector that keeps the most useful hashed features.

    HashedFeatureSelector::dimension

    fn HashedFeatureSelector::dimension(self : HashedFeatureSelector) -> Int

    HashedFeatureSelector::new

    fn HashedFeatureSelector::new(dimension : Int, threshold? : Double) -> HashedFeatureSelector

    HashedFeatureSelector::observe

    fn HashedFeatureSelector::observe(self : HashedFeatureSelector, vector : SparseVector, gradient : Double) -> Unit

    HashedFeatureSelector::reset

    HashedFeatureSelector::scores

    fn HashedFeatureSelector::scores(self : HashedFeatureSelector) -> Array[Double]

    HashedFeatureSelector::selected

    HashedFeatureSelector::selected_top_k

    fn HashedFeatureSelector::selected_top_k(self : HashedFeatureSelector, k : Int) -> Array[Int]

    HashingVectorizer

    pub struct HashingVectorizer {
    hasher : FeatureHasher
    lowercase : Bool
    ngram_order : Int
    }

    Token hashing utilities for text and event-key features.

    HashingVectorizer::buckets

    fn HashingVectorizer::buckets(self : HashingVectorizer) -> Int

    HashingVectorizer::encode

    fn HashingVectorizer::encode(self : HashingVectorizer, text : String) -> SparseVector

    HashingVectorizer::new

    fn HashingVectorizer::new(buckets : Int, lowercase? : Bool, ngram_order? : Int) -> HashingVectorizer

    HashingVectorizer::tokens

    fn HashingVectorizer::tokens(self : HashingVectorizer, text : String) -> Array[String]

    HeavyHitter

    pub struct HeavyHitter {
    key : String
    count : Int
    error : Int
    }

    HeavyHitter::count

    fn HeavyHitter::count(self : HeavyHitter) -> Int

    HeavyHitter::error

    fn HeavyHitter::error(self : HeavyHitter) -> Int

    HeavyHitter::key

    fn HeavyHitter::key(self : HeavyHitter) -> String

    HeavyHitter::new

    fn HeavyHitter::new(key : String, count : Int, error : Int) -> HeavyHitter

    HeavyHitters

    pub struct HeavyHitters {
    capacity : Int
    entries : Map[String, Int]
    updates : Int
    evictions : Int
    }

    HeavyHitters::estimate

    fn HeavyHitters::estimate(self : HeavyHitters, key : String) -> Int

    HeavyHitters::evictions

    fn HeavyHitters::evictions(self : HeavyHitters) -> Int

    HeavyHitters::new

    fn HeavyHitters::new(capacity : Int) -> HeavyHitters

    HeavyHitters::reset

    fn HeavyHitters::reset(self : HeavyHitters) -> Unit

    HeavyHitters::size

    fn HeavyHitters::size(self : HeavyHitters) -> Int

    HeavyHitters::top

    fn HeavyHitters::top(self : HeavyHitters, limit : Int) -> Array[HeavyHitter]

    HeavyHitters::update

    fn HeavyHitters::update(self : HeavyHitters, key : String, amount? : Int) -> Unit

    HeavyHitters::updates

    fn HeavyHitters::updates(self : HeavyHitters) -> Int

    HistogramAuc

    pub struct HistogramAuc {
    positive : Array[Double]
    negative : Array[Double]
    total_positive : Double
    total_negative : Double
    }

    Fixed-bin AUC approximation for bounded-memory deployments.

    HistogramAuc::auc

    fn HistogramAuc::auc(self : HistogramAuc) -> Double

    HistogramAuc::bins

    fn HistogramAuc::bins(self : HistogramAuc) -> Int

    HistogramAuc::new

    fn HistogramAuc::new(bins? : Int) -> HistogramAuc

    HistogramAuc::reset

    fn HistogramAuc::reset(self : HistogramAuc) -> Unit

    HistogramAuc::update

    fn HistogramAuc::update(self : HistogramAuc, score : Double, label : Double, weight? : Double) -> Unit

    HistogramBin

    pub struct HistogramBin {
    lower : Double
    upper : Double
    count : Double
    sum : Double
    square_sum : Double
    positive : Double
    }

    Streaming histogram and shallow-tree models for bounded online learning.

    These components are deliberately small enough for edge deployment while retaining useful production behavior: bounded memory, incremental updates, quantile queries, adaptive thresholds, and prediction dispersion.

    HistogramBin::count

    fn HistogramBin::count(self : HistogramBin) -> Double

    HistogramBin::lower

    fn HistogramBin::lower(self : HistogramBin) -> Double

    HistogramBin::mean

    fn HistogramBin::mean(self : HistogramBin) -> Double

    HistogramBin::new

    fn HistogramBin::new(lower : Double, upper : Double) -> HistogramBin

    HistogramBin::observe

    fn HistogramBin::observe(self : HistogramBin, value : Double, weight : Double, positive : Bool) -> Unit

    HistogramBin::positive_rate

    fn HistogramBin::positive_rate(self : HistogramBin) -> Double

    HistogramBin::reset

    fn HistogramBin::reset(self : HistogramBin) -> Unit

    HistogramBin::sum

    fn HistogramBin::sum(self : HistogramBin) -> Double

    HistogramBin::upper

    fn HistogramBin::upper(self : HistogramBin) -> Double

    HistogramBin::variance

    fn HistogramBin::variance(self : HistogramBin) -> Double

    HoldoutSplit

    pub struct HoldoutSplit {
    train : DataBatch
    holdout : DataBatch
    }

    HoldoutSplit::holdout

    fn HoldoutSplit::holdout(self : HoldoutSplit) -> DataBatch

    HoldoutSplit::holdout_size

    fn HoldoutSplit::holdout_size(self : HoldoutSplit) -> Int

    HoldoutSplit::new

    fn HoldoutSplit::new(batch : DataBatch, train_ratio? : Double) -> HoldoutSplit

    HoldoutSplit::train

    fn HoldoutSplit::train(self : HoldoutSplit) -> DataBatch

    HoldoutSplit::train_size

    fn HoldoutSplit::train_size(self : HoldoutSplit) -> Int

    HoltWinters

    pub struct HoltWinters {
    alpha : Double
    beta : Double
    gamma : Double
    season_length : Int
    seasonals : Array[Double]
    level : Double
    trend : Double
    count : Int
    }

    Holt-Winters style level/trend/seasonal smoother.

    HoltWinters::count

    fn HoltWinters::count(self : HoltWinters) -> Int

    HoltWinters::forecast

    fn HoltWinters::forecast(self : HoltWinters, horizon : Int) -> Array[Double]

    HoltWinters::level

    fn HoltWinters::level(self : HoltWinters) -> Double

    HoltWinters::new

    fn HoltWinters::new(season_length : Int, alpha? : Double, beta? : Double, gamma? : Double) -> HoltWinters

    HoltWinters::reset

    fn HoltWinters::reset(self : HoltWinters) -> Unit

    HoltWinters::seasonals

    fn HoltWinters::seasonals(self : HoltWinters) -> Array[Double]

    HoltWinters::trend

    fn HoltWinters::trend(self : HoltWinters) -> Double

    HoltWinters::update

    fn HoltWinters::update(self : HoltWinters, value : Double) -> Double

    IdempotencyLedger

    pub struct IdempotencyLedger {
    capacity : Int
    keys : Map[String, Int64]
    order : Array[String]
    duplicates : Int
    evictions : Int
    }

    Bounded idempotency ledger for event consumers. A key is accepted only once while it remains in the ledger; evictions are deterministic FIFO.

    IdempotencyLedger::accept

    fn IdempotencyLedger::accept(self : IdempotencyLedger, key : String, timestamp : Int64) -> Bool

    IdempotencyLedger::contains

    fn IdempotencyLedger::contains(self : IdempotencyLedger, key : String) -> Bool

    IdempotencyLedger::duplicates

    fn IdempotencyLedger::duplicates(self : IdempotencyLedger) -> Int

    IdempotencyLedger::evictions

    fn IdempotencyLedger::evictions(self : IdempotencyLedger) -> Int

    IdempotencyLedger::new

    fn IdempotencyLedger::new(capacity? : Int) -> IdempotencyLedger

    IdempotencyLedger::reset

    fn IdempotencyLedger::reset(self : IdempotencyLedger) -> Unit

    IdempotencyLedger::size

    fn IdempotencyLedger::size(self : IdempotencyLedger) -> Int

    IdempotencyLedger::timestamp

    fn IdempotencyLedger::timestamp(self : IdempotencyLedger, key : String) -> Int64?

    IngestionGate

    pub struct IngestionGate {
    contract : DataContract
    ledger : IdempotencyLedger
    summary : RowQualitySummary
    }

    Combines contract validation and idempotency checks into one ingestion gate. It is intentionally stateful so its counters can feed monitoring.

    IngestionGate::accept

    fn IngestionGate::accept(self : IngestionGate, key : String, timestamp : Int64, values : Array[ContractValue]) -> Bool

    IngestionGate::contract

    fn IngestionGate::contract(self : IngestionGate) -> DataContract

    IngestionGate::ledger

    IngestionGate::new

    fn IngestionGate::new(contract : DataContract, ledger_capacity? : Int) -> IngestionGate

    IngestionGate::reset

    fn IngestionGate::reset(self : IngestionGate) -> Unit

    IngestionGate::summary

    IntermittentDemandForecaster

    pub struct IntermittentDemandForecaster {
    alpha : Double
    demand : Double
    interval : Double
    since_demand : Int
    observations : Int
    nonzero : Int
    }

    Croston-style intermittent demand forecaster. It separately smooths non-zero demand size and the interval between non-zero arrivals.

    IntermittentDemandForecaster::demand_size

    IntermittentDemandForecaster::forecast

    IntermittentDemandForecaster::interval

    IntermittentDemandForecaster::new

    IntermittentDemandForecaster::nonzero

    IntermittentDemandForecaster::observations

    IntermittentDemandForecaster::predict

    fn IntermittentDemandForecaster::predict(self : IntermittentDemandForecaster, horizon : Int, start_timestamp? : Int64, step? : Int64) -> Array[ForecastPoint]

    IntermittentDemandForecaster::reset

    IntermittentDemandForecaster::update

    fn IntermittentDemandForecaster::update(self : IntermittentDemandForecaster, value : Double) -> Double

    ItemCooccurrenceModel

    pub struct ItemCooccurrenceModel {
    pair_weights : Map[String, Double]
    item_counts : Map[String, Double]
    sessions : Int
    events : Int
    }

    Maintains item co-occurrence weights from sessions or baskets. Pair keys are kept canonical so (a,b) and (b,a) share one statistic.

    ItemCooccurrenceModel::events

    ItemCooccurrenceModel::item_count

    fn ItemCooccurrenceModel::item_count(self : ItemCooccurrenceModel, item : String) -> Double

    ItemCooccurrenceModel::items

    ItemCooccurrenceModel::new

    ItemCooccurrenceModel::observe

    fn ItemCooccurrenceModel::observe(self : ItemCooccurrenceModel, items : Array[String]) -> Unit

    ItemCooccurrenceModel::recommend

    fn ItemCooccurrenceModel::recommend(self : ItemCooccurrenceModel, history : Array[String], limit? : Int) -> Array[GraphNeighbor]

    ItemCooccurrenceModel::reset

    ItemCooccurrenceModel::score

    fn ItemCooccurrenceModel::score(self : ItemCooccurrenceModel, left : String, right : String) -> Double

    ItemCooccurrenceModel::sessions

    fn ItemCooccurrenceModel::sessions(self : ItemCooccurrenceModel) -> Int

    ItemCooccurrenceModel::similarity

    fn ItemCooccurrenceModel::similarity(self : ItemCooccurrenceModel, left : String, right : String) -> Double

    KernelKind

    pub enum KernelKind {
    Linear
    Polynomial(degree~ : Int, scale~ : Double, offset~ : Double)
    Gaussian(width~ : Double)
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    Kernel choices for compact online non-linear models.

    KernelKind::evaluate

    fn KernelKind::evaluate(self : KernelKind, left : Array[Double], right : Array[Double]) -> Double

    KernelSupport

    pub struct KernelSupport {
    features : Array[Double]
    label : Double
    coefficient : Double
    }

    KernelSupport::coefficient

    fn KernelSupport::coefficient(self : KernelSupport) -> Double

    KernelSupport::features

    fn KernelSupport::features(self : KernelSupport) -> Array[Double]

    KernelSupport::label

    fn KernelSupport::label(self : KernelSupport) -> Double

    KeyedFeatureJoin

    pub struct KeyedFeatureJoin {
    capacity : Int
    pending_features : Map[String, Array[Double]]
    pending_labels : Map[String, Double]
    matched : Int
    dropped : Int
    }

    Bounded keyed join for combining asynchronous feature and label streams.

    KeyedFeatureJoin::dropped

    fn KeyedFeatureJoin::dropped(self : KeyedFeatureJoin) -> Int

    KeyedFeatureJoin::matched

    fn KeyedFeatureJoin::matched(self : KeyedFeatureJoin) -> Int

    KeyedFeatureJoin::new

    fn KeyedFeatureJoin::new(capacity : Int) -> KeyedFeatureJoin

    KeyedFeatureJoin::pending

    fn KeyedFeatureJoin::pending(self : KeyedFeatureJoin) -> Int

    KeyedFeatureJoin::put_features

    fn KeyedFeatureJoin::put_features(self : KeyedFeatureJoin, key : String, features : Array[Double]) -> Array[Double]?

    KeyedFeatureJoin::put_label

    fn KeyedFeatureJoin::put_label(self : KeyedFeatureJoin, key : String, label : Double) -> Array[Double]?

    KeyedFeatureJoin::reset

    fn KeyedFeatureJoin::reset(self : KeyedFeatureJoin) -> Unit

    LatencyTracker

    pub struct LatencyTracker {
    samples : SequenceWindow
    total : Int
    rejected : Int
    }

    LatencyTracker::count

    fn LatencyTracker::count(self : LatencyTracker) -> Int

    LatencyTracker::mean

    fn LatencyTracker::mean(self : LatencyTracker) -> Double

    LatencyTracker::new

    fn LatencyTracker::new(capacity? : Int) -> LatencyTracker

    LatencyTracker::observe

    fn LatencyTracker::observe(self : LatencyTracker, milliseconds : Double) -> Bool

    LatencyTracker::p95

    fn LatencyTracker::p95(self : LatencyTracker) -> Double

    LatencyTracker::percentile

    fn LatencyTracker::percentile(self : LatencyTracker, probability : Double) -> Double

    LatencyTracker::rejected

    fn LatencyTracker::rejected(self : LatencyTracker) -> Int

    LatencyTracker::reset

    fn LatencyTracker::reset(self : LatencyTracker) -> Unit

    LatencyTracker::total

    fn LatencyTracker::total(self : LatencyTracker) -> Int

    LearningCurve

    pub struct LearningCurve {
    train : MetricSeries
    validation : MetricSeries
    }

    LearningCurve::generalization_gap

    fn LearningCurve::generalization_gap(self : LearningCurve) -> Double

    LearningCurve::new

    fn LearningCurve::new(capacity? : Int) -> LearningCurve

    LearningCurve::record

    fn LearningCurve::record(self : LearningCurve, train_loss : Double, validation_loss : Double) -> Unit

    LearningCurve::reset

    fn LearningCurve::reset(self : LearningCurve) -> Unit

    LearningCurve::train

    fn LearningCurve::train(self : LearningCurve) -> Array[Double]

    LearningCurve::validation

    fn LearningCurve::validation(self : LearningCurve) -> Array[Double]

    LearningRateSchedule

    pub enum LearningRateSchedule {
    Constant
    InverseScaling(power~ : Double)
    ExponentialDecay(decay~ : Double)
    CosineDecay(minimum~ : Double, period~ : Int)
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    Learning-rate schedules shared by adaptive online optimizers.

    LearningRateSchedule::rate

    fn LearningRateSchedule::rate(self : LearningRateSchedule, initial : Double, step : Int) -> Double

    LineageNode

    pub struct LineageNode {
    dataset : String
    source : String
    schema : String
    row_count : Int
    checksum : String
    timestamp : Int64
    }

    LineageNode::checksum

    fn LineageNode::checksum(self : LineageNode) -> String

    LineageNode::dataset

    fn LineageNode::dataset(self : LineageNode) -> String

    LineageNode::new

    fn LineageNode::new(dataset : String, source : String, schema : String, row_count : Int, checksum : String, timestamp : Int64) -> LineageNode

    LineageNode::row_count

    fn LineageNode::row_count(self : LineageNode) -> Int

    LineageNode::schema

    fn LineageNode::schema(self : LineageNode) -> String

    LineageNode::source

    fn LineageNode::source(self : LineageNode) -> String

    LineageNode::timestamp

    fn LineageNode::timestamp(self : LineageNode) -> Int64

    LinearEndpoint

    pub struct LinearEndpoint {
    weights : Array[Double]
    bias : Double
    version : String
    prediction_guard : PredictionGuard
    requests : Int
    rejected : Int
    }

    LinearEndpoint::new

    fn LinearEndpoint::new(weights : Array[Double], bias? : Double, version? : String, lower? : Double, upper? : Double) -> LinearEndpoint

    LinearEndpoint::predict

    LinearEndpoint::predict_batch

    LinearEndpoint::rejected

    fn LinearEndpoint::rejected(self : LinearEndpoint) -> Int

    LinearEndpoint::requests

    fn LinearEndpoint::requests(self : LinearEndpoint) -> Int

    LinearEndpoint::reset

    fn LinearEndpoint::reset(self : LinearEndpoint) -> Unit

    LinearEndpoint::version

    fn LinearEndpoint::version(self : LinearEndpoint) -> String

    LinearEndpoint::weights

    fn LinearEndpoint::weights(self : LinearEndpoint) -> Array[Double]

    LossAccumulator

    pub struct LossAccumulator {
    kind : LossKind
    parameter : Double
    count : Int
    weight : Double
    total : Double
    absolute_gradient : Double
    maximum : Double
    }

    LossAccumulator::count

    fn LossAccumulator::count(self : LossAccumulator) -> Int

    LossAccumulator::kind

    LossAccumulator::maximum

    fn LossAccumulator::maximum(self : LossAccumulator) -> Double

    LossAccumulator::mean

    fn LossAccumulator::mean(self : LossAccumulator) -> Double

    LossAccumulator::mean_absolute_gradient

    fn LossAccumulator::mean_absolute_gradient(self : LossAccumulator) -> Double

    LossAccumulator::new

    fn LossAccumulator::new(kind : LossKind, parameter? : Double) -> LossAccumulator

    LossAccumulator::reset

    fn LossAccumulator::reset(self : LossAccumulator) -> Unit

    LossAccumulator::update

    fn LossAccumulator::update(self : LossAccumulator, prediction : Double, label : Double, weight? : Double) -> Double

    LossAccumulator::weight

    fn LossAccumulator::weight(self : LossAccumulator) -> Double

    LossKind

    pub(all) enum LossKind {
    Squared
    Absolute
    Huber
    LogLoss
    Hinge
    Quantile
    Poisson
    } derive(Eq,
    Debug
    )

    Loss functions and defensive gradient utilities shared by online learners. The implementations are allocation-light and keep all numerical guards at the package boundary so a malformed event cannot poison a long-running job.

    LossSchedule

    pub struct LossSchedule {
    initial : Double
    decay : Double
    floor : Double
    step : Int
    }

    LossSchedule::advance

    fn LossSchedule::advance(self : LossSchedule, steps? : Int) -> Double

    LossSchedule::new

    fn LossSchedule::new(initial : Double, decay? : Double, floor? : Double) -> LossSchedule

    LossSchedule::reset

    fn LossSchedule::reset(self : LossSchedule) -> Unit

    LossSchedule::step

    fn LossSchedule::step(self : LossSchedule) -> Int

    LossSchedule::value

    fn LossSchedule::value(self : LossSchedule) -> Double

    MarkovTransitionModel

    pub struct MarkovTransitionModel {
    states : Int
    transitions : Array[Array[Double]]
    totals : Array[Double]
    previous : Int?
    }

    MarkovTransitionModel::distribution

    fn MarkovTransitionModel::distribution(self : MarkovTransitionModel, from : Int) -> Array[Double]

    MarkovTransitionModel::new

    fn MarkovTransitionModel::new(states : Int, smoothing? : Double) -> MarkovTransitionModel

    MarkovTransitionModel::next_state

    fn MarkovTransitionModel::next_state(self : MarkovTransitionModel, from : Int) -> Int?

    MarkovTransitionModel::observe

    fn MarkovTransitionModel::observe(self : MarkovTransitionModel, state : Int) -> Bool

    MarkovTransitionModel::probability

    fn MarkovTransitionModel::probability(self : MarkovTransitionModel, from : Int, to : Int) -> Double

    MarkovTransitionModel::reset

    MarkovTransitionModel::states

    Matrix

    pub struct Matrix {
    rows : Int
    cols : Int
    values : Array[Double]
    } derive(ToJson,
    Debug
    ,
    FromJson
    )

    Matrix::add

    fn Matrix::add(self : Matrix, other : Matrix) -> Matrix

    Matrix::cols

    fn Matrix::cols(self : Matrix) -> Int

    Matrix::column

    fn Matrix::column(self : Matrix, index : Int) -> DenseVector?

    Matrix::determinant

    fn Matrix::determinant(self : Matrix) -> Double

    Compute a determinant with partial pivoting. The method is intended for small online covariance matrices, not for large dense linear algebra.

    Matrix::frobenius_norm

    fn Matrix::frobenius_norm(self : Matrix) -> Double

    Matrix::from_rows

    fn Matrix::from_rows(rows : Array[Array[Double]]) -> Matrix

    Matrix::get

    fn Matrix::get(self : Matrix, row : Int, col : Int) -> Double?

    Matrix::identity

    fn Matrix::identity(size : Int) -> Matrix

    Matrix::inverse

    fn Matrix::inverse(self : Matrix) -> Matrix?

    Matrix::is_symmetric

    fn Matrix::is_symmetric(self : Matrix, tolerance? : Double) -> Bool

    Matrix::multiply

    fn Matrix::multiply(self : Matrix, other : Matrix) -> Matrix

    Matrix::multiply_vector

    fn Matrix::multiply_vector(self : Matrix, vector : Array[Double]) -> Array[Double]

    Matrix::new

    fn Matrix::new(rows : Int, cols : Int, fill? : Double) -> Matrix

    Matrix::row

    fn Matrix::row(self : Matrix, index : Int) -> DenseVector?

    Matrix::rows

    fn Matrix::rows(self : Matrix) -> Int

    Matrix::scale

    fn Matrix::scale(self : Matrix, factor : Double) -> Matrix

    Matrix::set

    fn Matrix::set(self : Matrix, row : Int, col : Int, value : Double) -> Bool

    Matrix::solve

    fn Matrix::solve(self : Matrix, right_hand_side : Array[Double]) -> Array[Double]?

    Solve a square linear system using Gaussian elimination with pivoting.

    Matrix::to_rows

    fn Matrix::to_rows(self : Matrix) -> Array[Array[Double]]

    Matrix::trace

    fn Matrix::trace(self : Matrix) -> Double

    Matrix::transpose

    fn Matrix::transpose(self : Matrix) -> Matrix

    MetricSeries

    pub struct MetricSeries {
    name : String
    capacity : Int
    values : Array[Double]
    seen : Int
    }

    Bounded metric history for dashboards and regression tests.

    MetricSeries::last

    fn MetricSeries::last(self : MetricSeries) -> Double?

    MetricSeries::maximum

    fn MetricSeries::maximum(self : MetricSeries) -> Double

    MetricSeries::mean

    fn MetricSeries::mean(self : MetricSeries) -> Double

    MetricSeries::minimum

    fn MetricSeries::minimum(self : MetricSeries) -> Double

    MetricSeries::name

    fn MetricSeries::name(self : MetricSeries) -> String

    MetricSeries::new

    fn MetricSeries::new(name : String, capacity? : Int) -> MetricSeries

    MetricSeries::record

    fn MetricSeries::record(self : MetricSeries, value : Double) -> Unit

    MetricSeries::reset

    fn MetricSeries::reset(self : MetricSeries) -> Unit

    MetricSeries::seen

    fn MetricSeries::seen(self : MetricSeries) -> Int

    MetricSeries::trend

    fn MetricSeries::trend(self : MetricSeries) -> Double

    MetricSeries::values

    fn MetricSeries::values(self : MetricSeries) -> Array[Double]

    MetricSnapshot

    pub struct MetricSnapshot {
    name : String
    value : Double
    timestamp : Int64
    samples : Int
    }

    Production-facing health and SLO primitives for continuously trained models.

    MetricSnapshot::name

    fn MetricSnapshot::name(self : MetricSnapshot) -> String

    MetricSnapshot::new

    fn MetricSnapshot::new(name : String, value : Double, timestamp : Int64, samples? : Int) -> MetricSnapshot

    MetricSnapshot::samples

    fn MetricSnapshot::samples(self : MetricSnapshot) -> Int

    MetricSnapshot::timestamp

    fn MetricSnapshot::timestamp(self : MetricSnapshot) -> Int64

    MetricSnapshot::value

    fn MetricSnapshot::value(self : MetricSnapshot) -> Double

    MetricsTracker

    pub struct MetricsTracker {
    count : Double
    sum_squared_error : Double
    sum_log_loss : Double
    }

    Incremental metrics tracker.

    MetricsTracker::log_loss

    fn MetricsTracker::log_loss(self : MetricsTracker) -> Double

    Get the current LogLoss.

    MetricsTracker::mse

    fn MetricsTracker::mse(self : MetricsTracker) -> Double

    Get the current Mean Squared Error (MSE).

    MetricsTracker::new

    Create a new metrics tracker.

    MetricsTracker::update

    fn MetricsTracker::update(self : MetricsTracker, pred : Double, label : Double) -> Unit

    Update metrics with a new prediction and ground truth label.

    MiniBatchAccumulator

    pub struct MiniBatchAccumulator {
    dimension : Int
    features : Array[Array[Double]]
    labels : Array[Double]
    weights : Array[Double]
    capacity : Int
    }

    Reusable mini-batch accumulator for callers that need deterministic batch boundaries while keeping the learner online between flushes.

    MiniBatchAccumulator::add

    fn MiniBatchAccumulator::add(self : MiniBatchAccumulator, features : Array[Double], label : Double, weight? : Double) -> Bool

    MiniBatchAccumulator::clear

    fn MiniBatchAccumulator::clear(self : MiniBatchAccumulator) -> Unit

    MiniBatchAccumulator::flush

    MiniBatchAccumulator::new

    fn MiniBatchAccumulator::new(dimension : Int, capacity? : Int) -> MiniBatchAccumulator

    MiniBatchAccumulator::ready

    fn MiniBatchAccumulator::ready(self : MiniBatchAccumulator) -> Bool

    MiniBatchAccumulator::size

    MissingValueImputer

    pub struct MissingValueImputer {
    policy : MissingValuePolicy
    means : Array[Double]
    counts : Array[Int]
    last : Array[Double]
    imputed : Int
    rejected : Int
    }

    MissingValueImputer::imputed

    fn MissingValueImputer::imputed(self : MissingValueImputer) -> Int

    MissingValueImputer::means

    fn MissingValueImputer::means(self : MissingValueImputer) -> Array[Double]

    MissingValueImputer::new

    fn MissingValueImputer::new(dimension : Int, policy? : MissingValuePolicy) -> MissingValueImputer

    MissingValueImputer::observe

    fn MissingValueImputer::observe(self : MissingValueImputer, values : Array[Double]) -> Unit

    MissingValueImputer::rejected

    fn MissingValueImputer::rejected(self : MissingValueImputer) -> Int

    MissingValueImputer::reset

    fn MissingValueImputer::reset(self : MissingValueImputer) -> Unit

    MissingValueImputer::transform

    fn MissingValueImputer::transform(self : MissingValueImputer, values : Array[Double]) -> Array[Double]?

    MissingValuePolicy

    pub enum MissingValuePolicy {
    Reject
    Zero
    Mean
    CarryForward
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    ModelArtifact

    pub struct ModelArtifact {
    name : String
    version : String
    checksum : String
    created_at : String
    stage : String
    metrics : Map[String, Double]
    } derive(ToJson,
    Debug
    ,
    FromJson
    )

    Lightweight in-process model registry for reproducible experiments.

    ModelArtifact::add_metric

    fn ModelArtifact::add_metric(self : ModelArtifact, name : String, value : Double) -> Unit

    ModelArtifact::checksum

    fn ModelArtifact::checksum(self : ModelArtifact) -> String

    ModelArtifact::metric

    fn ModelArtifact::metric(self : ModelArtifact, name : String) -> Double?

    ModelArtifact::metrics

    fn ModelArtifact::metrics(self : ModelArtifact) -> Map[String, Double]

    ModelArtifact::name

    fn ModelArtifact::name(self : ModelArtifact) -> String

    ModelArtifact::new

    fn ModelArtifact::new(name : String, version : String, checksum : String, created_at : String) -> ModelArtifact

    ModelArtifact::set_stage

    fn ModelArtifact::set_stage(self : ModelArtifact, stage : String) -> Unit

    ModelArtifact::stage

    fn ModelArtifact::stage(self : ModelArtifact) -> String

    ModelArtifact::version

    fn ModelArtifact::version(self : ModelArtifact) -> String

    ModelCard

    pub struct ModelCard {
    name : String
    version : String
    task : String
    owner : String
    features : Array[String]
    guarantees : Array[String]
    notes : Array[String]
    }

    ModelCard::add_feature

    fn ModelCard::add_feature(self : ModelCard, feature : String) -> Unit

    ModelCard::add_guarantee

    fn ModelCard::add_guarantee(self : ModelCard, guarantee : String) -> Unit

    ModelCard::add_note

    fn ModelCard::add_note(self : ModelCard, note : String) -> Unit

    ModelCard::features

    fn ModelCard::features(self : ModelCard) -> Array[String]

    ModelCard::guarantees

    fn ModelCard::guarantees(self : ModelCard) -> Array[String]

    ModelCard::name

    fn ModelCard::name(self : ModelCard) -> String

    ModelCard::new

    fn ModelCard::new(name : String, version : String, task : String, owner : String) -> ModelCard

    ModelCard::notes

    fn ModelCard::notes(self : ModelCard) -> Array[String]

    ModelCard::owner

    fn ModelCard::owner(self : ModelCard) -> String

    ModelCard::task

    fn ModelCard::task(self : ModelCard) -> String

    ModelCard::version

    fn ModelCard::version(self : ModelCard) -> String

    ModelHealth

    pub struct ModelHealth {
    accepted : Int
    rejected : Int
    prediction_errors : Int
    inference_failures : Int
    latency : MetricSeries
    loss : MetricSeries
    }

    ModelHealth::acceptance_rate

    fn ModelHealth::acceptance_rate(self : ModelHealth) -> Double

    ModelHealth::accepted

    fn ModelHealth::accepted(self : ModelHealth) -> Int

    ModelHealth::inference_failures

    fn ModelHealth::inference_failures(self : ModelHealth) -> Int

    ModelHealth::mean_loss

    fn ModelHealth::mean_loss(self : ModelHealth) -> Double

    ModelHealth::new

    ModelHealth::p95_latency

    fn ModelHealth::p95_latency(self : ModelHealth) -> Double

    ModelHealth::record_error

    fn ModelHealth::record_error(self : ModelHealth) -> Unit

    ModelHealth::record_prediction_error

    fn ModelHealth::record_prediction_error(self : ModelHealth) -> Unit

    ModelHealth::record_sample

    fn ModelHealth::record_sample(self : ModelHealth, accepted : Bool, loss : Double, latency_ms : Double) -> Unit

    ModelHealth::rejected

    fn ModelHealth::rejected(self : ModelHealth) -> Int

    ModelHealth::reset

    fn ModelHealth::reset(self : ModelHealth) -> Unit

    ModelMonitor

    pub struct ModelMonitor {
    name : String
    metrics : Map[String, RunningMoments]
    rules : Array[AlertRule]
    snapshots : Int
    alerts : Int
    }

    ModelMonitor::add_rule

    fn ModelMonitor::add_rule(self : ModelMonitor, rule : AlertRule) -> Unit

    ModelMonitor::alert_count

    fn ModelMonitor::alert_count(self : ModelMonitor) -> Int

    ModelMonitor::mean

    fn ModelMonitor::mean(self : ModelMonitor, metric : String) -> Double

    ModelMonitor::new

    fn ModelMonitor::new(name : String) -> ModelMonitor

    ModelMonitor::observe

    fn ModelMonitor::observe(self : ModelMonitor, snapshot : MetricSnapshot, now : Int64) -> Array[String]

    ModelMonitor::reset

    fn ModelMonitor::reset(self : ModelMonitor) -> Unit

    ModelMonitor::snapshot_count

    fn ModelMonitor::snapshot_count(self : ModelMonitor) -> Int

    ModelMonitor::variance

    fn ModelMonitor::variance(self : ModelMonitor, metric : String) -> Double

    ModelRegistry

    pub struct ModelRegistry {
    artifacts : Map[String, ModelArtifact]
    registrations : Int
    }

    ModelRegistry::clear

    fn ModelRegistry::clear(self : ModelRegistry) -> Unit

    ModelRegistry::get

    fn ModelRegistry::get(self : ModelRegistry, name : String, version : String) -> ModelArtifact?

    ModelRegistry::new

    ModelRegistry::promote

    fn ModelRegistry::promote(self : ModelRegistry, name : String, version : String, stage : String) -> Bool

    ModelRegistry::register

    fn ModelRegistry::register(self : ModelRegistry, artifact : ModelArtifact) -> Bool

    ModelRegistry::registrations

    fn ModelRegistry::registrations(self : ModelRegistry) -> Int

    ModelRegistry::size

    fn ModelRegistry::size(self : ModelRegistry) -> Int

    ModelRegistry::versions

    fn ModelRegistry::versions(self : ModelRegistry, name : String) -> Array[String]

    ModelRouter

    pub struct ModelRouter {
    candidates : Map[String, RouteCandidate]
    policy : RoutingPolicy
    fallback : FallbackMode
    default_route : String?
    cursor : Int
    decisions : Int
    fallbacks : Int
    rejected : Int
    }

    ModelRouter::available_routes

    fn ModelRouter::available_routes(self : ModelRouter) -> Array[String]

    ModelRouter::candidate

    fn ModelRouter::candidate(self : ModelRouter, route_id : String) -> RouteCandidate?

    ModelRouter::choose

    fn ModelRouter::choose(self : ModelRouter) -> RouteDecision?

    ModelRouter::decisions

    fn ModelRouter::decisions(self : ModelRouter) -> Int

    ModelRouter::fallback_rate

    fn ModelRouter::fallback_rate(self : ModelRouter) -> Double

    ModelRouter::fallbacks

    fn ModelRouter::fallbacks(self : ModelRouter) -> Int

    ModelRouter::new

    fn ModelRouter::new(policy? : RoutingPolicy, fallback? : FallbackMode) -> ModelRouter

    ModelRouter::record

    fn ModelRouter::record(self : ModelRouter, route_id : String, success : Bool, latency : Double, timestamp : Int64) -> Bool

    ModelRouter::register

    fn ModelRouter::register(self : ModelRouter, candidate : RouteCandidate, default? : Bool) -> Bool

    ModelRouter::rejected

    fn ModelRouter::rejected(self : ModelRouter) -> Int

    ModelRouter::remove

    fn ModelRouter::remove(self : ModelRouter, route_id : String) -> Bool

    ModelRouter::reset

    fn ModelRouter::reset(self : ModelRouter) -> Unit

    ModelRouter::routes

    fn ModelRouter::routes(self : ModelRouter) -> Array[String]

    ModelRouter::set_default

    fn ModelRouter::set_default(self : ModelRouter, route_id : String) -> Bool

    ModelRouter::set_fallback

    fn ModelRouter::set_fallback(self : ModelRouter, fallback : FallbackMode) -> Unit

    ModelRouter::set_policy

    fn ModelRouter::set_policy(self : ModelRouter, policy : RoutingPolicy) -> Unit

    MomentumOptimizer

    pub struct MomentumOptimizer {
    learning_rate : Double
    momentum : Double
    dampening : Double
    velocity : Array[Double]
    clipper : GradientClipper
    step_count : Int
    }

    MomentumOptimizer::apply

    fn MomentumOptimizer::apply(self : MomentumOptimizer, parameters : Array[Double], gradients : Array[Double]) -> Unit

    MomentumOptimizer::new

    fn MomentumOptimizer::new(dimension : Int, learning_rate? : Double, momentum? : Double, dampening? : Double, clipper? : GradientClipper) -> MomentumOptimizer

    MomentumOptimizer::reset

    fn MomentumOptimizer::reset(self : MomentumOptimizer) -> Unit

    MomentumOptimizer::update

    fn MomentumOptimizer::update(self : MomentumOptimizer, gradients : Array[Double]) -> Array[Double]

    MomentumOptimizer::velocity

    fn MomentumOptimizer::velocity(self : MomentumOptimizer) -> Array[Double]

    MultivariateAnomalyDetector

    pub struct MultivariateAnomalyDetector {
    moments : VectorMoments
    threshold : Double
    anomalies : Int
    }

    Diagonal multivariate z-score detector for low-memory edge deployments.

    MultivariateAnomalyDetector::anomalies

    MultivariateAnomalyDetector::mean

    MultivariateAnomalyDetector::new

    fn MultivariateAnomalyDetector::new(dimension : Int, threshold? : Double) -> MultivariateAnomalyDetector

    MultivariateAnomalyDetector::reset

    MultivariateAnomalyDetector::score

    fn MultivariateAnomalyDetector::score(self : MultivariateAnomalyDetector, values : Array[Double]) -> Double

    MultivariateAnomalyDetector::update

    fn MultivariateAnomalyDetector::update(self : MultivariateAnomalyDetector, values : Array[Double]) -> Bool

    ObjectiveKind

    pub enum ObjectiveKind {
    Squared
    Logistic
    Huber(delta~ : Double)
    Quantile(probability~ : Double)
    Hinge
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    ObjectiveKind::gradient

    fn ObjectiveKind::gradient(self : ObjectiveKind, prediction : Double, label : Double) -> Double

    ObjectiveKind::loss

    fn ObjectiveKind::loss(self : ObjectiveKind, prediction : Double, label : Double) -> Double

    ObjectiveTracker

    pub struct ObjectiveTracker {
    objective : ObjectiveKind
    count : Double
    total : Double
    last : Double
    }

    ObjectiveTracker::count

    fn ObjectiveTracker::count(self : ObjectiveTracker) -> Double

    ObjectiveTracker::last

    fn ObjectiveTracker::last(self : ObjectiveTracker) -> Double

    ObjectiveTracker::mean

    fn ObjectiveTracker::mean(self : ObjectiveTracker) -> Double

    ObjectiveTracker::new

    ObjectiveTracker::observe

    fn ObjectiveTracker::observe(self : ObjectiveTracker, prediction : Double, label : Double, weight? : Double) -> Unit

    ObjectiveTracker::reset

    fn ObjectiveTracker::reset(self : ObjectiveTracker) -> Unit

    OneHotEncoder

    pub struct OneHotEncoder {
    values : Map[String, Int]
    unknown_index : Int?
    next_index : Int
    unknowns : Int
    }

    OneHotEncoder::contains

    fn OneHotEncoder::contains(self : OneHotEncoder, value : String) -> Bool

    OneHotEncoder::dimension

    fn OneHotEncoder::dimension(self : OneHotEncoder) -> Int

    OneHotEncoder::encode

    fn OneHotEncoder::encode(self : OneHotEncoder, value : String) -> Int

    OneHotEncoder::entries

    fn OneHotEncoder::entries(self : OneHotEncoder) -> Array[(String, Int)]

    OneHotEncoder::fit

    fn OneHotEncoder::fit(self : OneHotEncoder, value : String) -> Int

    OneHotEncoder::new

    fn OneHotEncoder::new(unknown_index? : Int) -> OneHotEncoder

    OneHotEncoder::reset

    fn OneHotEncoder::reset(self : OneHotEncoder) -> Unit

    OneHotEncoder::unknowns

    fn OneHotEncoder::unknowns(self : OneHotEncoder) -> Int

    OneHotEncoder::vector

    fn OneHotEncoder::vector(self : OneHotEncoder, value : String) -> Array[Double]

    OnlineAR

    pub struct OnlineAR {
    lags : Int
    coefficients : Array[Double]
    history : SequenceWindow
    learning_rate : Double
    observations : Int
    squared_error : Double
    }

    OnlineAR::coefficients

    fn OnlineAR::coefficients(self : OnlineAR) -> Array[Double]

    OnlineAR::new

    fn OnlineAR::new(lags : Int, learning_rate? : Double) -> OnlineAR

    OnlineAR::observations

    fn OnlineAR::observations(self : OnlineAR) -> Int

    OnlineAR::predict

    fn OnlineAR::predict(self : OnlineAR) -> Double

    OnlineAR::reset

    fn OnlineAR::reset(self : OnlineAR) -> Unit

    OnlineAR::rmse

    fn OnlineAR::rmse(self : OnlineAR) -> Double

    OnlineAR::update

    fn OnlineAR::update(self : OnlineAR, value : Double) -> Double

    OnlineAutoregressive

    pub struct OnlineAutoregressive {
    lags : Int
    weights : Array[Double]
    history : Array[Double]
    learning_rate : Double
    l2 : Double
    steps : Int
    }

    Online autoregressive model with a fixed lag window.

    OnlineAutoregressive::feature_vector

    fn OnlineAutoregressive::feature_vector(self : OnlineAutoregressive) -> Array[Double]

    OnlineAutoregressive::forecast

    fn OnlineAutoregressive::forecast(self : OnlineAutoregressive, horizon : Int) -> Array[Double]

    OnlineAutoregressive::history

    fn OnlineAutoregressive::history(self : OnlineAutoregressive) -> Array[Double]

    OnlineAutoregressive::lags

    OnlineAutoregressive::new

    fn OnlineAutoregressive::new(lags : Int, learning_rate? : Double, l2? : Double) -> OnlineAutoregressive

    OnlineAutoregressive::predict

    fn OnlineAutoregressive::predict(self : OnlineAutoregressive) -> Double

    OnlineAutoregressive::reset

    fn OnlineAutoregressive::reset(self : OnlineAutoregressive) -> Unit

    OnlineAutoregressive::steps

    OnlineAutoregressive::update

    fn OnlineAutoregressive::update(self : OnlineAutoregressive, value : Double) -> Double

    OnlineAutoregressive::weights

    fn OnlineAutoregressive::weights(self : OnlineAutoregressive) -> Array[Double]

    OnlineBaggingClassifier

    pub struct OnlineBaggingClassifier {
    models : Array[AdagradLogisticRegression]
    rng : DeterministicRng
    observations : Int
    }

    Online bagging around Adagrad logistic learners.

    OnlineBaggingClassifier::member_predictions

    fn OnlineBaggingClassifier::member_predictions(self : OnlineBaggingClassifier, features : Array[Double]) -> Array[Double]

    OnlineBaggingClassifier::models

    OnlineBaggingClassifier::new

    fn OnlineBaggingClassifier::new(model_count : Int, dimension : Int, seed? : UInt64) -> OnlineBaggingClassifier

    OnlineBaggingClassifier::observations

    fn OnlineBaggingClassifier::observations(self : OnlineBaggingClassifier) -> Int

    OnlineBaggingClassifier::predict

    fn OnlineBaggingClassifier::predict(self : OnlineBaggingClassifier, features : Array[Double]) -> Double

    OnlineBaggingClassifier::reset

    OnlineBaggingClassifier::update

    fn OnlineBaggingClassifier::update(self : OnlineBaggingClassifier, features : Array[Double], label : Double) -> Unit

    OnlineBatchScorer

    pub struct OnlineBatchScorer {
    endpoint : LinearEndpoint
    batcher : RequestBatcher
    stats : ServingStats
    }

    OnlineBatchScorer::endpoint

    OnlineBatchScorer::flush

    OnlineBatchScorer::new

    fn OnlineBatchScorer::new(weights : Array[Double], batch_size? : Int, version? : String) -> OnlineBatchScorer

    OnlineBatchScorer::pending

    fn OnlineBatchScorer::pending(self : OnlineBatchScorer) -> Int

    OnlineBatchScorer::reset

    fn OnlineBatchScorer::reset(self : OnlineBatchScorer) -> Unit

    OnlineBatchScorer::stats

    OnlineBatchScorer::submit

    OnlineBernoulliNB

    pub struct OnlineBernoulliNB {
    ones : Array[Array[Double]]
    counts : Array[Double]
    smoothing : Double
    steps : Int
    }

    Bernoulli Naive Bayes for binary sparse-style features.

    OnlineBernoulliNB::feature_probability

    fn OnlineBernoulliNB::feature_probability(self : OnlineBernoulliNB, label : Int, index : Int) -> Double

    OnlineBernoulliNB::log_scores

    fn OnlineBernoulliNB::log_scores(self : OnlineBernoulliNB, features : Array[Double]) -> Array[Double]

    OnlineBernoulliNB::new

    fn OnlineBernoulliNB::new(classes : Int, dimension : Int, smoothing? : Double) -> OnlineBernoulliNB

    OnlineBernoulliNB::predict

    fn OnlineBernoulliNB::predict(self : OnlineBernoulliNB, features : Array[Double]) -> Int?

    OnlineBernoulliNB::predict_proba

    fn OnlineBernoulliNB::predict_proba(self : OnlineBernoulliNB, features : Array[Double]) -> Array[Double]

    OnlineBernoulliNB::reset

    fn OnlineBernoulliNB::reset(self : OnlineBernoulliNB) -> Unit

    OnlineBernoulliNB::steps

    fn OnlineBernoulliNB::steps(self : OnlineBernoulliNB) -> Int

    OnlineBernoulliNB::update

    fn OnlineBernoulliNB::update(self : OnlineBernoulliNB, features : Array[Double], label : Int, weight? : Double) -> Bool

    OnlineConformalRegressor

    pub struct OnlineConformalRegressor {
    confidence : Double
    scores : OnlineQuantileSketch
    observations : Int
    covered : Int
    misses : Int
    }

    OnlineConformalRegressor::confidence

    fn OnlineConformalRegressor::confidence(self : OnlineConformalRegressor) -> Double

    OnlineConformalRegressor::coverage

    fn OnlineConformalRegressor::coverage(self : OnlineConformalRegressor) -> Double

    OnlineConformalRegressor::covered

    OnlineConformalRegressor::interval

    fn OnlineConformalRegressor::interval(self : OnlineConformalRegressor, prediction : Double) -> CalibratedInterval

    OnlineConformalRegressor::misses

    OnlineConformalRegressor::new

    fn OnlineConformalRegressor::new(confidence? : Double, capacity? : Int) -> OnlineConformalRegressor

    OnlineConformalRegressor::observations

    fn OnlineConformalRegressor::observations(self : OnlineConformalRegressor) -> Int

    OnlineConformalRegressor::observe

    fn OnlineConformalRegressor::observe(self : OnlineConformalRegressor, prediction : Double, actual : Double) -> Double

    OnlineConformalRegressor::radius

    OnlineConformalRegressor::reset

    OnlineCounter

    pub struct OnlineCounter {
    values : Map[String, Double]
    updates : Int
    }

    Generic weighted counters for stream dashboards.

    OnlineCounter::add

    fn OnlineCounter::add(self : OnlineCounter, key : String, value? : Double) -> Unit

    OnlineCounter::get

    fn OnlineCounter::get(self : OnlineCounter, key : String) -> Double

    OnlineCounter::keys

    fn OnlineCounter::keys(self : OnlineCounter) -> Array[String]

    OnlineCounter::new

    OnlineCounter::reset

    fn OnlineCounter::reset(self : OnlineCounter) -> Unit

    OnlineCounter::total

    fn OnlineCounter::total(self : OnlineCounter) -> Double

    OnlineCounter::updates

    fn OnlineCounter::updates(self : OnlineCounter) -> Int

    OnlineDecisionStump

    pub struct OnlineDecisionStump {
    feature : Int
    threshold : Double
    left_positive : Double
    left_negative : Double
    right_positive : Double
    right_negative : Double
    updates : Int
    }

    A streaming decision stump over one numeric feature.

    OnlineDecisionStump::accuracy

    fn OnlineDecisionStump::accuracy(self : OnlineDecisionStump) -> Double

    OnlineDecisionStump::feature

    fn OnlineDecisionStump::feature(self : OnlineDecisionStump) -> Int

    OnlineDecisionStump::new

    fn OnlineDecisionStump::new(feature : Int, threshold? : Double) -> OnlineDecisionStump

    OnlineDecisionStump::predict

    fn OnlineDecisionStump::predict(self : OnlineDecisionStump, features : Array[Double], smoothing? : Double) -> Double

    OnlineDecisionStump::reset

    fn OnlineDecisionStump::reset(self : OnlineDecisionStump) -> Unit

    OnlineDecisionStump::threshold

    fn OnlineDecisionStump::threshold(self : OnlineDecisionStump) -> Double

    OnlineDecisionStump::update

    fn OnlineDecisionStump::update(self : OnlineDecisionStump, features : Array[Double], label : Double, weight? : Double) -> Unit

    OnlineDecisionStump::update_threshold

    fn OnlineDecisionStump::update_threshold(self : OnlineDecisionStump, threshold : Double) -> Unit

    OnlineDecisionStump::updates

    fn OnlineDecisionStump::updates(self : OnlineDecisionStump) -> Int

    OnlineEvaluationSession

    pub struct OnlineEvaluationSession {
    metrics : MetricsTracker
    confusion : ConfusionMatrix
    auc_tracker : AucTracker
    calibration : CalibrationTracker
    regression : RegressionMetrics
    }

    OnlineEvaluationSession::classification

    OnlineEvaluationSession::new

    OnlineEvaluationSession::observe_binary

    fn OnlineEvaluationSession::observe_binary(self : OnlineEvaluationSession, probability : Double, label : Double) -> Unit

    OnlineEvaluationSession::observe_regression

    fn OnlineEvaluationSession::observe_regression(self : OnlineEvaluationSession, prediction : Double, label : Double) -> Unit

    OnlineEvaluationSession::regression

    OnlineEvaluationSession::reset

    OnlineEvaluationSession::summary

    OnlineFeatureSelector

    pub struct OnlineFeatureSelector {
    moments : VectorMoments
    target : RunningMoments
    cross : Array[Double]
    observations : Double
    }

    Online absolute-correlation tracker for feature monitoring and pruning.

    OnlineFeatureSelector::absolute_importance

    fn OnlineFeatureSelector::absolute_importance(self : OnlineFeatureSelector) -> Array[Double]

    OnlineFeatureSelector::correlations

    fn OnlineFeatureSelector::correlations(self : OnlineFeatureSelector) -> Array[Double]

    OnlineFeatureSelector::dimension

    fn OnlineFeatureSelector::dimension(self : OnlineFeatureSelector) -> Int

    OnlineFeatureSelector::new

    fn OnlineFeatureSelector::new(dimension : Int) -> OnlineFeatureSelector

    OnlineFeatureSelector::observations

    fn OnlineFeatureSelector::observations(self : OnlineFeatureSelector) -> Double

    OnlineFeatureSelector::rank

    fn OnlineFeatureSelector::rank(self : OnlineFeatureSelector, top_k : Int) -> Array[Int]

    OnlineFeatureSelector::reset

    OnlineFeatureSelector::select

    fn OnlineFeatureSelector::select(self : OnlineFeatureSelector, threshold : Double) -> Array[Int]

    OnlineFeatureSelector::update

    fn OnlineFeatureSelector::update(self : OnlineFeatureSelector, features : Array[Double], target : Double) -> Unit

    OnlineGammaRegression

    pub struct OnlineGammaRegression {
    weights : Array[Double]
    learning_rate : Double
    l2 : Double
    steps : Int
    }

    OnlineGammaRegression::loss

    fn OnlineGammaRegression::loss(self : OnlineGammaRegression, features : Array[Double], value : Double) -> Double

    OnlineGammaRegression::new

    fn OnlineGammaRegression::new(dimension : Int, learning_rate? : Double, l2? : Double) -> OnlineGammaRegression

    OnlineGammaRegression::predict

    fn OnlineGammaRegression::predict(self : OnlineGammaRegression, features : Array[Double]) -> Double

    OnlineGammaRegression::reset

    OnlineGammaRegression::steps

    OnlineGammaRegression::update

    fn OnlineGammaRegression::update(self : OnlineGammaRegression, features : Array[Double], value : Double) -> Unit

    OnlineGammaRegression::weights

    fn OnlineGammaRegression::weights(self : OnlineGammaRegression) -> Array[Double]

    OnlineGaussianNB

    pub struct OnlineGaussianNB {
    classes : Array[GaussianClassStats]
    class_counts : Array[Double]
    smoothing : Double
    steps : Int
    }

    Incremental Gaussian Naive Bayes for categorical labels.

    OnlineGaussianNB::class_counts

    fn OnlineGaussianNB::class_counts(self : OnlineGaussianNB) -> Array[Double]

    OnlineGaussianNB::classes

    fn OnlineGaussianNB::classes(self : OnlineGaussianNB) -> Int

    OnlineGaussianNB::dimension

    fn OnlineGaussianNB::dimension(self : OnlineGaussianNB) -> Int

    OnlineGaussianNB::log_priors

    fn OnlineGaussianNB::log_priors(self : OnlineGaussianNB) -> Array[Double]

    OnlineGaussianNB::log_scores

    fn OnlineGaussianNB::log_scores(self : OnlineGaussianNB, features : Array[Double]) -> Array[Double]

    OnlineGaussianNB::new

    fn OnlineGaussianNB::new(classes : Int, dimension : Int, smoothing? : Double) -> OnlineGaussianNB

    OnlineGaussianNB::predict

    fn OnlineGaussianNB::predict(self : OnlineGaussianNB, features : Array[Double]) -> Int?

    OnlineGaussianNB::predict_proba

    fn OnlineGaussianNB::predict_proba(self : OnlineGaussianNB, features : Array[Double]) -> Array[Double]

    OnlineGaussianNB::reset

    fn OnlineGaussianNB::reset(self : OnlineGaussianNB) -> Unit

    OnlineGaussianNB::steps

    fn OnlineGaussianNB::steps(self : OnlineGaussianNB) -> Int

    OnlineGaussianNB::update

    fn OnlineGaussianNB::update(self : OnlineGaussianNB, features : Array[Double], label : Int, weight? : Double) -> Bool

    OnlineGraph

    pub struct OnlineGraph {
    adjacency : Map[String, Map[String, Double]]
    edges : Int
    total_weight : Double
    self_loops : Int
    updates : Int
    }

    OnlineGraph::add_edge

    fn OnlineGraph::add_edge(self : OnlineGraph, source : String, target : String, weight? : Double) -> Bool

    OnlineGraph::edge_count

    fn OnlineGraph::edge_count(self : OnlineGraph) -> Int

    OnlineGraph::neighbors

    fn OnlineGraph::neighbors(self : OnlineGraph, source : String, limit? : Int) -> Array[GraphNeighbor]

    OnlineGraph::new

    OnlineGraph::node_count

    fn OnlineGraph::node_count(self : OnlineGraph) -> Int

    OnlineGraph::nodes

    fn OnlineGraph::nodes(self : OnlineGraph) -> Array[String]

    OnlineGraph::out_degree

    fn OnlineGraph::out_degree(self : OnlineGraph, node : String) -> Int

    OnlineGraph::page_rank

    fn OnlineGraph::page_rank(self : OnlineGraph, iterations? : Int, damping? : Double) -> Array[GraphNodeScore]

    OnlineGraph::remove_edge

    fn OnlineGraph::remove_edge(self : OnlineGraph, source : String, target : String) -> Bool

    OnlineGraph::reset

    fn OnlineGraph::reset(self : OnlineGraph) -> Unit

    OnlineGraph::set_edge

    fn OnlineGraph::set_edge(self : OnlineGraph, source : String, target : String, weight : Double) -> Bool

    OnlineGraph::summary

    fn OnlineGraph::summary(self : OnlineGraph) -> GraphSummary

    OnlineGraph::updates

    fn OnlineGraph::updates(self : OnlineGraph) -> Int

    OnlineGraph::weight

    fn OnlineGraph::weight(self : OnlineGraph, source : String, target : String) -> Double?

    OnlineGraph::weighted_degree

    fn OnlineGraph::weighted_degree(self : OnlineGraph, node : String) -> Double

    OnlineHoltWinters

    pub struct OnlineHoltWinters {
    period : Int
    alpha : Double
    beta : Double
    gamma : Double
    level : Double
    trend : Double
    seasonals : Array[Double]
    errors : OnlineQuantileSketch
    steps : Int
    initialized : Bool
    }

    OnlineHoltWinters::level

    fn OnlineHoltWinters::level(self : OnlineHoltWinters) -> Double

    OnlineHoltWinters::new

    fn OnlineHoltWinters::new(period : Int, alpha? : Double, beta? : Double, gamma? : Double, error_capacity? : Int) -> OnlineHoltWinters

    OnlineHoltWinters::period

    fn OnlineHoltWinters::period(self : OnlineHoltWinters) -> Int

    OnlineHoltWinters::predict

    fn OnlineHoltWinters::predict(self : OnlineHoltWinters, horizon : Int, start_timestamp? : Int64, step? : Int64) -> Array[ForecastPoint]

    OnlineHoltWinters::reset

    fn OnlineHoltWinters::reset(self : OnlineHoltWinters) -> Unit

    OnlineHoltWinters::residual_scale

    fn OnlineHoltWinters::residual_scale(self : OnlineHoltWinters) -> Double

    OnlineHoltWinters::steps

    fn OnlineHoltWinters::steps(self : OnlineHoltWinters) -> Int

    OnlineHoltWinters::trend

    fn OnlineHoltWinters::trend(self : OnlineHoltWinters) -> Double

    OnlineHoltWinters::update

    fn OnlineHoltWinters::update(self : OnlineHoltWinters, value : Double) -> Double

    OnlineHuberRegression

    pub struct OnlineHuberRegression {
    weights : Array[Double]
    learning_rate : Double
    delta : Double
    l2 : Double
    steps : Int
    }

    Robust online regression using the Huber loss.

    OnlineHuberRegression::loss

    fn OnlineHuberRegression::loss(self : OnlineHuberRegression, features : Array[Double], label : Double) -> Double

    OnlineHuberRegression::new

    fn OnlineHuberRegression::new(dimension : Int, learning_rate? : Double, delta? : Double, l2? : Double) -> OnlineHuberRegression

    OnlineHuberRegression::predict

    fn OnlineHuberRegression::predict(self : OnlineHuberRegression, features : Array[Double]) -> Double

    OnlineHuberRegression::steps

    OnlineHuberRegression::update

    fn OnlineHuberRegression::update(self : OnlineHuberRegression, features : Array[Double], label : Double) -> Unit

    OnlineHuberRegression::weights

    fn OnlineHuberRegression::weights(self : OnlineHuberRegression) -> Array[Double]

    OnlineIsotonicCalibrator

    pub struct OnlineIsotonicCalibrator {
    scores : Array[Double]
    labels : Array[Double]
    capacity : Int
    }

    OnlineIsotonicCalibrator::new

    OnlineIsotonicCalibrator::predict

    fn OnlineIsotonicCalibrator::predict(self : OnlineIsotonicCalibrator, score : Double) -> Double

    OnlineIsotonicCalibrator::reset

    OnlineIsotonicCalibrator::size

    OnlineIsotonicCalibrator::update

    fn OnlineIsotonicCalibrator::update(self : OnlineIsotonicCalibrator, score : Double, label : Double) -> Unit

    OnlineKMeans

    pub struct OnlineKMeans {
    centroids : Array[Array[Double]]
    counts : Array[Double]
    learning_rate : Double
    assignments : Int
    }

    Streaming k-means with bounded state and optional exponential adaptation.

    OnlineKMeans::assignments

    fn OnlineKMeans::assignments(self : OnlineKMeans) -> Int

    OnlineKMeans::centroids

    fn OnlineKMeans::centroids(self : OnlineKMeans) -> Array[Array[Double]]

    OnlineKMeans::cluster_counts

    fn OnlineKMeans::cluster_counts(self : OnlineKMeans) -> Array[Double]

    OnlineKMeans::clusters

    fn OnlineKMeans::clusters(self : OnlineKMeans) -> Int

    OnlineKMeans::dimension

    fn OnlineKMeans::dimension(self : OnlineKMeans) -> Int

    OnlineKMeans::distance_to_nearest

    fn OnlineKMeans::distance_to_nearest(self : OnlineKMeans, features : Array[Double]) -> Double

    OnlineKMeans::nearest

    fn OnlineKMeans::nearest(self : OnlineKMeans, features : Array[Double]) -> Int?

    OnlineKMeans::new

    fn OnlineKMeans::new(clusters : Int, dimension : Int, learning_rate? : Double) -> OnlineKMeans

    OnlineKMeans::reset

    fn OnlineKMeans::reset(self : OnlineKMeans) -> Unit

    OnlineKMeans::update

    fn OnlineKMeans::update(self : OnlineKMeans, features : Array[Double]) -> Int?

    OnlineKernelClassifier

    pub struct OnlineKernelClassifier {
    kernel : KernelKind
    budget : Int
    supports : Array[KernelSupport]
    learning_rate : Double
    bias : Double
    updates : Int
    }

    Budgeted kernel perceptron for non-linear binary classification.

    OnlineKernelClassifier::loss

    fn OnlineKernelClassifier::loss(self : OnlineKernelClassifier, features : Array[Double], label : Double) -> Double

    OnlineKernelClassifier::new

    fn OnlineKernelClassifier::new(kernel? : KernelKind, budget? : Int, learning_rate? : Double) -> OnlineKernelClassifier

    OnlineKernelClassifier::predict

    fn OnlineKernelClassifier::predict(self : OnlineKernelClassifier, features : Array[Double]) -> Double

    OnlineKernelClassifier::predict_label

    fn OnlineKernelClassifier::predict_label(self : OnlineKernelClassifier, features : Array[Double]) -> Double

    OnlineKernelClassifier::reset

    OnlineKernelClassifier::score

    fn OnlineKernelClassifier::score(self : OnlineKernelClassifier, features : Array[Double]) -> Double

    OnlineKernelClassifier::support_count

    fn OnlineKernelClassifier::support_count(self : OnlineKernelClassifier) -> Int

    OnlineKernelClassifier::update

    fn OnlineKernelClassifier::update(self : OnlineKernelClassifier, features : Array[Double], label : Double) -> Bool

    OnlineKernelClassifier::updates

    OnlineMatrixFactorization

    pub struct OnlineMatrixFactorization {
    users : Array[Array[Double]]
    items : Array[Array[Double]]
    learning_rate : Double
    regularization : Double
    updates : Int
    }

    Online matrix factorization for implicit or explicit feedback streams.

    OnlineMatrixFactorization::item_count

    OnlineMatrixFactorization::item_vector

    fn OnlineMatrixFactorization::item_vector(self : OnlineMatrixFactorization, item : Int) -> Array[Double]?

    OnlineMatrixFactorization::new

    fn OnlineMatrixFactorization::new(users : Int, items : Int, rank : Int, learning_rate? : Double, regularization? : Double) -> OnlineMatrixFactorization

    OnlineMatrixFactorization::predict

    fn OnlineMatrixFactorization::predict(self : OnlineMatrixFactorization, user : Int, item : Int) -> Double

    OnlineMatrixFactorization::rank

    OnlineMatrixFactorization::reset

    OnlineMatrixFactorization::update

    fn OnlineMatrixFactorization::update(self : OnlineMatrixFactorization, user : Int, item : Int, rating : Double) -> Bool

    OnlineMatrixFactorization::updates

    OnlineMatrixFactorization::user_count

    OnlineMatrixFactorization::user_vector

    fn OnlineMatrixFactorization::user_vector(self : OnlineMatrixFactorization, user : Int) -> Array[Double]?

    OnlineMedoid

    pub struct OnlineMedoid {
    center : Array[Double]
    count : Double
    learning_rate : Double
    cost : Double
    }

    OnlineMedoid::center

    fn OnlineMedoid::center(self : OnlineMedoid) -> Array[Double]

    OnlineMedoid::count

    fn OnlineMedoid::count(self : OnlineMedoid) -> Double

    OnlineMedoid::mean_cost

    fn OnlineMedoid::mean_cost(self : OnlineMedoid) -> Double

    OnlineMedoid::new

    fn OnlineMedoid::new(dimension : Int, learning_rate? : Double) -> OnlineMedoid

    OnlineMedoid::reset

    fn OnlineMedoid::reset(self : OnlineMedoid) -> Unit

    OnlineMedoid::update

    fn OnlineMedoid::update(self : OnlineMedoid, features : Array[Double]) -> Double

    OnlineMinMaxScaler

    pub struct OnlineMinMaxScaler {
    minimum : Array[Double]
    maximum : Array[Double]
    initialized : Array[Bool]
    observations : Int
    }

    OnlineMinMaxScaler::inverse

    fn OnlineMinMaxScaler::inverse(self : OnlineMinMaxScaler, values : Array[Double], lower? : Double, upper? : Double) -> Array[Double]

    OnlineMinMaxScaler::maximum

    fn OnlineMinMaxScaler::maximum(self : OnlineMinMaxScaler) -> Array[Double]

    OnlineMinMaxScaler::minimum

    fn OnlineMinMaxScaler::minimum(self : OnlineMinMaxScaler) -> Array[Double]

    OnlineMinMaxScaler::new

    fn OnlineMinMaxScaler::new(dimension : Int) -> OnlineMinMaxScaler

    OnlineMinMaxScaler::observations

    fn OnlineMinMaxScaler::observations(self : OnlineMinMaxScaler) -> Int

    OnlineMinMaxScaler::reset

    fn OnlineMinMaxScaler::reset(self : OnlineMinMaxScaler) -> Unit

    OnlineMinMaxScaler::transform

    fn OnlineMinMaxScaler::transform(self : OnlineMinMaxScaler, values : Array[Double], lower? : Double, upper? : Double) -> Array[Double]

    OnlineMinMaxScaler::update

    fn OnlineMinMaxScaler::update(self : OnlineMinMaxScaler, values : Array[Double]) -> Unit

    OnlinePCA

    pub struct OnlinePCA {
    components : Array[Array[Double]]
    mean : Array[Double]
    learning_rate : Double
    count : Double
    explained : Array[Double]
    }

    Online principal-component analysis using Oja's rule.

    OnlinePCA::component_vectors

    fn OnlinePCA::component_vectors(self : OnlinePCA) -> Array[Array[Double]]

    OnlinePCA::components

    fn OnlinePCA::components(self : OnlinePCA) -> Int

    OnlinePCA::count

    fn OnlinePCA::count(self : OnlinePCA) -> Double

    OnlinePCA::dimension

    fn OnlinePCA::dimension(self : OnlinePCA) -> Int

    OnlinePCA::explained_variance

    fn OnlinePCA::explained_variance(self : OnlinePCA) -> Array[Double]

    OnlinePCA::mean

    fn OnlinePCA::mean(self : OnlinePCA) -> Array[Double]

    OnlinePCA::new

    fn OnlinePCA::new(components : Int, dimension : Int, learning_rate? : Double) -> OnlinePCA

    OnlinePCA::reconstruct

    fn OnlinePCA::reconstruct(self : OnlinePCA, transformed : Array[Double]) -> Array[Double]

    OnlinePCA::reset

    fn OnlinePCA::reset(self : OnlinePCA) -> Unit

    OnlinePCA::transform

    fn OnlinePCA::transform(self : OnlinePCA, values : Array[Double]) -> Array[Double]

    OnlinePCA::update

    fn OnlinePCA::update(self : OnlinePCA, values : Array[Double]) -> Unit

    OnlinePlattScaler

    pub struct OnlinePlattScaler {
    slope : Double
    intercept : Double
    learning_rate : Double
    steps : Int
    }

    Online Platt scaling for turning arbitrary scores into calibrated probabilities.

    OnlinePlattScaler::intercept

    fn OnlinePlattScaler::intercept(self : OnlinePlattScaler) -> Double

    OnlinePlattScaler::new

    fn OnlinePlattScaler::new(learning_rate? : Double) -> OnlinePlattScaler

    OnlinePlattScaler::predict

    fn OnlinePlattScaler::predict(self : OnlinePlattScaler, score : Double) -> Double

    OnlinePlattScaler::reset

    fn OnlinePlattScaler::reset(self : OnlinePlattScaler) -> Unit

    OnlinePlattScaler::slope

    fn OnlinePlattScaler::slope(self : OnlinePlattScaler) -> Double

    OnlinePlattScaler::steps

    fn OnlinePlattScaler::steps(self : OnlinePlattScaler) -> Int

    OnlinePlattScaler::update

    fn OnlinePlattScaler::update(self : OnlinePlattScaler, score : Double, label : Double) -> Unit

    OnlinePoissonRegression

    pub struct OnlinePoissonRegression {
    weights : Array[Double]
    learning_rate : Double
    l2 : Double
    steps : Int
    }

    Online Poisson regression for count-valued event streams.

    OnlinePoissonRegression::loss

    fn OnlinePoissonRegression::loss(self : OnlinePoissonRegression, features : Array[Double], count : Double) -> Double

    OnlinePoissonRegression::new

    fn OnlinePoissonRegression::new(dimension : Int, learning_rate? : Double, l2? : Double) -> OnlinePoissonRegression

    OnlinePoissonRegression::predict

    fn OnlinePoissonRegression::predict(self : OnlinePoissonRegression, features : Array[Double]) -> Double

    OnlinePoissonRegression::rate

    fn OnlinePoissonRegression::rate(self : OnlinePoissonRegression, features : Array[Double]) -> Double

    OnlinePoissonRegression::reset

    OnlinePoissonRegression::steps

    OnlinePoissonRegression::update

    fn OnlinePoissonRegression::update(self : OnlinePoissonRegression, features : Array[Double], count : Double) -> Unit

    OnlinePoissonRegression::weights

    OnlineQuantileInterval

    pub struct OnlineQuantileInterval {
    lower : OnlineQuantileRegression
    upper : OnlineQuantileRegression
    observations : Int
    }

    OnlineQuantileInterval::contains

    fn OnlineQuantileInterval::contains(self : OnlineQuantileInterval, features : Array[Double], label : Double) -> Bool

    OnlineQuantileInterval::new

    fn OnlineQuantileInterval::new(dimension : Int, coverage? : Double, learning_rate? : Double) -> OnlineQuantileInterval

    OnlineQuantileInterval::observations

    fn OnlineQuantileInterval::observations(self : OnlineQuantileInterval) -> Int

    OnlineQuantileInterval::predict

    fn OnlineQuantileInterval::predict(self : OnlineQuantileInterval, features : Array[Double]) -> (Double, Double)

    OnlineQuantileInterval::reset

    OnlineQuantileInterval::update

    fn OnlineQuantileInterval::update(self : OnlineQuantileInterval, features : Array[Double], label : Double) -> Unit

    OnlineQuantileRegression

    pub struct OnlineQuantileRegression {
    weights : Array[Double]
    learning_rate : Double
    quantile : Double
    l2 : Double
    steps : Int
    }

    Online quantile regression for prediction intervals and tail forecasting.

    OnlineQuantileRegression::new

    fn OnlineQuantileRegression::new(dimension : Int, quantile? : Double, learning_rate? : Double, l2? : Double) -> OnlineQuantileRegression

    OnlineQuantileRegression::pinball_loss

    fn OnlineQuantileRegression::pinball_loss(self : OnlineQuantileRegression, features : Array[Double], label : Double) -> Double

    OnlineQuantileRegression::predict

    fn OnlineQuantileRegression::predict(self : OnlineQuantileRegression, features : Array[Double]) -> Double

    OnlineQuantileRegression::quantile

    fn OnlineQuantileRegression::quantile(self : OnlineQuantileRegression) -> Double

    OnlineQuantileRegression::update

    fn OnlineQuantileRegression::update(self : OnlineQuantileRegression, features : Array[Double], label : Double) -> Unit

    OnlineQuantileRegression::weights

    OnlineQuantileSketch

    pub struct OnlineQuantileSketch {
    capacity : Int
    values : Array[Double]
    seen : Int
    }

    OnlineQuantileSketch::median

    fn OnlineQuantileSketch::median(self : OnlineQuantileSketch) -> Double?

    OnlineQuantileSketch::new

    fn OnlineQuantileSketch::new(capacity? : Int) -> OnlineQuantileSketch

    OnlineQuantileSketch::quantile

    fn OnlineQuantileSketch::quantile(self : OnlineQuantileSketch, probability : Double) -> Double?

    OnlineQuantileSketch::reset

    fn OnlineQuantileSketch::reset(self : OnlineQuantileSketch) -> Unit

    OnlineQuantileSketch::seen

    OnlineQuantileSketch::update

    fn OnlineQuantileSketch::update(self : OnlineQuantileSketch, value : Double) -> Unit

    OnlineReliabilityMonitor

    pub struct OnlineReliabilityMonitor {
    bins : Array[ReliabilityBin]
    observations : Int
    positives : Int
    log_loss : Double
    }

    OnlineReliabilityMonitor::bins

    OnlineReliabilityMonitor::brier_score

    fn OnlineReliabilityMonitor::brier_score(self : OnlineReliabilityMonitor) -> Double

    OnlineReliabilityMonitor::expected_calibration_error

    fn OnlineReliabilityMonitor::expected_calibration_error(self : OnlineReliabilityMonitor) -> Double

    OnlineReliabilityMonitor::log_loss

    fn OnlineReliabilityMonitor::log_loss(self : OnlineReliabilityMonitor) -> Double

    OnlineReliabilityMonitor::maximum_calibration_error

    fn OnlineReliabilityMonitor::maximum_calibration_error(self : OnlineReliabilityMonitor) -> Double

    OnlineReliabilityMonitor::new

    OnlineReliabilityMonitor::observations

    fn OnlineReliabilityMonitor::observations(self : OnlineReliabilityMonitor) -> Int

    OnlineReliabilityMonitor::observe

    fn OnlineReliabilityMonitor::observe(self : OnlineReliabilityMonitor, probability : Double, label : Double) -> Bool

    OnlineReliabilityMonitor::positive_rate

    fn OnlineReliabilityMonitor::positive_rate(self : OnlineReliabilityMonitor) -> Double

    OnlineReliabilityMonitor::reset

    OnlineRidgeRegression

    pub struct OnlineRidgeRegression {
    weights : Array[Double]
    diagonal : Array[Double]
    learning_rate : Double
    l2 : Double
    intercept : Double
    intercept_diagonal : Double
    steps : Int
    }

    Streaming ridge regression with a diagonal preconditioner.

    OnlineRidgeRegression::dimension

    fn OnlineRidgeRegression::dimension(self : OnlineRidgeRegression) -> Int

    OnlineRidgeRegression::intercept

    fn OnlineRidgeRegression::intercept(self : OnlineRidgeRegression) -> Double

    OnlineRidgeRegression::loss

    fn OnlineRidgeRegression::loss(self : OnlineRidgeRegression, features : Array[Double], label : Double) -> Double

    OnlineRidgeRegression::new

    fn OnlineRidgeRegression::new(dimension : Int, learning_rate? : Double, l2? : Double) -> OnlineRidgeRegression

    OnlineRidgeRegression::predict

    fn OnlineRidgeRegression::predict(self : OnlineRidgeRegression, features : Array[Double]) -> Double

    OnlineRidgeRegression::reset

    OnlineRidgeRegression::residual

    fn OnlineRidgeRegression::residual(self : OnlineRidgeRegression, features : Array[Double], label : Double) -> Double

    OnlineRidgeRegression::rmse

    fn OnlineRidgeRegression::rmse(self : OnlineRidgeRegression, samples : Array[Array[Double]], labels : Array[Double]) -> Double

    OnlineRidgeRegression::steps

    OnlineRidgeRegression::update

    fn OnlineRidgeRegression::update(self : OnlineRidgeRegression, features : Array[Double], label : Double) -> Unit

    OnlineRidgeRegression::update_weighted

    fn OnlineRidgeRegression::update_weighted(self : OnlineRidgeRegression, features : Array[Double], label : Double, sample_weight : Double) -> Unit

    OnlineRidgeRegression::weights

    fn OnlineRidgeRegression::weights(self : OnlineRidgeRegression) -> Array[Double]

    OnlineRobustScaler

    pub struct OnlineRobustScaler {
    sketches : Array[OnlineQuantileSketch]
    observations : Int
    }

    OnlineRobustScaler::new

    fn OnlineRobustScaler::new(dimension : Int, capacity? : Int) -> OnlineRobustScaler

    OnlineRobustScaler::observations

    fn OnlineRobustScaler::observations(self : OnlineRobustScaler) -> Int

    OnlineRobustScaler::quantile

    fn OnlineRobustScaler::quantile(self : OnlineRobustScaler, feature : Int, probability : Double) -> Double?

    OnlineRobustScaler::reset

    fn OnlineRobustScaler::reset(self : OnlineRobustScaler) -> Unit

    OnlineRobustScaler::transform

    fn OnlineRobustScaler::transform(self : OnlineRobustScaler, values : Array[Double]) -> Array[Double]

    OnlineRobustScaler::update

    fn OnlineRobustScaler::update(self : OnlineRobustScaler, values : Array[Double]) -> Unit

    OnlineSoftmaxRegression

    pub struct OnlineSoftmaxRegression {
    weights : Array[Array[Double]]
    learning_rate : Double
    l2 : Double
    steps : Int
    }

    Online multiclass softmax regression.

    The implementation uses a stable log-sum-exp softmax and updates all classes for each event. This makes it suitable for streaming routing, intent classification, and low-latency edge inference.

    OnlineSoftmaxRegression::accuracy_on

    fn OnlineSoftmaxRegression::accuracy_on(self : OnlineSoftmaxRegression, samples : Array[Array[Double]], labels : Array[Int]) -> Double

    OnlineSoftmaxRegression::classes

    OnlineSoftmaxRegression::dimension

    OnlineSoftmaxRegression::logits

    fn OnlineSoftmaxRegression::logits(self : OnlineSoftmaxRegression, features : Array[Double]) -> Array[Double]

    OnlineSoftmaxRegression::loss

    fn OnlineSoftmaxRegression::loss(self : OnlineSoftmaxRegression, features : Array[Double], label : Int) -> Double

    OnlineSoftmaxRegression::new

    fn OnlineSoftmaxRegression::new(classes : Int, dimension : Int, learning_rate? : Double, l2? : Double) -> OnlineSoftmaxRegression

    OnlineSoftmaxRegression::predict_class

    fn OnlineSoftmaxRegression::predict_class(self : OnlineSoftmaxRegression, features : Array[Double]) -> Int?

    OnlineSoftmaxRegression::predict_proba

    fn OnlineSoftmaxRegression::predict_proba(self : OnlineSoftmaxRegression, features : Array[Double]) -> Array[Double]

    OnlineSoftmaxRegression::predict_top_k

    fn OnlineSoftmaxRegression::predict_top_k(self : OnlineSoftmaxRegression, features : Array[Double], k : Int) -> Array[Int]

    OnlineSoftmaxRegression::reset

    OnlineSoftmaxRegression::steps

    OnlineSoftmaxRegression::top_k_accuracy

    fn OnlineSoftmaxRegression::top_k_accuracy(self : OnlineSoftmaxRegression, samples : Array[Array[Double]], labels : Array[Int], k : Int) -> Double

    OnlineSoftmaxRegression::update

    fn OnlineSoftmaxRegression::update(self : OnlineSoftmaxRegression, features : Array[Double], label : Int) -> Bool

    OnlineSoftmaxRegression::update_weighted

    fn OnlineSoftmaxRegression::update_weighted(self : OnlineSoftmaxRegression, features : Array[Double], label : Int, weight : Double) -> Bool

    OnlineSoftmaxRegression::weight_norm_squared

    fn OnlineSoftmaxRegression::weight_norm_squared(self : OnlineSoftmaxRegression) -> Double

    OnlineSoftmaxRegression::weights

    OnlineStumpEnsemble

    pub struct OnlineStumpEnsemble {
    stumps : Array[OnlineDecisionStump]
    rng : DeterministicRng
    updates : Int
    }

    A small random stump ensemble for bounded-memory online classification.

    OnlineStumpEnsemble::accuracy

    fn OnlineStumpEnsemble::accuracy(self : OnlineStumpEnsemble) -> Double

    OnlineStumpEnsemble::feature_indices

    fn OnlineStumpEnsemble::feature_indices(self : OnlineStumpEnsemble) -> Array[Int]

    OnlineStumpEnsemble::new

    fn OnlineStumpEnsemble::new(stump_count : Int, dimension : Int, seed? : UInt64) -> OnlineStumpEnsemble

    OnlineStumpEnsemble::predict

    fn OnlineStumpEnsemble::predict(self : OnlineStumpEnsemble, features : Array[Double]) -> Double

    OnlineStumpEnsemble::predict_label

    fn OnlineStumpEnsemble::predict_label(self : OnlineStumpEnsemble, features : Array[Double], threshold? : Double) -> Double

    OnlineStumpEnsemble::reset

    fn OnlineStumpEnsemble::reset(self : OnlineStumpEnsemble) -> Unit

    OnlineStumpEnsemble::size

    OnlineStumpEnsemble::thresholds

    fn OnlineStumpEnsemble::thresholds(self : OnlineStumpEnsemble) -> Array[Double]

    OnlineStumpEnsemble::update

    fn OnlineStumpEnsemble::update(self : OnlineStumpEnsemble, features : Array[Double], label : Double, weight? : Double) -> Unit

    OnlineStumpEnsemble::updates

    fn OnlineStumpEnsemble::updates(self : OnlineStumpEnsemble) -> Int

    OptimizerStatistics

    pub struct OptimizerStatistics {
    steps : Int
    gradient_l1 : Double
    gradient_l2 : Double
    update_l2 : Double
    }

    OptimizerStatistics::mean_gradient_l1

    fn OptimizerStatistics::mean_gradient_l1(self : OptimizerStatistics) -> Double

    OptimizerStatistics::mean_gradient_l2

    fn OptimizerStatistics::mean_gradient_l2(self : OptimizerStatistics) -> Double

    OptimizerStatistics::mean_update_l2

    fn OptimizerStatistics::mean_update_l2(self : OptimizerStatistics) -> Double

    OptimizerStatistics::new

    OptimizerStatistics::record

    fn OptimizerStatistics::record(self : OptimizerStatistics, gradient : Array[Double], update : Array[Double]) -> Unit

    OptimizerStatistics::steps

    fn OptimizerStatistics::steps(self : OptimizerStatistics) -> Int

    PageHinkleyDetector

    pub struct PageHinkleyDetector {
    threshold : Double
    delta : Double
    mean : Double
    cumulative : Double
    minimum : Double
    count : Double
    }

    Page-Hinkley change detector for gradual concept drift.

    PageHinkleyDetector::count

    fn PageHinkleyDetector::count(self : PageHinkleyDetector) -> Double

    PageHinkleyDetector::mean

    fn PageHinkleyDetector::mean(self : PageHinkleyDetector) -> Double

    PageHinkleyDetector::new

    fn PageHinkleyDetector::new(threshold? : Double, delta? : Double) -> PageHinkleyDetector

    PageHinkleyDetector::reset

    fn PageHinkleyDetector::reset(self : PageHinkleyDetector) -> Unit

    PageHinkleyDetector::update

    fn PageHinkleyDetector::update(self : PageHinkleyDetector, value : Double) -> Bool

    PairwiseRanker

    pub struct PairwiseRanker {
    weights : Array[Double]
    learning_rate : Double
    margin : Double
    l2 : Double
    updates : Int
    }

    Online pairwise ranking model trained with a hinge objective.

    PairwiseRanker::compare

    fn PairwiseRanker::compare(self : PairwiseRanker, left : Array[Double], right : Array[Double]) -> Double

    PairwiseRanker::dimension

    fn PairwiseRanker::dimension(self : PairwiseRanker) -> Int

    PairwiseRanker::loss

    fn PairwiseRanker::loss(self : PairwiseRanker, positive : Array[Double], negative : Array[Double]) -> Double

    PairwiseRanker::new

    fn PairwiseRanker::new(dimension : Int, learning_rate? : Double, margin? : Double, l2? : Double) -> PairwiseRanker

    PairwiseRanker::reset

    fn PairwiseRanker::reset(self : PairwiseRanker) -> Unit

    PairwiseRanker::score

    fn PairwiseRanker::score(self : PairwiseRanker, features : Array[Double]) -> Double

    PairwiseRanker::update

    fn PairwiseRanker::update(self : PairwiseRanker, positive : Array[Double], negative : Array[Double]) -> Bool

    PairwiseRanker::updates

    fn PairwiseRanker::updates(self : PairwiseRanker) -> Int

    PairwiseRanker::weights

    fn PairwiseRanker::weights(self : PairwiseRanker) -> Array[Double]

    PassiveAggressiveRegressor

    pub struct PassiveAggressiveRegressor {
    weights : Array[Double]
    aggressiveness : Double
    epsilon : Double
    l2 : Double
    updates : Int
    }

    Passive-aggressive online regression with robust step sizing.

    PassiveAggressiveRegressor::new

    fn PassiveAggressiveRegressor::new(dimension : Int, aggressiveness? : Double, epsilon? : Double, l2? : Double) -> PassiveAggressiveRegressor

    PassiveAggressiveRegressor::predict

    fn PassiveAggressiveRegressor::predict(self : PassiveAggressiveRegressor, features : Array[Double]) -> Double

    PassiveAggressiveRegressor::reset

    PassiveAggressiveRegressor::update

    fn PassiveAggressiveRegressor::update(self : PassiveAggressiveRegressor, features : Array[Double], label : Double) -> Bool

    PassiveAggressiveRegressor::updates

    PassiveAggressiveRegressor::weights

    PosteriorBandit

    pub struct PosteriorBandit {
    alpha : Array[Double]
    beta : Array[Double]
    rng : DeterministicRng
    steps : Int
    }

    PosteriorBandit::arm_count

    fn PosteriorBandit::arm_count(self : PosteriorBandit) -> Int

    PosteriorBandit::choose

    fn PosteriorBandit::choose(self : PosteriorBandit) -> Int?

    PosteriorBandit::mean

    fn PosteriorBandit::mean(self : PosteriorBandit, arm : Int) -> Double

    PosteriorBandit::new

    fn PosteriorBandit::new(arm_count : Int, prior? : Double, seed? : UInt64) -> PosteriorBandit

    PosteriorBandit::reset

    fn PosteriorBandit::reset(self : PosteriorBandit) -> Unit

    PosteriorBandit::sample

    fn PosteriorBandit::sample(self : PosteriorBandit, arm : Int) -> Double

    PosteriorBandit::steps

    fn PosteriorBandit::steps(self : PosteriorBandit) -> Int

    PosteriorBandit::uncertainty

    fn PosteriorBandit::uncertainty(self : PosteriorBandit, arm : Int) -> Double

    PosteriorBandit::update

    fn PosteriorBandit::update(self : PosteriorBandit, arm : Int, reward : Double) -> Bool

    PredictionEnvelope

    pub struct PredictionEnvelope {
    request_id : String
    route_id : String
    version : String
    values : Array[Double]
    confidence : Double
    timestamp : Int64
    cached : Bool
    }

    PredictionEnvelope::cached

    fn PredictionEnvelope::cached(self : PredictionEnvelope) -> Bool

    PredictionEnvelope::confidence

    fn PredictionEnvelope::confidence(self : PredictionEnvelope) -> Double

    PredictionEnvelope::new

    fn PredictionEnvelope::new(request_id : String, decision : RouteDecision, values : Array[Double], confidence : Double, timestamp : Int64, cached? : Bool) -> PredictionEnvelope

    PredictionEnvelope::request_id

    fn PredictionEnvelope::request_id(self : PredictionEnvelope) -> String

    PredictionEnvelope::route_id

    fn PredictionEnvelope::route_id(self : PredictionEnvelope) -> String

    PredictionEnvelope::timestamp

    fn PredictionEnvelope::timestamp(self : PredictionEnvelope) -> Int64

    PredictionEnvelope::values

    fn PredictionEnvelope::values(self : PredictionEnvelope) -> Array[Double]

    PredictionEnvelope::version

    fn PredictionEnvelope::version(self : PredictionEnvelope) -> String

    PredictionGuard

    pub struct PredictionGuard {
    lower : Double
    upper : Double
    repaired : Int
    }

    PredictionGuard::apply

    fn PredictionGuard::apply(self : PredictionGuard, prediction : Double) -> Double

    PredictionGuard::new

    fn PredictionGuard::new(lower : Double, upper : Double) -> PredictionGuard

    PredictionGuard::repaired

    fn PredictionGuard::repaired(self : PredictionGuard) -> Int

    PredictionGuard::reset

    fn PredictionGuard::reset(self : PredictionGuard) -> Unit

    PredictionRequest

    pub struct PredictionRequest {
    request_id : String
    features : Array[Double]
    timestamp : Int64
    group : String
    }

    Deterministic model-serving helpers for embedding online models in services.

    PredictionRequest::features

    fn PredictionRequest::features(self : PredictionRequest) -> Array[Double]

    PredictionRequest::group

    fn PredictionRequest::group(self : PredictionRequest) -> String

    PredictionRequest::new

    fn PredictionRequest::new(request_id : String, features : Array[Double], timestamp : Int64, group? : String) -> PredictionRequest

    PredictionRequest::request_id

    fn PredictionRequest::request_id(self : PredictionRequest) -> String

    PredictionRequest::timestamp

    fn PredictionRequest::timestamp(self : PredictionRequest) -> Int64

    PredictionResponse

    pub struct PredictionResponse {
    request_id : String
    prediction : Double
    probability : Double
    model_version : String
    latency_ms : Double
    accepted : Bool
    }

    PredictionResponse::accepted

    fn PredictionResponse::accepted(self : PredictionResponse) -> Bool

    PredictionResponse::latency_ms

    fn PredictionResponse::latency_ms(self : PredictionResponse) -> Double

    PredictionResponse::model_version

    fn PredictionResponse::model_version(self : PredictionResponse) -> String

    PredictionResponse::new

    fn PredictionResponse::new(request_id : String, prediction : Double, model_version : String, latency_ms? : Double, accepted? : Bool) -> PredictionResponse

    PredictionResponse::prediction

    fn PredictionResponse::prediction(self : PredictionResponse) -> Double

    PredictionResponse::probability

    fn PredictionResponse::probability(self : PredictionResponse) -> Double

    PredictionResponse::request_id

    fn PredictionResponse::request_id(self : PredictionResponse) -> String

    PredictionSet

    pub struct PredictionSet {
    labels : Array[Int]
    probabilities : Array[Double]
    threshold : Double
    }

    PredictionSet::contains

    fn PredictionSet::contains(self : PredictionSet, label : Int) -> Bool

    PredictionSet::labels

    fn PredictionSet::labels(self : PredictionSet) -> Array[Int]

    PredictionSet::new

    fn PredictionSet::new(probabilities : Array[Double], threshold? : Double) -> PredictionSet

    PredictionSet::probability

    fn PredictionSet::probability(self : PredictionSet, label : Int) -> Double

    PredictionSet::size

    fn PredictionSet::size(self : PredictionSet) -> Int

    PrivacyBudget

    pub struct PrivacyBudget {
    total : Double
    remaining_budget : Double
    queries : Int
    rejected : Int
    }

    PrivacyBudget::consume

    fn PrivacyBudget::consume(self : PrivacyBudget, cost : Double) -> Bool

    PrivacyBudget::exhausted

    fn PrivacyBudget::exhausted(self : PrivacyBudget) -> Bool

    PrivacyBudget::new

    fn PrivacyBudget::new(epsilon : Double) -> PrivacyBudget

    PrivacyBudget::queries

    fn PrivacyBudget::queries(self : PrivacyBudget) -> Int

    PrivacyBudget::rejected

    fn PrivacyBudget::rejected(self : PrivacyBudget) -> Int

    PrivacyBudget::remaining

    fn PrivacyBudget::remaining(self : PrivacyBudget) -> Double

    PrivacyBudget::reset

    fn PrivacyBudget::reset(self : PrivacyBudget) -> Unit

    PrivacyBudget::spent

    fn PrivacyBudget::spent(self : PrivacyBudget) -> Double

    PrivacyBudget::total

    fn PrivacyBudget::total(self : PrivacyBudget) -> Double

    ProbabilityThresholdPolicy

    pub struct ProbabilityThresholdPolicy {
    target_rate : Double
    threshold : Double
    observations : Int
    positives : Int
    }

    ProbabilityThresholdPolicy::new

    fn ProbabilityThresholdPolicy::new(target_rate? : Double) -> ProbabilityThresholdPolicy

    ProbabilityThresholdPolicy::observations

    ProbabilityThresholdPolicy::observe

    fn ProbabilityThresholdPolicy::observe(self : ProbabilityThresholdPolicy, probability : Double) -> Bool

    ProbabilityThresholdPolicy::positive_rate

    fn ProbabilityThresholdPolicy::positive_rate(self : ProbabilityThresholdPolicy) -> Double

    ProbabilityThresholdPolicy::reset

    ProbabilityThresholdPolicy::target_rate

    fn ProbabilityThresholdPolicy::target_rate(self : ProbabilityThresholdPolicy) -> Double

    ProbabilityThresholdPolicy::threshold

    PromotionGate

    pub struct PromotionGate {
    minimum_auc : Double
    maximum_log_loss : Double
    minimum_samples : Int
    }

    PromotionGate::accept

    fn PromotionGate::accept(self : PromotionGate, summary : EvaluationSummary) -> Bool

    PromotionGate::new

    fn PromotionGate::new(minimum_auc? : Double, maximum_log_loss? : Double, minimum_samples? : Int) -> PromotionGate

    QualityGate

    pub struct QualityGate {
    dimension : Int
    min_weight : Double
    max_weight : Double
    allow_nan_like : Bool
    }

    QualityGate::dimension

    fn QualityGate::dimension(self : QualityGate) -> Int

    QualityGate::new

    fn QualityGate::new(dimension : Int, min_weight? : Double, max_weight? : Double) -> QualityGate

    QualityGate::validate_features

    fn QualityGate::validate_features(self : QualityGate, features : Array[Double]) -> ValidationReport

    QualityGate::validate_sample

    fn QualityGate::validate_sample(self : QualityGate, features : Array[Double], weight : Double) -> ValidationReport

    QualityGate::validate_weight

    fn QualityGate::validate_weight(self : QualityGate, weight : Double) -> ValidationReport

    QuantileBinner

    pub struct QuantileBinner {
    boundaries : Array[Double]
    }

    QuantileBinner::bin

    fn QuantileBinner::bin(self : QuantileBinner, value : Double) -> Int

    QuantileBinner::bins

    fn QuantileBinner::bins(self : QuantileBinner) -> Int

    QuantileBinner::boundaries

    fn QuantileBinner::boundaries(self : QuantileBinner) -> Array[Double]

    QuantileBinner::new

    fn QuantileBinner::new(boundaries : Array[Double]) -> QuantileBinner

    QuantileBinner::one_hot

    fn QuantileBinner::one_hot(self : QuantileBinner, value : Double) -> Array[Double]

    RLS

    pub struct RLS {
    weights : Array[Double]
    p : Array[Array[Double]]
    lambda : Double
    } derive(ToJson,
    FromJson
    )

    Recursive Least Squares (RLS) model for online linear regression.

    RLS::new

    fn RLS::new(dim : Int, lambda? : Double, alpha? : Double) -> RLS

    Create a new RLS model with dim features. lambda is the forgetting factor (default 1.0). alpha is the initial ridge regression penalty (default 1.0).

    RLS::predict

    fn RLS::predict(self : RLS, features : Array[Double]) -> Double

    Predict the output for a given feature vector.

    RLS::update

    fn RLS::update(self : RLS, features : Array[Double], label : Double) -> Unit

    Update the model with a single sample (features and label).

    RMSPropOptimizer

    pub struct RMSPropOptimizer {
    learning_rate : Double
    decay : Double
    epsilon : Double
    mean_square : Array[Double]
    clipper : GradientClipper
    step_count : Int
    }

    RMSPropOptimizer::apply

    fn RMSPropOptimizer::apply(self : RMSPropOptimizer, parameters : Array[Double], gradients : Array[Double]) -> Unit

    RMSPropOptimizer::mean_square

    fn RMSPropOptimizer::mean_square(self : RMSPropOptimizer) -> Array[Double]

    RMSPropOptimizer::new

    fn RMSPropOptimizer::new(dimension : Int, learning_rate? : Double, decay? : Double, epsilon? : Double, clipper? : GradientClipper) -> RMSPropOptimizer

    RMSPropOptimizer::reset

    fn RMSPropOptimizer::reset(self : RMSPropOptimizer) -> Unit

    RMSPropOptimizer::update

    fn RMSPropOptimizer::update(self : RMSPropOptimizer, gradients : Array[Double]) -> Array[Double]

    RandomFourierFeatures

    pub struct RandomFourierFeatures {
    input_dimension : Int
    output_dimension : Int
    weights : Array[Array[Double]]
    phases : Array[Double]
    scale : Double
    rng : DeterministicRng
    }

    Random Fourier feature map for approximating a Gaussian kernel.

    RandomFourierFeatures::input_dimension

    fn RandomFourierFeatures::input_dimension(self : RandomFourierFeatures) -> Int

    RandomFourierFeatures::new

    fn RandomFourierFeatures::new(input_dimension : Int, output_dimension : Int, width? : Double, seed? : UInt64) -> RandomFourierFeatures

    RandomFourierFeatures::output_dimension

    fn RandomFourierFeatures::output_dimension(self : RandomFourierFeatures) -> Int

    RandomFourierFeatures::transform

    fn RandomFourierFeatures::transform(self : RandomFourierFeatures, features : Array[Double]) -> Array[Double]

    RandomFourierFeatures::weight_matrix

    fn RandomFourierFeatures::weight_matrix(self : RandomFourierFeatures) -> Array[Array[Double]]

    RankingMetrics

    pub struct RankingMetrics {
    queries : Double
    reciprocal_rank : Double
    ndcg_sum : Double
    hits : Array[Double]
    }

    RankingMetrics::mrr

    fn RankingMetrics::mrr(self : RankingMetrics) -> Double

    RankingMetrics::ndcg

    fn RankingMetrics::ndcg(self : RankingMetrics) -> Double

    RankingMetrics::new

    fn RankingMetrics::new(max_k? : Int) -> RankingMetrics

    RankingMetrics::observe

    fn RankingMetrics::observe(self : RankingMetrics, relevances : Array[Double]) -> Unit

    RankingMetrics::queries

    fn RankingMetrics::queries(self : RankingMetrics) -> Double

    RankingMetrics::recall_at

    fn RankingMetrics::recall_at(self : RankingMetrics, k : Int) -> Double

    RankingMetrics::reset

    fn RankingMetrics::reset(self : RankingMetrics) -> Unit

    RateLimiter

    pub struct RateLimiter {
    limit : Int
    period : Int
    ticks : Int
    accepted : Int
    }

    RateLimiter::accepted

    fn RateLimiter::accepted(self : RateLimiter) -> Int

    RateLimiter::allow

    fn RateLimiter::allow(self : RateLimiter) -> Bool

    RateLimiter::new

    fn RateLimiter::new(limit : Int, period : Int) -> RateLimiter

    RateLimiter::reset

    fn RateLimiter::reset(self : RateLimiter) -> Unit

    RegressionMetrics

    pub struct RegressionMetrics {
    count : Double
    absolute_error : Double
    squared_error : Double
    label_sum : Double
    label_squared_sum : Double
    minimum_error : Double
    maximum_error : Double
    }

    Regression metrics that remain stable under incremental updates.

    RegressionMetrics::count

    fn RegressionMetrics::count(self : RegressionMetrics) -> Double

    RegressionMetrics::mae

    fn RegressionMetrics::mae(self : RegressionMetrics) -> Double

    RegressionMetrics::maximum_error

    fn RegressionMetrics::maximum_error(self : RegressionMetrics) -> Double

    RegressionMetrics::minimum_error

    fn RegressionMetrics::minimum_error(self : RegressionMetrics) -> Double

    RegressionMetrics::mse

    fn RegressionMetrics::mse(self : RegressionMetrics) -> Double

    RegressionMetrics::new

    RegressionMetrics::r2

    fn RegressionMetrics::r2(self : RegressionMetrics) -> Double

    RegressionMetrics::reset

    fn RegressionMetrics::reset(self : RegressionMetrics) -> Unit

    RegressionMetrics::rmse

    fn RegressionMetrics::rmse(self : RegressionMetrics) -> Double

    RegressionMetrics::update

    fn RegressionMetrics::update(self : RegressionMetrics, prediction : Double, label : Double, weight? : Double) -> Unit

    Regularizer

    pub struct Regularizer {
    l1 : Double
    l2 : Double
    }

    Regularizer::gradient

    fn Regularizer::gradient(self : Regularizer, weights : Array[Double], index : Int) -> Double

    Regularizer::new

    fn Regularizer::new(l1? : Double, l2? : Double) -> Regularizer

    Regularizer::penalty

    fn Regularizer::penalty(self : Regularizer, weights : Array[Double]) -> Double

    Regularizer::proximal

    fn Regularizer::proximal(self : Regularizer, value : Double, step : Double) -> Double

    ReliabilityBin

    pub struct ReliabilityBin {
    lower : Double
    upper : Double
    count : Int
    predicted_sum : Double
    observed_sum : Double
    squared_error : Double
    }

    Online reliability and uncertainty calibration utilities.

    Calibrated probabilities and conformal-style intervals are useful at the final serving boundary: they turn a raw score into an operational signal with explicit coverage, confidence, and alerting statistics.

    ReliabilityBin::brier

    fn ReliabilityBin::brier(self : ReliabilityBin) -> Double

    ReliabilityBin::count

    fn ReliabilityBin::count(self : ReliabilityBin) -> Int

    ReliabilityBin::empirical_rate

    fn ReliabilityBin::empirical_rate(self : ReliabilityBin) -> Double

    ReliabilityBin::error

    fn ReliabilityBin::error(self : ReliabilityBin) -> Double

    ReliabilityBin::lower

    fn ReliabilityBin::lower(self : ReliabilityBin) -> Double

    ReliabilityBin::mean_prediction

    fn ReliabilityBin::mean_prediction(self : ReliabilityBin) -> Double

    ReliabilityBin::new

    fn ReliabilityBin::new(lower : Double, upper : Double) -> ReliabilityBin

    ReliabilityBin::observe

    fn ReliabilityBin::observe(self : ReliabilityBin, probability : Double, label : Double) -> Unit

    ReliabilityBin::reset

    fn ReliabilityBin::reset(self : ReliabilityBin) -> Unit

    ReliabilityBin::upper

    fn ReliabilityBin::upper(self : ReliabilityBin) -> Double

    ReproducibilityManifest

    pub struct ReproducibilityManifest {
    model : String
    version : String
    source_checksum : String
    data_checksum : String
    seed : Int
    parameters : Map[String, String]
    }

    ReproducibilityManifest::data_checksum

    fn ReproducibilityManifest::data_checksum(self : ReproducibilityManifest) -> String

    ReproducibilityManifest::fingerprint

    fn ReproducibilityManifest::fingerprint(self : ReproducibilityManifest) -> String

    ReproducibilityManifest::model

    ReproducibilityManifest::new

    fn ReproducibilityManifest::new(model : String, version : String, source_checksum : String, data_checksum : String, seed : Int) -> ReproducibilityManifest

    ReproducibilityManifest::parameter

    fn ReproducibilityManifest::parameter(self : ReproducibilityManifest, key : String) -> String

    ReproducibilityManifest::parameter_count

    fn ReproducibilityManifest::parameter_count(self : ReproducibilityManifest) -> Int

    ReproducibilityManifest::seed

    ReproducibilityManifest::set

    fn ReproducibilityManifest::set(self : ReproducibilityManifest, key : String, value : String) -> Unit

    ReproducibilityManifest::source_checksum

    fn ReproducibilityManifest::source_checksum(self : ReproducibilityManifest) -> String

    ReproducibilityManifest::version

    fn ReproducibilityManifest::version(self : ReproducibilityManifest) -> String

    RequestBatcher

    pub struct RequestBatcher {
    capacity : Int
    requests : Array[PredictionRequest]
    flushed : Int
    dropped : Int
    }

    RequestBatcher::add

    fn RequestBatcher::add(self : RequestBatcher, request : PredictionRequest) -> Bool

    RequestBatcher::dropped

    fn RequestBatcher::dropped(self : RequestBatcher) -> Int

    RequestBatcher::flush

    RequestBatcher::flushed

    fn RequestBatcher::flushed(self : RequestBatcher) -> Int

    RequestBatcher::new

    fn RequestBatcher::new(capacity : Int) -> RequestBatcher

    RequestBatcher::pending

    fn RequestBatcher::pending(self : RequestBatcher) -> Int

    RequestBatcher::ready

    fn RequestBatcher::ready(self : RequestBatcher) -> Bool

    RequestBatcher::reset

    fn RequestBatcher::reset(self : RequestBatcher) -> Unit

    ReservoirSampler

    pub struct ReservoirSampler {
    capacity : Int
    values : Array[Double]
    seen : Int
    rng : DeterministicRng
    }

    ReservoirSampler::capacity

    fn ReservoirSampler::capacity(self : ReservoirSampler) -> Int

    ReservoirSampler::new

    fn ReservoirSampler::new(capacity : Int, seed? : UInt64) -> ReservoirSampler

    ReservoirSampler::observe

    fn ReservoirSampler::observe(self : ReservoirSampler, value : Double) -> Bool

    ReservoirSampler::reset

    fn ReservoirSampler::reset(self : ReservoirSampler) -> Unit

    ReservoirSampler::sample

    fn ReservoirSampler::sample(self : ReservoirSampler) -> Array[Double]

    ReservoirSampler::seen

    fn ReservoirSampler::seen(self : ReservoirSampler) -> Int

    RollbackPolicy

    pub struct RollbackPolicy {
    minimum_accuracy : Double
    maximum_loss : Double
    maximum_error_rate : Double
    }

    RollbackPolicy::new

    fn RollbackPolicy::new(minimum_accuracy? : Double, maximum_loss? : Double, maximum_error_rate? : Double) -> RollbackPolicy

    RollbackPolicy::should_rollback

    fn RollbackPolicy::should_rollback(self : RollbackPolicy, accuracy : Double, loss : Double, error_rate : Double) -> Bool

    RollingWindow

    pub struct RollingWindow {
    capacity : Int
    features : Array[Array[Double]]
    labels : Array[Double]
    weights : Array[Double]
    dropped : Int
    }

    RollingWindow::batch

    RollingWindow::capacity

    fn RollingWindow::capacity(self : RollingWindow) -> Int

    RollingWindow::clear

    fn RollingWindow::clear(self : RollingWindow) -> Unit

    RollingWindow::dropped

    fn RollingWindow::dropped(self : RollingWindow) -> Int

    RollingWindow::new

    fn RollingWindow::new(capacity : Int) -> RollingWindow

    RollingWindow::push

    fn RollingWindow::push(self : RollingWindow, features : Array[Double], label : Double, weight? : Double) -> Bool

    RollingWindow::size

    fn RollingWindow::size(self : RollingWindow) -> Int

    RouteCandidate

    pub struct RouteCandidate {
    id : String
    version : String
    weight : Double
    latency_budget : Double
    max_batch : Int
    health : RouteHealth
    requests : Int
    failures : Int
    total_latency : Double
    last_seen : Int64
    }

    RouteCandidate::available

    fn RouteCandidate::available(self : RouteCandidate) -> Bool

    RouteCandidate::average_latency

    fn RouteCandidate::average_latency(self : RouteCandidate) -> Double

    RouteCandidate::error_rate

    fn RouteCandidate::error_rate(self : RouteCandidate) -> Double

    RouteCandidate::failures

    fn RouteCandidate::failures(self : RouteCandidate) -> Int

    RouteCandidate::health

    RouteCandidate::id

    fn RouteCandidate::id(self : RouteCandidate) -> String

    RouteCandidate::latency_budget

    fn RouteCandidate::latency_budget(self : RouteCandidate) -> Double

    RouteCandidate::max_batch

    fn RouteCandidate::max_batch(self : RouteCandidate) -> Int

    RouteCandidate::new

    fn RouteCandidate::new(id : String, version : String, weight? : Double, latency_budget? : Double, max_batch? : Int) -> RouteCandidate

    RouteCandidate::record

    fn RouteCandidate::record(self : RouteCandidate, success : Bool, latency : Double, timestamp : Int64) -> Unit

    RouteCandidate::requests

    fn RouteCandidate::requests(self : RouteCandidate) -> Int

    RouteCandidate::reset

    fn RouteCandidate::reset(self : RouteCandidate) -> Unit

    RouteCandidate::set_health

    fn RouteCandidate::set_health(self : RouteCandidate, health : RouteHealth) -> Unit

    RouteCandidate::set_weight

    fn RouteCandidate::set_weight(self : RouteCandidate, weight : Double) -> Unit

    RouteCandidate::version

    fn RouteCandidate::version(self : RouteCandidate) -> String

    RouteCandidate::weight

    fn RouteCandidate::weight(self : RouteCandidate) -> Double

    RouteDecision

    pub struct RouteDecision {
    route_id : String
    version : String
    fallback : Bool
    reason : String
    }

    RouteDecision::is_fallback

    fn RouteDecision::is_fallback(self : RouteDecision) -> Bool

    RouteDecision::new

    fn RouteDecision::new(route_id : String, version : String, fallback : Bool, reason : String) -> RouteDecision

    RouteDecision::reason

    fn RouteDecision::reason(self : RouteDecision) -> String

    RouteDecision::route_id

    fn RouteDecision::route_id(self : RouteDecision) -> String

    RouteDecision::version

    fn RouteDecision::version(self : RouteDecision) -> String

    RouteHealth

    pub(all) enum RouteHealth {
    Healthy
    Warming
    Degraded
    Offline
    } derive(Eq,
    Debug
    )

    Production-oriented model routing and score caching.

    Routing decisions are kept independent from model implementations. This lets a service deploy several versions, enforce health and latency budgets, and still return a deterministic fallback when the preferred route is warming or temporarily unavailable.

    RoutingPolicy

    pub(all) enum RoutingPolicy {
    RoundRobin
    Weighted
    LeastLatency
    LowestErrorRate
    } derive(Eq,
    Debug
    )

    RowQualitySummary

    pub struct RowQualitySummary {
    rows : Int
    accepted : Int
    rejected : Int
    duplicates : Int
    missing_values : Int
    type_errors : Int
    }

    RowQualitySummary::acceptance_rate

    fn RowQualitySummary::acceptance_rate(self : RowQualitySummary) -> Double

    RowQualitySummary::accepted

    fn RowQualitySummary::accepted(self : RowQualitySummary) -> Int

    RowQualitySummary::duplicates

    fn RowQualitySummary::duplicates(self : RowQualitySummary) -> Int

    RowQualitySummary::missing_values

    fn RowQualitySummary::missing_values(self : RowQualitySummary) -> Int

    RowQualitySummary::new

    RowQualitySummary::observe

    fn RowQualitySummary::observe(self : RowQualitySummary, report : ContractReport, duplicate : Bool) -> Unit

    RowQualitySummary::rejected

    fn RowQualitySummary::rejected(self : RowQualitySummary) -> Int

    RowQualitySummary::reset

    fn RowQualitySummary::reset(self : RowQualitySummary) -> Unit

    RowQualitySummary::rows

    fn RowQualitySummary::rows(self : RowQualitySummary) -> Int

    RowQualitySummary::type_errors

    fn RowQualitySummary::type_errors(self : RowQualitySummary) -> Int

    RunningMean

    pub struct RunningMean {
    count : Double
    mean : Double
    }

    RunningMean::count

    fn RunningMean::count(self : RunningMean) -> Double

    RunningMean::merge

    fn RunningMean::merge(self : RunningMean, other : RunningMean) -> Unit

    RunningMean::new

    RunningMean::update

    fn RunningMean::update(self : RunningMean, value : Double) -> Unit

    RunningMean::value

    fn RunningMean::value(self : RunningMean) -> Double

    RunningMoments

    pub struct RunningMoments {
    count : Double
    mean : Double
    m2 : Double
    minimum : Double
    maximum : Double
    }

    Numerically stable scalar moments using Welford's recurrence.

    RunningMoments::count

    fn RunningMoments::count(self : RunningMoments) -> Double

    RunningMoments::maximum

    fn RunningMoments::maximum(self : RunningMoments) -> Double

    RunningMoments::mean

    fn RunningMoments::mean(self : RunningMoments) -> Double

    RunningMoments::merge

    fn RunningMoments::merge(self : RunningMoments, other : RunningMoments) -> Unit

    RunningMoments::minimum

    fn RunningMoments::minimum(self : RunningMoments) -> Double

    RunningMoments::new

    RunningMoments::population_variance

    fn RunningMoments::population_variance(self : RunningMoments) -> Double

    RunningMoments::range

    fn RunningMoments::range(self : RunningMoments) -> Double

    RunningMoments::reset

    fn RunningMoments::reset(self : RunningMoments) -> Unit

    RunningMoments::standard_deviation

    fn RunningMoments::standard_deviation(self : RunningMoments) -> Double

    RunningMoments::update

    fn RunningMoments::update(self : RunningMoments, value : Double, weight? : Double) -> Unit

    RunningMoments::variance

    fn RunningMoments::variance(self : RunningMoments) -> Double

    RunningMoments::z_score

    fn RunningMoments::z_score(self : RunningMoments, value : Double) -> Double

    SGDLogisticRegression

    pub struct SGDLogisticRegression {
    weights : Array[Double]
    alpha : Double
    } derive(ToJson,
    FromJson
    )

    Online Logistic Regression using Stochastic Gradient Descent.

    SGDLogisticRegression::new

    fn SGDLogisticRegression::new(dim : Int, alpha? : Double) -> SGDLogisticRegression

    Create a new SGD Logistic Regression model.

    SGDLogisticRegression::predict

    fn SGDLogisticRegression::predict(self : SGDLogisticRegression, features : Array[Double]) -> Double

    Predict the probability (0 to 1) for a given feature vector.

    SGDLogisticRegression::update

    fn SGDLogisticRegression::update(self : SGDLogisticRegression, features : Array[Double], label : Double) -> Unit

    Update the model with a single sample (features and label). Label should be 0.0 or 1.0.

    ScalarTransform

    pub struct ScalarTransform {
    kind : ScalarTransformKind
    applied : Int
    invalid : Int
    }

    ScalarTransform::applied

    fn ScalarTransform::applied(self : ScalarTransform) -> Int

    ScalarTransform::apply

    fn ScalarTransform::apply(self : ScalarTransform, value : Double) -> Double

    ScalarTransform::apply_array

    fn ScalarTransform::apply_array(self : ScalarTransform, values : Array[Double]) -> Array[Double]

    ScalarTransform::invalid

    fn ScalarTransform::invalid(self : ScalarTransform) -> Int

    ScalarTransform::inverse

    fn ScalarTransform::inverse(self : ScalarTransform, value : Double) -> Double

    ScalarTransform::kind

    ScalarTransform::new

    ScalarTransform::reset

    fn ScalarTransform::reset(self : ScalarTransform) -> Unit

    ScalarTransformKind

    pub(all) enum ScalarTransformKind {
    Identity
    Clip(lower~ : Double, upper~ : Double)
    Log1p
    SignedLog
    Sqrt
    Abs
    } derive(Eq,
    Debug
    )

    Stateful feature transforms for production event pipelines.

    Transforms are kept separate from models so the same preprocessing state can be persisted, monitored, and reused by training and serving paths.

    ScoreCacheEntry

    pub struct ScoreCacheEntry {
    key : String
    values : Array[Double]
    created_at : Int64
    expires_at : Int64
    hits : Int
    }

    ScoreCacheEntry::created_at

    fn ScoreCacheEntry::created_at(self : ScoreCacheEntry) -> Int64

    ScoreCacheEntry::expired

    fn ScoreCacheEntry::expired(self : ScoreCacheEntry, now : Int64) -> Bool

    ScoreCacheEntry::expires_at

    fn ScoreCacheEntry::expires_at(self : ScoreCacheEntry) -> Int64

    ScoreCacheEntry::hits

    fn ScoreCacheEntry::hits(self : ScoreCacheEntry) -> Int

    ScoreCacheEntry::key

    fn ScoreCacheEntry::key(self : ScoreCacheEntry) -> String

    ScoreCacheEntry::new

    fn ScoreCacheEntry::new(key : String, values : Array[Double], created_at : Int64, ttl : Int64) -> ScoreCacheEntry

    ScoreCacheEntry::record_hit

    fn ScoreCacheEntry::record_hit(self : ScoreCacheEntry) -> Unit

    ScoreCacheEntry::values

    fn ScoreCacheEntry::values(self : ScoreCacheEntry) -> Array[Double]

    ScoreMemoCache

    pub struct ScoreMemoCache {
    capacity : Int
    ttl : Int64
    entries : Map[String, ScoreCacheEntry]
    order : Array[String]
    lookups : Int
    hits : Int
    misses : Int
    evictions : Int
    }

    ScoreMemoCache::clear

    fn ScoreMemoCache::clear(self : ScoreMemoCache) -> Unit

    ScoreMemoCache::evictions

    fn ScoreMemoCache::evictions(self : ScoreMemoCache) -> Int

    ScoreMemoCache::get

    fn ScoreMemoCache::get(self : ScoreMemoCache, key : String, now : Int64) -> Array[Double]?

    ScoreMemoCache::hit_rate

    fn ScoreMemoCache::hit_rate(self : ScoreMemoCache) -> Double

    ScoreMemoCache::hits

    fn ScoreMemoCache::hits(self : ScoreMemoCache) -> Int

    ScoreMemoCache::lookups

    fn ScoreMemoCache::lookups(self : ScoreMemoCache) -> Int

    ScoreMemoCache::misses

    fn ScoreMemoCache::misses(self : ScoreMemoCache) -> Int

    ScoreMemoCache::new

    fn ScoreMemoCache::new(capacity? : Int, ttl? : Int64) -> ScoreMemoCache

    ScoreMemoCache::put

    fn ScoreMemoCache::put(self : ScoreMemoCache, key : String, values : Array[Double], now : Int64) -> Bool

    ScoreMemoCache::remove

    fn ScoreMemoCache::remove(self : ScoreMemoCache, key : String) -> Bool

    ScoreMemoCache::size

    fn ScoreMemoCache::size(self : ScoreMemoCache) -> Int

    SeasonalMean

    pub struct SeasonalMean {
    sums : Array[Double]
    counts : Array[Double]
    observations : Int
    }

    Seasonal baseline using per-phase running means.

    SeasonalMean::forecast

    fn SeasonalMean::forecast(self : SeasonalMean, horizon : Int) -> Array[Double]

    SeasonalMean::mean_at

    fn SeasonalMean::mean_at(self : SeasonalMean, index : Int) -> Double

    SeasonalMean::new

    fn SeasonalMean::new(period : Int) -> SeasonalMean

    SeasonalMean::observations

    fn SeasonalMean::observations(self : SeasonalMean) -> Int

    SeasonalMean::period

    fn SeasonalMean::period(self : SeasonalMean) -> Int

    SeasonalMean::reset

    fn SeasonalMean::reset(self : SeasonalMean) -> Unit

    SeasonalMean::update

    fn SeasonalMean::update(self : SeasonalMean, value : Double) -> Double

    SeasonalNaiveBaseline

    pub struct SeasonalNaiveBaseline {
    period : Int
    history : Array[Double]
    observations : Int
    }

    SeasonalNaiveBaseline::forecast

    fn SeasonalNaiveBaseline::forecast(self : SeasonalNaiveBaseline) -> Double

    SeasonalNaiveBaseline::history

    fn SeasonalNaiveBaseline::history(self : SeasonalNaiveBaseline) -> Array[Double]

    SeasonalNaiveBaseline::new

    SeasonalNaiveBaseline::observations

    fn SeasonalNaiveBaseline::observations(self : SeasonalNaiveBaseline) -> Int

    SeasonalNaiveBaseline::period

    SeasonalNaiveBaseline::predict

    fn SeasonalNaiveBaseline::predict(self : SeasonalNaiveBaseline, horizon : Int, start_timestamp? : Int64, step? : Int64) -> Array[ForecastPoint]

    SeasonalNaiveBaseline::reset

    SeasonalNaiveBaseline::update

    fn SeasonalNaiveBaseline::update(self : SeasonalNaiveBaseline, value : Double) -> Double

    SequenceFeatureBuilder

    pub struct SequenceFeatureBuilder {
    lags : Int
    include_delta : Bool
    include_mean : Bool
    include_variance : Bool
    window : SequenceWindow
    }

    SequenceFeatureBuilder::feature_count

    fn SequenceFeatureBuilder::feature_count(self : SequenceFeatureBuilder) -> Int

    SequenceFeatureBuilder::new

    fn SequenceFeatureBuilder::new(lags : Int, include_delta? : Bool, include_mean? : Bool, include_variance? : Bool) -> SequenceFeatureBuilder

    SequenceFeatureBuilder::reset

    SequenceFeatureBuilder::transform

    fn SequenceFeatureBuilder::transform(self : SequenceFeatureBuilder, value : Double) -> Array[Double]

    SequenceWindow

    pub struct SequenceWindow {
    capacity : Int
    values : Array[Double]
    total : Double
    sum_squares : Double
    }

    Compact sequence-learning primitives for event streams and demand signals.

    SequenceWindow::capacity

    fn SequenceWindow::capacity(self : SequenceWindow) -> Int

    SequenceWindow::clear

    fn SequenceWindow::clear(self : SequenceWindow) -> Unit

    SequenceWindow::last

    fn SequenceWindow::last(self : SequenceWindow) -> Double

    SequenceWindow::mean

    fn SequenceWindow::mean(self : SequenceWindow) -> Double

    SequenceWindow::new

    fn SequenceWindow::new(capacity : Int) -> SequenceWindow

    SequenceWindow::push

    fn SequenceWindow::push(self : SequenceWindow, value : Double) -> Unit

    SequenceWindow::size

    fn SequenceWindow::size(self : SequenceWindow) -> Int

    SequenceWindow::values

    fn SequenceWindow::values(self : SequenceWindow) -> Array[Double]

    SequenceWindow::variance

    fn SequenceWindow::variance(self : SequenceWindow) -> Double

    ServingStats

    pub struct ServingStats {
    requests : Int
    successes : Int
    failures : Int
    total_latency : Double
    max_latency : Double
    bytes : Int
    }

    ServingStats::bytes

    fn ServingStats::bytes(self : ServingStats) -> Int

    ServingStats::max_latency

    fn ServingStats::max_latency(self : ServingStats) -> Double

    ServingStats::mean_latency

    fn ServingStats::mean_latency(self : ServingStats) -> Double

    ServingStats::new

    ServingStats::observe

    fn ServingStats::observe(self : ServingStats, response : PredictionResponse, payload_bytes? : Int) -> Unit

    ServingStats::requests

    fn ServingStats::requests(self : ServingStats) -> Int

    ServingStats::reset

    fn ServingStats::reset(self : ServingStats) -> Unit

    ServingStats::success_rate

    fn ServingStats::success_rate(self : ServingStats) -> Double

    SessionSummary

    pub struct SessionSummary {
    start : Int64
    end : Int64
    events : Int
    value : Double
    }

    SessionSummary::end

    fn SessionSummary::end(self : SessionSummary) -> Int64

    SessionSummary::events

    fn SessionSummary::events(self : SessionSummary) -> Int

    SessionSummary::new

    fn SessionSummary::new(start : Int64, end : Int64, events : Int, value : Double) -> SessionSummary

    SessionSummary::start

    fn SessionSummary::start(self : SessionSummary) -> Int64

    SessionSummary::value

    fn SessionSummary::value(self : SessionSummary) -> Double

    SessionWindowAggregator

    pub struct SessionWindowAggregator {
    gap : Int64
    current_start : Int64?
    current_end : Int64?
    current_events : Int
    current_value : Double
    sessions : Array[SessionSummary]
    accepted : Int
    invalid : Int
    }

    SessionWindowAggregator::accepted

    SessionWindowAggregator::close

    fn SessionWindowAggregator::close(self : SessionWindowAggregator, timestamp : Int64) -> Array[SessionSummary]

    SessionWindowAggregator::current_events

    fn SessionWindowAggregator::current_events(self : SessionWindowAggregator) -> Int

    SessionWindowAggregator::invalid

    SessionWindowAggregator::new

    SessionWindowAggregator::observe

    fn SessionWindowAggregator::observe(self : SessionWindowAggregator, timestamp : Int64, value : Double) -> Bool

    SessionWindowAggregator::reset

    SessionWindowAggregator::session_count

    fn SessionWindowAggregator::session_count(self : SessionWindowAggregator) -> Int

    ShadowEvaluator

    pub struct ShadowEvaluator {
    primary_version : String
    shadow_version : String
    comparisons : Int
    disagreements : Int
    absolute_difference : Double
    }

    ShadowEvaluator::comparisons

    fn ShadowEvaluator::comparisons(self : ShadowEvaluator) -> Int

    ShadowEvaluator::disagreement_rate

    fn ShadowEvaluator::disagreement_rate(self : ShadowEvaluator) -> Double

    ShadowEvaluator::disagreements

    fn ShadowEvaluator::disagreements(self : ShadowEvaluator) -> Int

    ShadowEvaluator::mean_absolute_difference

    fn ShadowEvaluator::mean_absolute_difference(self : ShadowEvaluator) -> Double

    ShadowEvaluator::new

    fn ShadowEvaluator::new(primary_version : String, shadow_version : String) -> ShadowEvaluator

    ShadowEvaluator::observe

    fn ShadowEvaluator::observe(self : ShadowEvaluator, primary : Double, shadow : Double, tolerance? : Double) -> Bool

    ShadowEvaluator::reset

    fn ShadowEvaluator::reset(self : ShadowEvaluator) -> Unit

    ShadowEvaluator::versions

    fn ShadowEvaluator::versions(self : ShadowEvaluator) -> (String, String)

    SlidingWindowAggregator

    pub struct SlidingWindowAggregator {
    width : Int64
    capacity : Int
    timestamps : Array[Int64]
    values : Array[Double]
    weights : Array[Double]
    accepted : Int
    evicted : Int
    invalid : Int
    }

    SlidingWindowAggregator::accepted

    SlidingWindowAggregator::capacity

    SlidingWindowAggregator::evicted

    SlidingWindowAggregator::invalid

    SlidingWindowAggregator::new

    fn SlidingWindowAggregator::new(width : Int64, capacity? : Int) -> SlidingWindowAggregator

    SlidingWindowAggregator::observe

    fn SlidingWindowAggregator::observe(self : SlidingWindowAggregator, timestamp : Int64, value : Double, weight? : Double) -> Bool

    SlidingWindowAggregator::reset

    SlidingWindowAggregator::size

    SlidingWindowAggregator::summary

    SlidingWindowAggregator::timestamps

    fn SlidingWindowAggregator::timestamps(self : SlidingWindowAggregator) -> Array[Int64]

    SnapshotCatalog

    pub struct SnapshotCatalog {
    snapshots : Map[String, SnapshotEnvelope]
    writes : Int
    }

    SnapshotCatalog::clear

    fn SnapshotCatalog::clear(self : SnapshotCatalog) -> Unit

    SnapshotCatalog::get

    fn SnapshotCatalog::get(self : SnapshotCatalog, key : String) -> SnapshotEnvelope?

    SnapshotCatalog::keys

    fn SnapshotCatalog::keys(self : SnapshotCatalog) -> Array[String]

    SnapshotCatalog::new

    SnapshotCatalog::put

    fn SnapshotCatalog::put(self : SnapshotCatalog, key : String, snapshot : SnapshotEnvelope) -> Bool

    SnapshotCatalog::size

    fn SnapshotCatalog::size(self : SnapshotCatalog) -> Int

    SnapshotCatalog::writes

    fn SnapshotCatalog::writes(self : SnapshotCatalog) -> Int

    SnapshotEnvelope

    pub struct SnapshotEnvelope {
    schema : String
    model : String
    version : String
    payload : String
    checksum : String
    } derive(ToJson,
    Debug
    ,
    FromJson
    )

    A small, versioned envelope for application-owned model snapshots.

    SnapshotEnvelope::checksum

    fn SnapshotEnvelope::checksum(self : SnapshotEnvelope) -> String

    SnapshotEnvelope::is_compatible

    fn SnapshotEnvelope::is_compatible(self : SnapshotEnvelope, schema : String, model : String) -> Bool

    SnapshotEnvelope::model

    fn SnapshotEnvelope::model(self : SnapshotEnvelope) -> String

    SnapshotEnvelope::new

    fn SnapshotEnvelope::new(schema : String, model : String, version : String, payload : String, checksum : String) -> SnapshotEnvelope

    SnapshotEnvelope::payload

    fn SnapshotEnvelope::payload(self : SnapshotEnvelope) -> String

    SnapshotEnvelope::schema

    fn SnapshotEnvelope::schema(self : SnapshotEnvelope) -> String

    SnapshotEnvelope::to_json_string

    fn SnapshotEnvelope::to_json_string(self : SnapshotEnvelope) -> String

    SnapshotEnvelope::version

    fn SnapshotEnvelope::version(self : SnapshotEnvelope) -> String

    SoftmaxBandit

    pub struct SoftmaxBandit {
    arms : Array[ArmStatistics]
    temperature : Double
    rng : DeterministicRng
    history : BanditHistory
    steps : Int
    }

    SoftmaxBandit::arm_count

    fn SoftmaxBandit::arm_count(self : SoftmaxBandit) -> Int

    SoftmaxBandit::choose

    fn SoftmaxBandit::choose(self : SoftmaxBandit) -> Int?

    SoftmaxBandit::history

    SoftmaxBandit::new

    fn SoftmaxBandit::new(arm_count : Int, temperature? : Double, seed? : UInt64, history_capacity? : Int) -> SoftmaxBandit

    SoftmaxBandit::probabilities

    fn SoftmaxBandit::probabilities(self : SoftmaxBandit) -> Array[Double]

    SoftmaxBandit::reset

    fn SoftmaxBandit::reset(self : SoftmaxBandit) -> Unit

    SoftmaxBandit::steps

    fn SoftmaxBandit::steps(self : SoftmaxBandit) -> Int

    SoftmaxBandit::update

    fn SoftmaxBandit::update(self : SoftmaxBandit, arm : Int, reward : Double) -> Bool

    SparseAccumulator

    pub struct SparseAccumulator {
    dimension : Int
    values : Map[Int, Double]
    }

    SparseAccumulator::add

    fn SparseAccumulator::add(self : SparseAccumulator, index : Int, value : Double) -> Bool

    SparseAccumulator::clear

    fn SparseAccumulator::clear(self : SparseAccumulator) -> Unit

    SparseAccumulator::dimension

    fn SparseAccumulator::dimension(self : SparseAccumulator) -> Int

    SparseAccumulator::get

    fn SparseAccumulator::get(self : SparseAccumulator, index : Int) -> Double

    SparseAccumulator::new

    fn SparseAccumulator::new(dimension : Int) -> SparseAccumulator

    SparseAccumulator::to_vector

    SparseAdagradClassifier

    pub struct SparseAdagradClassifier {
    weights : Array[Double]
    accumulator : Array[Double]
    learning_rate : Double
    epsilon : Double
    l2 : Double
    steps : Int
    }

    Sparse Adagrad logistic regression with a dense accumulator for predictable inference and sparse updates.

    SparseAdagradClassifier::new

    fn SparseAdagradClassifier::new(dimension : Int, learning_rate? : Double, epsilon? : Double, l2? : Double) -> SparseAdagradClassifier

    SparseAdagradClassifier::predict

    fn SparseAdagradClassifier::predict(self : SparseAdagradClassifier, features : SparseVector) -> Double

    SparseAdagradClassifier::reset

    SparseAdagradClassifier::steps

    SparseAdagradClassifier::update

    fn SparseAdagradClassifier::update(self : SparseAdagradClassifier, features : SparseVector, label : Double) -> Unit

    SparseAdagradClassifier::weight

    fn SparseAdagradClassifier::weight(self : SparseAdagradClassifier, index : Int) -> Double

    SparseAdagradClassifier::weights

    SparseEntry

    pub struct SparseEntry {
    index : Int
    value : Double
    } derive(ToJson,
    Debug
    ,
    FromJson
    )

    A sparse feature entry. Indices are zero-based and values equal to zero are omitted from canonical sparse vectors.

    SparseEntry::index

    fn SparseEntry::index(self : SparseEntry) -> Int

    SparseEntry::new

    fn SparseEntry::new(index : Int, value : Double) -> SparseEntry

    SparseEntry::value

    fn SparseEntry::value(self : SparseEntry) -> Double

    SparseFTRL

    pub struct SparseFTRL {
    dimension : Int
    alpha : Double
    beta : Double
    l1 : Double
    l2 : Double
    z : Array[Double]
    n : Array[Double]
    steps : Int
    }

    FTRL-Proximal for sparse vectors. Only non-zero coordinates are touched during an update, which keeps the per-event cost O(nnz).

    SparseFTRL::dimension

    fn SparseFTRL::dimension(self : SparseFTRL) -> Int

    SparseFTRL::new

    fn SparseFTRL::new(dimension : Int, alpha? : Double, beta? : Double, l1? : Double, l2? : Double) -> SparseFTRL

    SparseFTRL::non_zero_weights

    fn SparseFTRL::non_zero_weights(self : SparseFTRL, tolerance? : Double) -> SparseVector

    SparseFTRL::predict

    fn SparseFTRL::predict(self : SparseFTRL, features : SparseVector) -> Double

    SparseFTRL::reset

    fn SparseFTRL::reset(self : SparseFTRL) -> Unit

    SparseFTRL::steps

    fn SparseFTRL::steps(self : SparseFTRL) -> Int

    SparseFTRL::update

    fn SparseFTRL::update(self : SparseFTRL, features : SparseVector, label : Double) -> Unit

    SparseFTRL::weight

    fn SparseFTRL::weight(self : SparseFTRL, index : Int) -> Double

    SparseVector

    pub struct SparseVector {
    dimension : Int
    entries : Array[SparseEntry]
    } derive(ToJson,
    Debug
    ,
    FromJson
    )

    SparseVector::add

    SparseVector::contains

    fn SparseVector::contains(self : SparseVector, index : Int) -> Bool

    SparseVector::cosine

    fn SparseVector::cosine(self : SparseVector, other : SparseVector) -> Double

    SparseVector::dimension

    fn SparseVector::dimension(self : SparseVector) -> Int

    SparseVector::distance_squared

    fn SparseVector::distance_squared(self : SparseVector, other : SparseVector) -> Double

    SparseVector::dot_dense

    fn SparseVector::dot_dense(self : SparseVector, values : Array[Double]) -> Double

    SparseVector::dot_sparse

    fn SparseVector::dot_sparse(self : SparseVector, other : SparseVector) -> Double

    SparseVector::entries

    fn SparseVector::entries(self : SparseVector) -> Array[SparseEntry]

    SparseVector::from_dense

    fn SparseVector::from_dense(values : Array[Double], threshold? : Double) -> SparseVector

    SparseVector::from_entries

    fn SparseVector::from_entries(dimension : Int, entries : Array[SparseEntry]) -> SparseVector

    SparseVector::get

    fn SparseVector::get(self : SparseVector, index : Int) -> Double

    SparseVector::is_empty

    fn SparseVector::is_empty(self : SparseVector) -> Bool

    SparseVector::is_sorted

    fn SparseVector::is_sorted(self : SparseVector) -> Bool

    SparseVector::l1_norm

    fn SparseVector::l1_norm(self : SparseVector) -> Double

    SparseVector::l2_norm

    fn SparseVector::l2_norm(self : SparseVector) -> Double

    SparseVector::map

    fn SparseVector::map(self : SparseVector, transform : (Double) -> Double) -> SparseVector

    SparseVector::max_abs

    fn SparseVector::max_abs(self : SparseVector) -> Double

    SparseVector::new

    fn SparseVector::new(dimension : Int) -> SparseVector

    SparseVector::nnz

    fn SparseVector::nnz(self : SparseVector) -> Int

    SparseVector::normalize

    fn SparseVector::normalize(self : SparseVector) -> SparseVector

    SparseVector::scale

    fn SparseVector::scale(self : SparseVector, factor : Double) -> SparseVector

    SparseVector::set

    fn SparseVector::set(self : SparseVector, index : Int, value : Double) -> SparseVector

    SparseVector::subtract

    fn SparseVector::subtract(self : SparseVector, other : SparseVector) -> SparseVector

    SparseVector::threshold

    fn SparseVector::threshold(self : SparseVector, limit : Double) -> SparseVector

    SparseVector::to_dense

    fn SparseVector::to_dense(self : SparseVector) -> Array[Double]

    StabilityTracker

    pub struct StabilityTracker {
    previous : Array[Double]
    observations : Int
    drift : Double
    }

    StabilityTracker::mean_drift

    fn StabilityTracker::mean_drift(self : StabilityTracker) -> Double

    StabilityTracker::new

    fn StabilityTracker::new(dimension : Int) -> StabilityTracker

    StabilityTracker::observations

    fn StabilityTracker::observations(self : StabilityTracker) -> Int

    StabilityTracker::observe

    fn StabilityTracker::observe(self : StabilityTracker, values : Array[Double]) -> Double

    StabilityTracker::reset

    fn StabilityTracker::reset(self : StabilityTracker) -> Unit

    Standardizer

    pub struct Standardizer {
    count : Double
    mean : Array[Double]
    m2 : Array[Double]
    } derive(ToJson,
    FromJson
    )

    A standardizer that tracks running mean and variance to standardize features incrementally using Welford's online algorithm.

    Standardizer::count

    fn Standardizer::count(self : Standardizer) -> Double

    Standardizer::mean

    fn Standardizer::mean(self : Standardizer) -> Array[Double]

    Return a copy of the current running means.

    Standardizer::new

    fn Standardizer::new(dim : Int) -> Standardizer

    Create a new feature standardizer for dim features.

    Standardizer::reset

    fn Standardizer::reset(self : Standardizer) -> Unit

    Standardizer::update_and_transform

    fn Standardizer::update_and_transform(self : Standardizer, features : Array[Double]) -> Array[Double]

    Update the standardizer with a new feature vector, returning the standardized features.

    Standardizer::variance

    fn Standardizer::variance(self : Standardizer) -> Array[Double]

    Return the unbiased running variance for every feature.

    StratifiedSampler

    pub struct StratifiedSampler {
    capacity_per_class : Int
    samples : Map[Int, Array[Array[Double]]]
    seen : Int
    rng : DeterministicRng
    }

    StratifiedSampler::class_count

    fn StratifiedSampler::class_count(self : StratifiedSampler, label : Int) -> Int

    StratifiedSampler::classes

    fn StratifiedSampler::classes(self : StratifiedSampler) -> Array[Int]

    StratifiedSampler::new

    fn StratifiedSampler::new(capacity_per_class : Int, seed? : UInt64) -> StratifiedSampler

    StratifiedSampler::observe

    fn StratifiedSampler::observe(self : StratifiedSampler, label : Int, features : Array[Double]) -> Bool

    StratifiedSampler::reset

    fn StratifiedSampler::reset(self : StratifiedSampler) -> Unit

    StratifiedSampler::samples

    fn StratifiedSampler::samples(self : StratifiedSampler, label : Int) -> Array[Array[Double]]

    StratifiedSampler::seen

    fn StratifiedSampler::seen(self : StratifiedSampler) -> Int

    StreamCounters

    pub struct StreamCounters {
    rows : Int
    accepted : Int
    rejected : Int
    positive : Int
    negative : Int
    }

    StreamCounters::acceptance_rate

    fn StreamCounters::acceptance_rate(self : StreamCounters) -> Double

    StreamCounters::accepted

    fn StreamCounters::accepted(self : StreamCounters) -> Int

    StreamCounters::new

    StreamCounters::observe

    fn StreamCounters::observe(self : StreamCounters, accepted : Bool, label? : Double) -> Unit

    StreamCounters::rejected

    fn StreamCounters::rejected(self : StreamCounters) -> Int

    StreamCounters::rows

    fn StreamCounters::rows(self : StreamCounters) -> Int

    StreamWatermark

    pub struct StreamWatermark {
    current : Int64
    allowed_lateness : Int64
    late_events : Int
    }

    StreamWatermark::current

    fn StreamWatermark::current(self : StreamWatermark) -> Int64

    StreamWatermark::late_events

    fn StreamWatermark::late_events(self : StreamWatermark) -> Int

    StreamWatermark::new

    fn StreamWatermark::new(allowed_lateness : Int64) -> StreamWatermark

    StreamWatermark::observe

    fn StreamWatermark::observe(self : StreamWatermark, timestamp : Int64) -> Bool

    StreamWatermark::reset

    fn StreamWatermark::reset(self : StreamWatermark) -> Unit

    StreamingDecisionStump

    pub struct StreamingDecisionStump {
    feature : Int
    threshold : Double
    left : StumpStatistics
    right : StumpStatistics
    updates : Int
    mistakes : Int
    }

    StreamingDecisionStump::accuracy

    fn StreamingDecisionStump::accuracy(self : StreamingDecisionStump) -> Double

    StreamingDecisionStump::branch

    fn StreamingDecisionStump::branch(self : StreamingDecisionStump, features : Array[Double]) -> Bool

    StreamingDecisionStump::feature

    StreamingDecisionStump::left

    StreamingDecisionStump::mistakes

    StreamingDecisionStump::new

    fn StreamingDecisionStump::new(feature : Int, threshold : Double) -> StreamingDecisionStump

    StreamingDecisionStump::predict

    fn StreamingDecisionStump::predict(self : StreamingDecisionStump, features : Array[Double]) -> Double

    StreamingDecisionStump::predict_probability

    fn StreamingDecisionStump::predict_probability(self : StreamingDecisionStump, features : Array[Double]) -> Double

    StreamingDecisionStump::reset

    StreamingDecisionStump::right

    StreamingDecisionStump::threshold

    fn StreamingDecisionStump::threshold(self : StreamingDecisionStump) -> Double

    StreamingDecisionStump::update

    fn StreamingDecisionStump::update(self : StreamingDecisionStump, features : Array[Double], label : Double, weight? : Double) -> Bool

    StreamingDecisionStump::updates

    StreamingStumpEnsemble

    pub struct StreamingStumpEnsemble {
    stumps : Array[StreamingDecisionStump]
    observations : Int
    total_loss : Double
    }

    StreamingStumpEnsemble::dispersion

    fn StreamingStumpEnsemble::dispersion(self : StreamingStumpEnsemble, features : Array[Double]) -> Double

    StreamingStumpEnsemble::mse

    StreamingStumpEnsemble::new

    fn StreamingStumpEnsemble::new(features : Array[(Int, Double)]) -> StreamingStumpEnsemble

    StreamingStumpEnsemble::observations

    fn StreamingStumpEnsemble::observations(self : StreamingStumpEnsemble) -> Int

    StreamingStumpEnsemble::predict

    fn StreamingStumpEnsemble::predict(self : StreamingStumpEnsemble, features : Array[Double]) -> Double

    StreamingStumpEnsemble::predict_probability

    fn StreamingStumpEnsemble::predict_probability(self : StreamingStumpEnsemble, features : Array[Double]) -> Double

    StreamingStumpEnsemble::reset

    StreamingStumpEnsemble::stump_count

    fn StreamingStumpEnsemble::stump_count(self : StreamingStumpEnsemble) -> Int

    StreamingStumpEnsemble::stumps

    StreamingStumpEnsemble::update

    fn StreamingStumpEnsemble::update(self : StreamingStumpEnsemble, features : Array[Double], label : Double) -> Double

    StumpStatistics

    pub struct StumpStatistics {
    count : Double
    sum : Double
    square_sum : Double
    positive : Double
    }

    StumpStatistics::count

    fn StumpStatistics::count(self : StumpStatistics) -> Double

    StumpStatistics::mean

    fn StumpStatistics::mean(self : StumpStatistics) -> Double

    StumpStatistics::new

    StumpStatistics::observe

    fn StumpStatistics::observe(self : StumpStatistics, label : Double, positive : Bool, weight : Double) -> Unit

    StumpStatistics::positive_rate

    fn StumpStatistics::positive_rate(self : StumpStatistics) -> Double

    StumpStatistics::reset

    fn StumpStatistics::reset(self : StumpStatistics) -> Unit

    StumpStatistics::variance

    fn StumpStatistics::variance(self : StumpStatistics) -> Double

    TargetEncoder

    pub struct TargetEncoder {
    sums : Map[String, Double]
    counts : Map[String, Double]
    prior : RunningMean
    smoothing : Double
    }

    TargetEncoder::encode

    fn TargetEncoder::encode(self : TargetEncoder, category : String) -> Double

    TargetEncoder::known_categories

    fn TargetEncoder::known_categories(self : TargetEncoder) -> Int

    TargetEncoder::new

    fn TargetEncoder::new(smoothing? : Double) -> TargetEncoder

    TargetEncoder::reset

    fn TargetEncoder::reset(self : TargetEncoder) -> Unit

    TargetEncoder::update

    fn TargetEncoder::update(self : TargetEncoder, category : String, target : Double, weight? : Double) -> Unit

    TextStatistics

    pub struct TextStatistics {
    documents : Int
    tokens : Int
    vocabulary : Map[String, Int]
    }

    TextStatistics::documents

    fn TextStatistics::documents(self : TextStatistics) -> Int

    TextStatistics::frequency

    fn TextStatistics::frequency(self : TextStatistics, word : String) -> Int

    TextStatistics::new

    TextStatistics::observe

    fn TextStatistics::observe(self : TextStatistics, words : Array[String]) -> Unit

    TextStatistics::reset

    fn TextStatistics::reset(self : TextStatistics) -> Unit

    TextStatistics::tokens

    fn TextStatistics::tokens(self : TextStatistics) -> Int

    TextStatistics::top_words

    fn TextStatistics::top_words(self : TextStatistics, k : Int) -> Array[String]

    TextStatistics::vocabulary_size

    fn TextStatistics::vocabulary_size(self : TextStatistics) -> Int

    TextVocabulary

    pub struct TextVocabulary {
    counts : Map[String, Int]
    maximum : Int
    documents : Int
    unknowns : Int
    }

    TextVocabulary::documents

    fn TextVocabulary::documents(self : TextVocabulary) -> Int

    TextVocabulary::index

    fn TextVocabulary::index(self : TextVocabulary, token : String) -> Int?

    TextVocabulary::new

    fn TextVocabulary::new(maximum? : Int) -> TextVocabulary

    TextVocabulary::observe

    fn TextVocabulary::observe(self : TextVocabulary, tokens : Array[String]) -> Unit

    TextVocabulary::reset

    fn TextVocabulary::reset(self : TextVocabulary) -> Unit

    TextVocabulary::size

    fn TextVocabulary::size(self : TextVocabulary) -> Int

    TextVocabulary::tokens

    fn TextVocabulary::tokens(self : TextVocabulary) -> Array[String]

    TextVocabulary::unknowns

    fn TextVocabulary::unknowns(self : TextVocabulary) -> Int

    ThresholdOptimizer

    pub struct ThresholdOptimizer {
    costs : ClassCost
    minimum : Double
    maximum : Double
    steps : Int
    best_threshold : Double
    best_cost : Double
    }

    ThresholdOptimizer::cost

    fn ThresholdOptimizer::cost(self : ThresholdOptimizer) -> Double

    ThresholdOptimizer::fit

    fn ThresholdOptimizer::fit(self : ThresholdOptimizer, predictions : Array[Double], labels : Array[Double]) -> Double

    ThresholdOptimizer::new

    fn ThresholdOptimizer::new(costs? : ClassCost, minimum? : Double, maximum? : Double, steps? : Int) -> ThresholdOptimizer

    ThresholdOptimizer::reset

    fn ThresholdOptimizer::reset(self : ThresholdOptimizer) -> Unit

    ThresholdOptimizer::threshold

    fn ThresholdOptimizer::threshold(self : ThresholdOptimizer) -> Double

    ThroughputTracker

    pub struct ThroughputTracker {
    capacity : Int
    events : SequenceWindow
    accepted : Int
    dropped : Int
    }

    ThroughputTracker::accepted

    fn ThroughputTracker::accepted(self : ThroughputTracker) -> Int

    ThroughputTracker::dropped

    fn ThroughputTracker::dropped(self : ThroughputTracker) -> Int

    ThroughputTracker::new

    fn ThroughputTracker::new(capacity? : Int) -> ThroughputTracker

    ThroughputTracker::observe

    fn ThroughputTracker::observe(self : ThroughputTracker, timestamp : Int64) -> Bool

    ThroughputTracker::rate

    fn ThroughputTracker::rate(self : ThroughputTracker, duration : Double) -> Double

    TimeFeatureEncoder

    pub struct TimeFeatureEncoder {
    period : Int64
    include_sine : Bool
    include_cosine : Bool
    include_elapsed : Bool
    origin : Int64?
    }

    TimeFeatureEncoder::feature_count

    fn TimeFeatureEncoder::feature_count(self : TimeFeatureEncoder) -> Int

    TimeFeatureEncoder::new

    fn TimeFeatureEncoder::new(period : Int64, include_sine? : Bool, include_cosine? : Bool, include_elapsed? : Bool) -> TimeFeatureEncoder

    TimeFeatureEncoder::period

    fn TimeFeatureEncoder::period(self : TimeFeatureEncoder) -> Int64

    TimeFeatureEncoder::reset

    fn TimeFeatureEncoder::reset(self : TimeFeatureEncoder) -> Unit

    TimeFeatureEncoder::transform

    fn TimeFeatureEncoder::transform(self : TimeFeatureEncoder, timestamp : Int64) -> Array[Double]

    TimeWindowAggregate

    pub struct TimeWindowAggregate {
    start : Int64
    end : Int64
    events : Int
    positives : Double
    weight : Double
    loss : RegressionMetrics
    }

    TimeWindowAggregate::contains

    fn TimeWindowAggregate::contains(self : TimeWindowAggregate, timestamp : Int64) -> Bool

    TimeWindowAggregate::events

    fn TimeWindowAggregate::events(self : TimeWindowAggregate) -> Int

    TimeWindowAggregate::mae

    fn TimeWindowAggregate::mae(self : TimeWindowAggregate) -> Double

    TimeWindowAggregate::new

    fn TimeWindowAggregate::new(start : Int64, end : Int64) -> TimeWindowAggregate

    TimeWindowAggregate::observe

    fn TimeWindowAggregate::observe(self : TimeWindowAggregate, event : TrainingEvent, prediction : Double) -> Bool

    TimeWindowAggregate::rmse

    fn TimeWindowAggregate::rmse(self : TimeWindowAggregate) -> Double

    TimeWindowAggregate::weighted_positive_rate

    fn TimeWindowAggregate::weighted_positive_rate(self : TimeWindowAggregate) -> Double

    TopKMetrics

    pub struct TopKMetrics {
    total : Double
    hits : Array[Double]
    }

    TopKMetrics::accuracy

    fn TopKMetrics::accuracy(self : TopKMetrics, k : Int) -> Double

    TopKMetrics::new

    fn TopKMetrics::new(max_k? : Int) -> TopKMetrics

    TopKMetrics::reset

    fn TopKMetrics::reset(self : TopKMetrics) -> Unit

    TopKMetrics::total

    fn TopKMetrics::total(self : TopKMetrics) -> Double

    TopKMetrics::update

    fn TopKMetrics::update(self : TopKMetrics, ranked : Array[Int], label : Int) -> Unit

    TrafficSplitter

    pub struct TrafficSplitter {
    buckets : Map[String, Double]
    default_version : String
    assigned : Int
    }

    TrafficSplitter::assigned

    fn TrafficSplitter::assigned(self : TrafficSplitter) -> Int

    TrafficSplitter::new

    fn TrafficSplitter::new(default_version : String) -> TrafficSplitter

    TrafficSplitter::reset

    fn TrafficSplitter::reset(self : TrafficSplitter) -> Unit

    TrafficSplitter::route

    fn TrafficSplitter::route(self : TrafficSplitter, hash : Int) -> String

    TrafficSplitter::set

    fn TrafficSplitter::set(self : TrafficSplitter, version : String, share : Double) -> Unit

    TrafficSplitter::share

    fn TrafficSplitter::share(self : TrafficSplitter, version : String) -> Double

    TrainingEvent

    pub struct TrainingEvent {
    id : String
    timestamp : Int64
    features : Array[Double]
    label : Double
    weight : Double
    } derive(ToJson,
    Debug
    ,
    FromJson
    )

    Immutable training event that can be replayed for deterministic validation.

    TrainingEvent::features

    fn TrainingEvent::features(self : TrainingEvent) -> Array[Double]

    TrainingEvent::id

    fn TrainingEvent::id(self : TrainingEvent) -> String

    TrainingEvent::label

    fn TrainingEvent::label(self : TrainingEvent) -> Double

    TrainingEvent::new

    fn TrainingEvent::new(id : String, timestamp : Int64, features : Array[Double], label : Double, weight? : Double) -> TrainingEvent

    TrainingEvent::timestamp

    fn TrainingEvent::timestamp(self : TrainingEvent) -> Int64

    TrainingEvent::weight

    fn TrainingEvent::weight(self : TrainingEvent) -> Double

    TrainingReport

    pub struct TrainingReport {
    samples : Int
    accepted : Int
    rejected : Int
    total_loss : Double
    final_loss : Double
    elapsed_steps : Int
    } derive(ToJson,
    Debug
    ,
    FromJson
    )

    TrainingReport::accepted

    fn TrainingReport::accepted(self : TrainingReport) -> Int

    TrainingReport::final_loss

    fn TrainingReport::final_loss(self : TrainingReport) -> Double

    TrainingReport::mean_loss

    fn TrainingReport::mean_loss(self : TrainingReport) -> Double

    TrainingReport::new

    TrainingReport::record

    fn TrainingReport::record(self : TrainingReport, accepted : Bool, loss : Double) -> Unit

    TrainingReport::rejected

    fn TrainingReport::rejected(self : TrainingReport) -> Int

    TrainingReport::reset

    fn TrainingReport::reset(self : TrainingReport) -> Unit

    TrainingReport::samples

    fn TrainingReport::samples(self : TrainingReport) -> Int

    TumblingWindowAggregator

    pub struct TumblingWindowAggregator {
    width : Int64
    allowed_lateness : Int64
    windows : Map[Int64, AggregateSummary]
    watermark : Int64
    accepted : Int
    late : Int
    invalid : Int
    }

    TumblingWindowAggregator::accepted

    TumblingWindowAggregator::advance_watermark

    fn TumblingWindowAggregator::advance_watermark(self : TumblingWindowAggregator, watermark : Int64) -> Bool

    TumblingWindowAggregator::close_before

    fn TumblingWindowAggregator::close_before(self : TumblingWindowAggregator, timestamp : Int64) -> Array[AggregateSummary]

    TumblingWindowAggregator::invalid

    TumblingWindowAggregator::late

    TumblingWindowAggregator::new

    fn TumblingWindowAggregator::new(width : Int64, allowed_lateness? : Int64) -> TumblingWindowAggregator

    TumblingWindowAggregator::observe

    fn TumblingWindowAggregator::observe(self : TumblingWindowAggregator, timestamp : Int64, value : Double, weight? : Double) -> Bool

    TumblingWindowAggregator::ready_windows

    TumblingWindowAggregator::reset

    TumblingWindowAggregator::watermark

    fn TumblingWindowAggregator::watermark(self : TumblingWindowAggregator) -> Int64

    TumblingWindowAggregator::window

    TumblingWindowAggregator::window_count

    fn TumblingWindowAggregator::window_count(self : TumblingWindowAggregator) -> Int

    UcbBandit

    pub struct UcbBandit {
    arms : Array[ArmStatistics]
    exploration : Double
    history : BanditHistory
    steps : Int
    }

    UcbBandit::arm_count

    fn UcbBandit::arm_count(self : UcbBandit) -> Int

    UcbBandit::choose

    fn UcbBandit::choose(self : UcbBandit) -> Int?

    UcbBandit::history

    fn UcbBandit::history(self : UcbBandit) -> BanditHistory

    UcbBandit::new

    fn UcbBandit::new(arm_count : Int, exploration? : Double, history_capacity? : Int) -> UcbBandit

    UcbBandit::reset

    fn UcbBandit::reset(self : UcbBandit) -> Unit

    UcbBandit::statistics

    fn UcbBandit::statistics(self : UcbBandit, arm : Int) -> ArmStatistics?

    UcbBandit::steps

    fn UcbBandit::steps(self : UcbBandit) -> Int

    UcbBandit::update

    fn UcbBandit::update(self : UcbBandit, arm : Int, reward : Double) -> Bool

    UcbBandit::upper_bound

    fn UcbBandit::upper_bound(self : UcbBandit, arm : Int) -> Double

    UserItemRecommender

    pub struct UserItemRecommender {
    preferences : Map[String, Map[String, Double]]
    popularity : Map[String, Double]
    interactions : Int
    }

    A compact user-item preference store with popularity and cold-start fallbacks. Scores are weighted by the caller, so clicks, purchases, and negative feedback can share one serving interface.

    UserItemRecommender::interactions

    fn UserItemRecommender::interactions(self : UserItemRecommender) -> Int

    UserItemRecommender::items

    fn UserItemRecommender::items(self : UserItemRecommender) -> Array[String]

    UserItemRecommender::new

    UserItemRecommender::observe

    fn UserItemRecommender::observe(self : UserItemRecommender, user : String, item : String, value? : Double) -> Bool

    UserItemRecommender::recommend

    fn UserItemRecommender::recommend(self : UserItemRecommender, user : String, limit? : Int) -> Array[GraphNeighbor]

    UserItemRecommender::reset

    fn UserItemRecommender::reset(self : UserItemRecommender) -> Unit

    UserItemRecommender::score

    fn UserItemRecommender::score(self : UserItemRecommender, user : String, item : String) -> Double

    UserItemRecommender::users

    fn UserItemRecommender::users(self : UserItemRecommender) -> Array[String]

    ValidationReport

    pub struct ValidationReport {
    valid : Bool
    message : String
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    ValidationReport::error

    fn ValidationReport::error(message : String) -> ValidationReport

    ValidationReport::is_valid

    fn ValidationReport::is_valid(self : ValidationReport) -> Bool

    ValidationReport::message

    fn ValidationReport::message(self : ValidationReport) -> String

    ValidationReport::ok

    VectorMoments

    pub struct VectorMoments {
    moments : Array[RunningMoments]
    }

    Per-feature running statistics for dense streams.

    VectorMoments::dimension

    fn VectorMoments::dimension(self : VectorMoments) -> Int

    VectorMoments::mean

    fn VectorMoments::mean(self : VectorMoments) -> Array[Double]

    VectorMoments::moment

    fn VectorMoments::moment(self : VectorMoments, index : Int) -> RunningMoments?

    VectorMoments::new

    fn VectorMoments::new(dimension : Int) -> VectorMoments

    VectorMoments::reset

    fn VectorMoments::reset(self : VectorMoments) -> Unit

    VectorMoments::standardize

    fn VectorMoments::standardize(self : VectorMoments, values : Array[Double]) -> Array[Double]

    VectorMoments::update

    fn VectorMoments::update(self : VectorMoments, values : Array[Double], weight? : Double) -> Unit

    VectorMoments::variance

    fn VectorMoments::variance(self : VectorMoments) -> Array[Double]

    VectorTransformPipeline

    pub struct VectorTransformPipeline {
    transforms : Array[ScalarTransform]
    expected_dimension : Int
    rows : Int
    rejected : Int
    }

    VectorTransformPipeline::add

    VectorTransformPipeline::dimension

    VectorTransformPipeline::inverse

    fn VectorTransformPipeline::inverse(self : VectorTransformPipeline, values : Array[Double]) -> Array[Double]

    VectorTransformPipeline::new

    fn VectorTransformPipeline::new(expected_dimension : Int) -> VectorTransformPipeline

    VectorTransformPipeline::rejected

    VectorTransformPipeline::reset

    VectorTransformPipeline::rows

    VectorTransformPipeline::transform

    fn VectorTransformPipeline::transform(self : VectorTransformPipeline, values : Array[Double]) -> Array[Double]

    VectorTransformPipeline::transform_count

    fn VectorTransformPipeline::transform_count(self : VectorTransformPipeline) -> Int

    WeightedHistogram

    pub struct WeightedHistogram {
    lower : Double
    upper : Double
    bins : Array[Double]
    total : Double
    }

    WeightedHistogram::counts

    fn WeightedHistogram::counts(self : WeightedHistogram) -> Array[Double]

    WeightedHistogram::new

    fn WeightedHistogram::new(lower? : Double, upper? : Double, bins? : Int) -> WeightedHistogram

    WeightedHistogram::observe

    fn WeightedHistogram::observe(self : WeightedHistogram, value : Double, weight? : Double) -> Unit

    WeightedHistogram::probabilities

    fn WeightedHistogram::probabilities(self : WeightedHistogram) -> Array[Double]

    WeightedHistogram::quantile

    fn WeightedHistogram::quantile(self : WeightedHistogram, probability : Double) -> Double

    WeightedHistogram::reset

    fn WeightedHistogram::reset(self : WeightedHistogram) -> Unit

    WeightedHistogram::total

    fn WeightedHistogram::total(self : WeightedHistogram) -> Double

    WeightedProbabilityEnsemble

    pub struct WeightedProbabilityEnsemble {
    weights : Array[Double]
    observations : Int
    }

    Weighted probability ensemble with online expert reweighting.

    WeightedProbabilityEnsemble::experts

    WeightedProbabilityEnsemble::new

    WeightedProbabilityEnsemble::normalized_weights

    fn WeightedProbabilityEnsemble::normalized_weights(self : WeightedProbabilityEnsemble) -> Array[Double]

    WeightedProbabilityEnsemble::observations

    WeightedProbabilityEnsemble::predict

    fn WeightedProbabilityEnsemble::predict(self : WeightedProbabilityEnsemble, predictions : Array[Double]) -> Double

    WeightedProbabilityEnsemble::reset

    WeightedProbabilityEnsemble::update

    fn WeightedProbabilityEnsemble::update(self : WeightedProbabilityEnsemble, predictions : Array[Double], label : Double, learning_rate? : Double) -> Unit

    WeightedProbabilityEnsemble::weights

    WindowKind

    pub(all) enum WindowKind {
    Tumbling
    Sliding
    Session
    } derive(Eq,
    Debug
    )

    Time-aware aggregations for event streams.

    These structures make time semantics explicit: callers choose a window width, late-event policy, and watermark rather than relying on wall-clock state hidden inside a model. All aggregators expose bounded counters that are suitable for service health dashboards.

    absolute_error

    fn absolute_error(prediction : Double, label : Double) -> Double

    add_scaled_in_place

    fn add_scaled_in_place(target : Array[Double], source : Array[Double], scale : Double) -> Unit

    add_values

    fn add_values(left : Array[Double], right : Array[Double]) -> Array[Double]

    alert_condition_catalog

    fn alert_condition_catalog() -> Array[AlertCondition]

    alert_severity_catalog

    fn alert_severity_catalog() -> Array[AlertSeverity]

    all_close

    fn all_close(left : Array[Double], right : Array[Double], tolerance? : Double) -> Bool

    append_interactions

    fn append_interactions(values : Array[Double], include_diagonal? : Bool) -> Array[Double]

    apply_scalar_transform

    fn apply_scalar_transform(kind : ScalarTransformKind, value : Double) -> Double

    argmax

    fn argmax(values : Array[Double]) -> Int?

    attribution_sum

    fn attribution_sum(attributions : Array[FeatureAttribution]) -> Double

    audit_action_catalog

    fn audit_action_catalog() -> Array[AuditAction]

    bandit_action_catalog

    fn bandit_action_catalog() -> Array[BanditAction]

    binary_cross_entropy

    fn binary_cross_entropy(probability : Double, label : Double) -> Double

    clamp

    fn clamp(value : Double, lower : Double, upper : Double) -> Double

    clamp_probability

    fn clamp_probability(value : Double) -> Double

    copy_vector

    fn copy_vector(values : Array[Double]) -> Array[Double]

    cosine_similarity

    fn cosine_similarity(left : Array[Double], right : Array[Double]) -> Double

    cost_matrix

    fn cost_matrix(costs : ClassCost) -> Array[Array[Double]]

    cost_sensitive_decision

    fn cost_sensitive_decision(probability : Double, costs : ClassCost) -> Bool

    cross_feature

    fn cross_feature(left : String, right : String, separator? : String) -> String

    csv_escape

    fn csv_escape(field : String, options? : CsvOptions) -> String

    csv_write_row

    fn csv_write_row(fields : Array[String], options? : CsvOptions) -> String

    cumulative_sum

    fn cumulative_sum(values : Array[Double]) -> Array[Double]

    deployment_state_catalog

    fn deployment_state_catalog() -> Array[DeploymentState]

    dot_product

    fn dot_product(left : Array[Double], right : Array[Double]) -> Double

    dot_product_checked

    fn dot_product_checked(left : Array[Double], right : Array[Double]) -> Double?

    evaluate_binary

    fn evaluate_binary(model : AdagradLogisticRegression, batch : DataBatch) -> OnlineEvaluationSession

    evaluate_regression

    fn evaluate_regression(model : OnlineRidgeRegression, batch : DataBatch) -> OnlineEvaluationSession

    expected_binary_cost

    fn expected_binary_cost(probability : Double, positive_cost : Double, negative_cost : Double) -> Double

    explain_linear

    fn explain_linear(weights : Array[Double], features : Array[Double], top_k? : Int) -> Array[FeatureAttribution]

    explain_sparse

    fn explain_sparse(weights : SparseVector, features : SparseVector, top_k? : Int) -> Array[FeatureAttribution]

    generate_feature_crosses

    fn generate_feature_crosses(features : Array[String], order? : Int) -> Array[String]

    hadamard_product

    fn hadamard_product(left : Array[Double], right : Array[Double]) -> Array[Double]

    hash_feature

    fn hash_feature(name : String, buckets : Int) -> Int

    hash_feature_with_sign

    fn hash_feature_with_sign(name : String, buckets : Int) -> SparseEntry

    hinge_loss

    fn hinge_loss(score : Double, label : Double) -> Double

    invert_scalar_transform

    fn invert_scalar_transform(kind : ScalarTransformKind, value : Double) -> Double

    is_non_decreasing

    fn is_non_decreasing(values : Array[Double]) -> Bool

    l1_norm

    fn l1_norm(values : Array[Double]) -> Double

    logit

    fn logit(probability : Double) -> Double

    logits_to_probability

    fn logits_to_probability(logit : Double) -> Double

    loss_gradient

    fn loss_gradient(kind : LossKind, prediction : Double, label : Double, parameter? : Double) -> Double

    loss_gradient_vector

    fn loss_gradient_vector(kind : LossKind, predictions : Array[Double], labels : Array[Double]) -> Array[Double]

    loss_kind_catalog

    fn loss_kind_catalog() -> Array[LossKind]

    loss_value

    fn loss_value(kind : LossKind, prediction : Double, label : Double, parameter? : Double) -> Double

    make_fold

    fn make_fold(batch : DataBatch, folds : Int, index : Int) -> CrossValidationFold

    make_snapshot

    fn make_snapshot(model : String, version : String, payload : String) -> SnapshotEnvelope

    matrix_row_sums

    fn matrix_row_sums(matrix : Matrix) -> Array[Double]

    max_abs

    fn max_abs(values : Array[Double]) -> Double

    mean_values

    fn mean_values(values : Array[Double]) -> Double

    moving_average

    fn moving_average(previous : Double, value : Double, smoothing : Double) -> Double

    normalize_l2

    fn normalize_l2(values : Array[Double]) -> Array[Double]

    one_hot

    fn one_hot(index : Int, size : Int) -> Array[Double]

    outer_product

    fn outer_product(left : Array[Double], right : Array[Double]) -> Matrix

    pairwise_interactions

    fn pairwise_interactions(values : Array[Double], include_diagonal? : Bool) -> Array[Double]

    polynomial_features

    fn polynomial_features(values : Array[Double], degree : Int) -> Array[Double]

    Stateless numeric feature engineering helpers.

    probabilities_from_logits

    fn probabilities_from_logits(logits : Array[Double]) -> Array[Double]

    probability_to_logit

    fn probability_to_logit(probability : Double) -> Double

    r2_score

    fn r2_score(predictions : Array[Double], labels : Array[Double]) -> Double

    rank_one_update

    fn rank_one_update(matrix : Matrix, vector : Array[Double], scale : Double) -> Unit

    safe_threshold

    fn safe_threshold(threshold : Double) -> Double

    sample_indices

    fn sample_indices(size : Int, seed? : UInt64) -> Array[Int]

    scalar_transform_catalog

    fn scalar_transform_catalog() -> Array[ScalarTransformKind]

    scale_values

    fn scale_values(values : Array[Double], scale : Double) -> Array[Double]

    sigmoid

    fn sigmoid(value : Double) -> Double

    smooth_l1_loss

    fn smooth_l1_loss(error : Double, beta? : Double) -> Double

    snapshot_checksum

    fn snapshot_checksum(payload : String) -> String

    softplus

    fn softplus(value : Double) -> Double

    split_indices

    fn split_indices(size : Int, train_ratio? : Double, seed? : UInt64) -> (Array[Int], Array[Int])

    squared_error

    fn squared_error(prediction : Double, label : Double) -> Double

    squared_norm

    fn squared_norm(values : Array[Double]) -> Double

    standard_deviation

    fn standard_deviation(values : Array[Double]) -> Double

    subtract_scaled_in_place

    fn subtract_scaled_in_place(target : Array[Double], source : Array[Double], scale : Double) -> Unit

    subtract_values

    fn subtract_values(left : Array[Double], right : Array[Double]) -> Array[Double]

    sum_values

    fn sum_values(values : Array[Double]) -> Double

    threshold_is_valid

    fn threshold_is_valid(threshold : Double) -> Bool

    top_index

    fn top_index(values : Array[Double], rank : Int) -> Int?

    train_adagrad

    fn train_adagrad(model : AdagradLogisticRegression, batch : DataBatch, report : TrainingReport) -> TrainingReport

    Train a dense Adagrad classifier over a batch and return an auditable report. The function keeps the event loop explicit for easy replay.

    train_ridge

    fn train_ridge(model : OnlineRidgeRegression, batch : DataBatch, report : TrainingReport) -> TrainingReport

    valid_dimension

    fn valid_dimension(dim : Int) -> Bool

    validate_dimension

    fn validate_dimension(dim : Int) -> ValidationReport

    validate_label

    fn validate_label(value : Double) -> ValidationReport

    validate_probability

    fn validate_probability(value : Double) -> ValidationReport

    validate_vector

    fn validate_vector(features : Array[Double], dim : Int) -> ValidationReport

    variance_values

    fn variance_values(values : Array[Double]) -> Double

    verify_snapshot

    fn verify_snapshot(envelope : SnapshotEnvelope) -> Bool

    weighted_loss

    fn weighted_loss(kind : LossKind, predictions : Array[Double], labels : Array[Double], weights? : Array[Double]) -> Double

    weighted_mean

    fn weighted_mean(values : Array[Double], weights : Array[Double]) -> Double

    weighted_variance

    fn weighted_variance(values : Array[Double], weights : Array[Double]) -> Double

    window_kind_catalog

    fn window_kind_catalog() -> Array[WindowKind]