Skip to main content

crucible/
lib.rs

1// Copyright 2026 Reflective Labs
2// SPDX-License-Identifier: MIT
3
4//! # crucible-models
5//!
6//! Trained-model packs and the training pipeline for the Converge Engine.
7//!
8//! Unlike `prism-analytics` (closed-form, hand-authored inference), Crucible
9//! models are learned from data using the training backend that fits the
10//! model family: Burn for differentiable packs and linfa for classical
11//! models such as trees and forests. Parameters are stored as trained
12//! artifacts, not hand-authored rules.
13//!
14//! ## Training pipeline
15//!
16//! The training pipeline lives in [`training`] and the supporting data
17//! plumbing lives in [`ingest`]. The pipeline is composed of
18//! Suggestor-shaped agents (`DatasetAgent`, `DataValidationAgent`,
19//! `FeatureEngineeringAgent`, `HyperparameterSearchAgent`,
20//! `ModelTrainingAgent`, `ModelEvaluationAgent`, `ModelRegistryAgent`,
21//! `MonitoringAgent`, `DeploymentAgent`, `SampleInferenceAgent`) that
22//! today run from a binary entrypoint and can be lifted into a
23//! Formation when a real retrain trigger pulls.
24//!
25//! ## Planned packs
26//!
27//! - `trees` — Decision Tree classifier (CART, Gini / information gain)
28//! - `ensembles` — Random Forest and gradient-boosted trees (XGBoost-style)
29//! - `svm` — Support Vector Machine with kernel functions
30//! - `neuro_fuzzy` — ANFIS (Adaptive Neuro-Fuzzy Inference System) via Burn
31
32pub mod ensembles;
33pub mod fixtures;
34pub mod ingest;
35pub mod model;
36pub mod neuro_fuzzy;
37pub mod provenance;
38pub mod suggestor;
39pub mod svm;
40pub mod training;
41pub mod trees;
42pub mod types;
43
44pub use ensembles::{RandomForestConfig, RandomForestModel};
45pub use model::ClassifierModel;
46pub use provenance::{CRUCIBLE_PROVENANCE, Crucible};
47pub use suggestor::ClassifierSuggestor;
48pub use training::{
49    DataValidationAgent, DatasetAgent, DeploymentAgent, FeatureEngineeringAgent,
50    HyperparameterSearchAgent, ModelEvaluationAgent, ModelRegistryAgent, ModelTrainingAgent,
51    MonitoringAgent, SampleInferenceAgent,
52};
53pub use trees::{DecisionTreeClassifier, DecisionTreeConfig};
54pub use types::{ClassPredictionPayload, ClassificationFeaturesPayload};
55
56/// Inference Suggestor for the [`DecisionTreeClassifier`] pack.
57pub type DecisionTreeClassifierSuggestor = ClassifierSuggestor<DecisionTreeClassifier>;
58
59/// Inference Suggestor for the [`RandomForestModel`] pack.
60pub type RandomForestClassifierSuggestor = ClassifierSuggestor<RandomForestModel>;