MachineLearning/ann library

🧠 Artificial Neural Network (ANN)

A minimal, production-minded feed-forward neural network API. This class exposes a generic, well-documented interface for building multi-layer perceptrons with configurable layer sizes, activation functions, and training parameters. The implementation favors clarity, numerical safety, and explicitness suitable for engineering evaluation and extension.

Contract:

  • Input: feature matrix X (n x m) as List<List
  • Output: trained weights and a predict method which returns model outputs.
  • Errors: throws ArgumentError for invalid shapes and StateError if used before fit.

Notes: This implementation is intentionally lightweight (no GPU) and designed to be a maintainable, auditable building block rather than a high-performance library.

Classes

ANN