Axiom is a Python library for building and deploying machine learning models.
Project description
Axiom
A foundational Machine Learning and Neural Computing library implemented from first principles.
Axiom is a high-performance, minimal framework designed to bridge the gap between mathematical theory and software engineering. Built entirely on NumPy, it provides a transparent implementation of both gradient-based architectures (Neural Networks, Regressions) and logic-based structures (Decision Trees, Random Forests).
Designed for engineers and researchers who demand a "glass-box" view of algorithmic internals, Axiom eliminates the overhead of production heavyweights while maintaining the rigor of an industrial-grade stack.
🏗️ Core Architecture
Axiom is organized into distinct modules, allowing for a hybrid approach to machine learning:
🧠 Neural Engine (axiom.nn)
-
Sequential API: Build deep architectures effortlessly using a stackable layer interface.
-
Smart Initialization: Automated selection of He, Xavier, or LeCun strategies based on subsequent activation functions.
-
Optimization Suite: Momentum-based SGD for accelerated convergence and L2 Regularization for robust generalization.
-
Activations: Comprehensive support for
ReLU,Leaky_ReLU,Sigmoid,Tanh, andSELU.
🌲 Logic Suite (axiom.trees)
-
Decision Trees: Recursive splitting logic utilizing Information Gain and Entropy/Gini Impurity.
-
Ensemble Methods: Native support for Random Forests and Boosting strategies.
-
Categorical Handling: Efficient processing of discrete decision boundaries without gradient dependency.
📈 Linear Systems (axiom.linear)
-
Closed-Form Solutions: Linear Regression via the Normal Equation for direct mathematical optimization.
-
Iterative Solvers: Logistic Regression implemented with optimized Gradient Descent kernels.
⚡ Quick Start
Installation
Ensure you have the core numerical dependency installed:
Bash
pip install numpy
Running the XOR Benchmark
Verify the Neural Engine’s convergence on non-linear boundaries:
Bash
git clone https://github.com/tammam-bt/Axiom.git
cd Axiom
python test_xor.py
📉 Example Usage
Building a Neural Network
Python
import axiom as ax
import numpy as np
# Define architecture
network = ax.nn.Sequential([
ax.nn.Dense(2, 8, momentum_beta=0.9),
ax.nn.ReLU(),
ax.nn.Dense(8, 1),
ax.nn.Sigmoid()
])
model = ax.Model(network, loss="BCE")
model.fit(x_train, y_train, epochs=2000, lr=0.1)
Deploying a Decision Tree
Python
from axiom.trees import DecisionTreeClassifier
clf = DecisionTreeClassifier(max_depth=5, criterion="entropy")
clf.fit(X_train, y_train)
predictions = clf.predict(X_test)
🛠️ Technical Specifications
| Component | Supported Features | Optimization Strategy | Mathematical Basis |
|---|---|---|---|
| Optimizers | SGD, Momentum | Velocity tracking, Weight Decay (L2) | Gradient Descent |
| Loss Functions | BCE, MSE, CCE, Log-Cosh | Fused Gradients, Epsilon Clipping | Information Theory / Calculus |
| Initializers | He, Xavier, LeCun | Distribution-aware variance scaling | Statistical Initialization |
| Tree Logic | ID3 / C4.5 Optimized | Recursive partitioning | Shannon Entropy / Gini |
🚀 Roadmap & Future Milestones
-
[ ] Vectorized Mini-batching: Transition from full-batch to stochastic mini-batch processing for large-scale data.
-
[ ] Adaptive Optimizers: Implementation of Adam and RMSProp for automated learning rate scaling.
-
[ ] Convolutional Kernels: Expanding the Neural Engine to support spatial feature extraction (CNNs).
-
[ ] Serialization: Native
.npzsupport for saving and deploying trained model weights.
📜 Licensing
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file axiom_ml-0.1.1.tar.gz.
File metadata
- Download URL: axiom_ml-0.1.1.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cd17bf709442604ec4de9c81e2bfb89bd88cf52b9d2f57572659ce7db653793
|
|
| MD5 |
6ccbefc650b2e4ee940c96a5d5986f8f
|
|
| BLAKE2b-256 |
e207c04890556f18dfbdf4d18bf99a5e16b0d51c0fc9f475ca9e93201289aab5
|
File details
Details for the file axiom_ml-0.1.1-py3-none-any.whl.
File metadata
- Download URL: axiom_ml-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcdfb5b7732837ace4714c91c22955868709a118e85ad94542315a820f35d024
|
|
| MD5 |
ecfc460619e23949090b6d5b7440d48c
|
|
| BLAKE2b-256 |
43ed29aa8c01335dac753f84a0c27fac9eb82c3b5692e7f45cd011acae791224
|