Skip to main content

Crate irithyll_core

Crate irithyll_core 

Source
Expand description

Core types and inference engine for irithyll streaming ML models.

irithyll-core provides loss functions, observation traits, a compact binary format, and branch-free traversal for deploying trained SGBT models on embedded targets (Cortex-M0+, 32KB flash).

§Features

  • Loss functions — squared, logistic, Huber, softmax, expectile, quantile
  • Observation trait — zero-copy training interface with SampleRef
  • 12-byte packed nodes — 5 nodes per 64-byte cache line
  • Zero-copy EnsembleView — constructed from &[u8], no allocation after validation
  • Branch-free traversalcmov/csel child selection, no pipeline stalls
  • #![no_std] — zero mandatory dependencies, runs on bare metal

§Usage

use irithyll_core::{EnsembleView, FormatError};

// Load packed binary (e.g. from flash, file, or network)
let packed_bytes: &[u8] = &[/* exported via irithyll::export_embedded() */];
let view = EnsembleView::from_bytes(packed_bytes)?;
let prediction = view.predict(&[1.0f32, 2.0, 3.0]);

Re-exports§

pub use error::FormatError;
pub use packed::EnsembleHeader;
pub use packed::PackedNode;
pub use packed::TreeEntry;
pub use packed_i16::PackedNodeI16;
pub use packed_i16::QuantizedEnsembleHeader;
pub use view::EnsembleView;
pub use view_i16::QuantizedEnsembleView;
pub use loss::Loss;
pub use loss::LossType;
pub use sample::Sample;alloc
pub use sample::Observation;
pub use sample::SampleRef;
pub use drift::DriftSignal;
pub use drift::DriftDetector;alloc
pub use drift::DriftDetectorState;alloc
pub use error::ConfigError;alloc
pub use error::IrithyllError;alloc
pub use error::Result;alloc

Modules§

drift
Concept drift detection algorithms.
ensemblealloc
SGBT ensemble orchestrator – the core boosting loop.
error
Error types for irithyll-core.
featurealloc
Feature type declarations for streaming tree construction.
histogramalloc
Histogram-based feature binning for streaming tree construction.
learneralloc
Unified streaming learner trait for polymorphic model composition.
loss
Loss functions for gradient boosting.
math
Platform-agnostic f64 math operations.
packed
12-byte packed node format and ensemble binary layout.
packed_i16
8-byte quantized packed node format for integer-only inference.
quantize
f64 → f32 quantization utilities for packed export.
reservoiralloc
Reservoir computing primitives for streaming temporal models.
sample
Core observation trait and zero-copy sample types.
snnalloc
Spiking Neural Networks with online e-prop learning.
ssmalloc
State Space Models for streaming temporal feature extraction.
traverse
Branch-free tree traversal for packed nodes.
traverse_i16
Branch-free tree traversal for quantized i16 packed nodes.
treealloc
Streaming decision trees with Hoeffding-bound split decisions.
view
Zero-copy, zero-alloc inference view over a packed ensemble binary.
view_i16
Zero-copy, zero-alloc inference view over a quantized (int16) ensemble binary.