Skip to main content

Module export_embedded

Module export_embedded 

Source
Expand description

Export trained SGBT models to the irithyll-core packed binary format.

Converts the tree ensemble into a compact, zero-alloc-friendly binary that can be loaded by irithyll_core::EnsembleView on embedded targets.

§Usage

use irithyll::{SGBTConfig, SGBT, Sample};
use irithyll::export_embedded::export_packed;

let config = SGBTConfig::builder().n_steps(10).build().unwrap();
let mut model = SGBT::new(config);

// ... train the model ...

let packed = export_packed(&model, 3);
// `packed` can be written to flash, sent over network, etc.
// Load with `irithyll_core::EnsembleView::from_bytes(&packed)`

Functions§

export_packed
Convert a trained SGBT model into the irithyll-core packed binary format.
validate_export
Compare predictions between original SGBT and packed EnsembleView.