Expand description
Machine learning model I/O for the OxiPhysics engine.
Covers:
- ML model serialization (weights/biases as binary)
- ONNX-like simplified format (op-graph with typed tensors)
- PyTorch-like state dict (string-keyed tensor store)
- Dataset I/O (training/validation split, shuffle)
- Feature normalization parameter storage
- Label encoding / decoding
- Confusion matrix export
- Training history (loss/accuracy per epoch)
- Hyperparameter configuration
- Model checkpoint with metadata
Structs§
- Checkpoint
Meta - Metadata stored alongside a model checkpoint.
- Confusion
Matrix - Confusion matrix for multi-class classification.
- DataRow
- A dataset row: a feature vector and an optional label index.
- Dataset
- A dataset with optional train/validation split.
- Dense
Layer - A single dense (fully connected) layer with weights and biases.
- Epoch
Record - Per-epoch metrics.
- Hyperparam
Config - Hyperparameter configuration container.
- Label
Encoder - Encodes class labels as integers and decodes them back.
- Model
Checkpoint - A model checkpoint: state dict + metadata + hyperparameters.
- Model
Weights - A collection of named dense layers (binary-serialisable model weights).
- Normalization
Params - Stored feature normalization parameters (mean and std for z-score normalization).
- Onnx
Like Graph - A simplified ONNX-like computation graph.
- Onnx
Node - A single operation node in an ONNX-like compute graph.
- State
Dict - PyTorch-like state dict: a
HashMap<String, Tensor>. - Tensor
- A multi-dimensional tensor stored as a flat
Vecf64`. - Training
History - Full training history for a model.
Enums§
- HpValue
- Typed hyperparameter value.
Functions§
- apply_
activation - Apply a named activation function to a scalar.
- argmax
- Argmax: index of the maximum value.
- cross_
entropy_ loss - Compute cross-entropy loss between
probsand one-hottargets. - mae
- Compute mean absolute error.
- mse
- Compute mean squared error.
- softmax
- Compute softmax of a slice.