Skip to main content

prism/
lib.rs

1// Copyright 2024-2026 Reflective Labs
2// SPDX-License-Identifier: MIT
3
4//! # prism
5//!
6//! Closed-form analytics and inference Suggestors for the Converge Engine.
7//!
8//! Prism owns hand-authored, deterministic inference: feature extraction,
9//! inference packs, and fuzzy inference (Mamdani / Sugeno / Tsukamoto).
10//! Training-pipeline concerns — dataset loading, train/val split,
11//! hyperparameter search, model fitting, registry, and deployment —
12//! live in `crucible-models`. The boundary is: prism never fits, crucible
13//! never owns expert rules.
14//!
15//! ## Usage
16//!
17//! ```rust,ignore
18//! use prism::FeatureAgent;
19//!
20//! engine.register_suggestor(FeatureAgent::new(config));
21//! ```
22//!
23//! ## Available Suggestors
24//!
25//! - [`FeatureAgent`] — Polars-based feature extraction
26//! - [`InferenceAgent`] — Burn-based inference over feature vectors
27//! - [`FuzzyInferencePack`] — fuzzy membership and rule inference
28
29pub mod batch;
30pub mod engine;
31/// Re-export of the extracted `converge-fuzzy-inference` crate so existing
32/// callers using `prism::fuzzy::...` continue to work unchanged.
33pub use converge_fuzzy_inference as fuzzy;
34pub mod model;
35pub mod packs;
36pub mod primitives;
37pub mod provenance;
38pub mod suggestor;
39
40pub use primitives::{NonZeroUsize, UnitFraction, ZScoreThreshold};
41
42pub use engine::FeatureAgent;
43pub use model::InferenceAgent;
44pub use packs::{
45    AnomalyDetectionPack, ClassificationPack, DescriptiveStatsPack, ForecastingPack,
46    FuzzyInferencePack, NaiveBayesPack, RankingPack, RegressionPack, SegmentationPack,
47    SimilarityPack, TrendDetectionPack,
48};
49pub use provenance::{PRISM_PROVENANCE, Prism, prism_execution_identity};