Skip to content

Models (Machine Gnostics MAGNET)

The machinegnostics.magnet module provides model containers and neural network architectures for building deep learning pipelines on gnostic algebra.


Key Model Classes

  • Model β€” Abstract base container with compile(), fit(), predict(), evaluate(), summary(), and weight management APIs
  • Sequential β€” Linear stack of layers with straightforward forward propagation
  • GnosticNeuron β€” MAGNET‑specific neuron implementing gnostic algebra transformations (fi, fj, hi, hj, ei)

Model Utilities

  • get_model(name) β€” Resolve model name to instance
  • load_model(filepath) β€” Load a saved model from disk
  • save_model(model, filepath) β€” Persist a model to disk

Callbacks & History

  • Callback β€” Base callback class for training hooks
  • EarlyStopping β€” Stop training when monitored metric stops improving
  • History β€” Automatically tracks epoch-level metrics during training

Key Concepts

Model Lifecycle

  1. Construction β€” Define layer architecture
  2. Compilation β€” Configure loss and optimizer via compile()
  3. Training β€” Fit on data via fit(X, y, epochs, batch_size, callbacks)
  4. Evaluation β€” Validate performance via evaluate(X, y)
  5. Inference β€” Generate predictions via predict(X)

Gnostic Parameter Handling

MAGNET models provide specialized handling for gnostic parameters: - s β€” Scale parameter for coordinate transformation - z0 β€” Center parameter for coordinate origin - *_s, *_z0 β€” Layer-specific scale/center variants

Optimizers automatically apply adaptive scaling to these parameters during training.


Author: Nirmal Parmar