Docs / Simple systems ↔ MathNN bridge
Simple systems ↔ MathNN bridge
Integrates simple text / image / audio / video / SimpleML with MathNN / MLApp.
| Piece | Role |
|---|---|
_SimpleMathNNBridge |
Feature/Media bundle, encode, fuse, gate, train, predict |
_SimpleText |
Text normalize/tokens/similarity → text features |
_SimpleML |
Naive Bayes + k-means soft features |
_MathNNIntegration |
Perception vision/speech encode |
_MLTask (MLApp) |
Classifier + anomaly autoencoder on fused vectors |
_Conv2D (MathNNLayers) |
Tiny conv on synthetic image patches |
Related brainstorms: SimpleML×MathNN · simple media modalities.
Quick start
simple nn doctor
simple nn selftest
simple nn encode text gaming rl status
simple nn encode image camera_frame.png
simple nn encode audio mic.wav -- hello from the microphone
simple nn encode video clip.mp4
simple nn encode perception
simple nn simpleml
simple nn fuse
simple nn train classifier 32
simple nn train anomaly 16
simple nn predict
simple nn gate 0.55
simple nn export data/simple_nn_last.json
Aliases:
simple media status|encode|last|fuse|to nn
nn simple encode text …
Pipeline
simple text / image / audio / video / perception
│ encode
▼
FeatureBundle (last)
text[16] image[16] audio[8] video[16] simple_ml[12]
│ fuse (+ L2 normalize)
▼
fused[] ──► MLApp classifier / anomaly (MathNN dense / AE)
│
├─ simple nn simpleml → NaiveBayes scores on transcript/text
└─ simple nn gate → high NB conf = "simple", else "neural"
Commands
| Command | Effect |
|---|---|
simple nn status\|doctor\|selftest\|help |
Status / checklist / offline test |
simple nn encode text <…> |
Text features via SimpleText |
simple nn encode image <path\|tag> |
Image features + tiny Conv2D |
simple nn encode audio <path> [-- transcript] |
Speech features (MathNNIntegration if transcript) |
simple nn encode video <path\|tag> |
Mean of synthetic keyframe encodes |
simple nn encode perception |
Live PerceptionBus → vision+speech |
simple nn simpleml [text] |
NB intent + memory cluster soft features |
simple nn fuse |
Rebuild fused vector |
simple nn train classifier [steps] |
Supervised on fused (label from NB/modality) |
simple nn train anomaly [steps] |
Autoencoder recon on fused |
simple nn predict |
NB + neural class + anomaly |
simple nn gate [threshold] |
Cascade decision |
simple nn features\|last\|json |
Dump last bundle JSON |
simple nn export [path] |
Write JSON (default data/simple_nn_last.json) |
Lua
Registered with script/agent Lua states:
simple_nn_status()
simple_nn_encode_text("hello")
simple_nn_encode_image("frame.png")
simple_nn_encode_audio("a.wav", "transcript")
simple_nn_encode_video("v.mp4")
simple_nn_encode_perception()
simple_nn_simpleml("gaming rl train")
simple_nn_fuse()
simple_nn_train_classifier(32)
simple_nn_train_anomaly(16)
simple_nn_predict()
simple_nn_gate(0.55)
simple_nn_export("data/simple_nn_last.json")
simple_nn_json()
simple_nn_selftest()
Example harness:
print(simple_nn_encode_text("gaming rl status"))
print(simple_nn_simpleml())
print(simple_nn_train_classifier(24))
print(simple_nn_predict())
print(simple_nn_gate(0.5))
print(simple_nn_export())
Feature dimensions
| Slice | Dim | Source |
|---|---|---|
| text | 16 | length, tokens, hashes, probe cosine similarities |
| image | 16 | path hashes + Conv2D on 8×8 synthetic patch |
| audio | 8 | MathNNIntegration speech encode or path hashes |
| video | 16 | mean of 4 keyframe image encodes |
| simple_ml | 12 | NB confidence + label scores + cluster hash |
| fused | sum of present slices | L2-normalized concat |
Notes / limits (MVP)
- Image/video encodes use hash + synthetic patch when no raw pixels are loaded (same pattern as MathNNIntegration). Wire real pixels later from camera paths / OpenCV buffers.
- Classifier training uses one-hot from NB label (or modality) on the current fused vector — enough for selftest and wiring; batch datasets come next.
- Does not replace full
simple image generate/ OCR pipelines; it consumes tags, paths, transcripts, and perception for MathNN-ready vectors. - Prefer
simple nn gatebefore expensive LLM analyze.
Files
SimpleMathNNBridge.hpp/.cpp- Wired in
SpeechCommands.cpp,AgentRuntime.cpp - Docs: this file ·
docs/MathNN.md(core) ·docs/ChatSession-Features.md
Generated from the project markdown docs on 2026-07-24. This is a static, self-contained site.