A from-scratch machine learning and deep learning framework, from linear regression to transformers.
Project description
NeuralFabric
A from-scratch machine learning and deep learning framework, from linear regression to transformers.
Installation
pip install neuralfabric
# or, for local development:
pip install -e ".[dev]"
Quick start (target API — see roadmap)
from neuralfabric.linear_model import LinearRegression
from neuralfabric.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
model = LinearRegression()
model.fit(X_train, y_train)
preds = model.predict(X_test)
Project structure
src/neuralfabric/
├── core/ # Tensor + autograd engine (PyTorch-style backbone)
├── linear_model/ # Linear/Logistic/Ridge/Lasso/ElasticNet
├── tree/ # Decision trees
├── ensemble/ # RandomForest, GradientBoosting, AdaBoost, Bagging
├── svm/ # Support Vector Machines
├── naive_bayes/ # Gaussian / Multinomial Naive Bayes
├── cluster/ # KMeans, DBSCAN, hierarchical clustering
├── decomposition/ # PCA, SVD
├── nn/ # Module, Parameter, layers, activations, losses
│ └── layers/ # Linear, Conv, Pooling, Normalization, RNN/LSTM/GRU...
├── transformer/ # Attention, positional encoding, encoder/decoder, full models
├── optim/ # SGD, Adam, RMSProp, LR schedulers
├── preprocessing/ # Scalers, encoders, imputers
├── model_selection/ # train_test_split, cross-validation, grid search
├── metrics/ # Regression / classification / clustering metrics
├── datasets/ # Toy dataset loaders
├── utils/ # Validation + math helpers
├── base.py # BaseEstimator, RegressorMixin, ClassifierMixin, TransformerMixin
└── pipeline.py # Pipeline / FeatureUnion
Roadmap
-
core: Tensor + autograd engine -
linear_model: Linear & Logistic Regression -
tree/ensemble: Decision Tree, Random Forest, Gradient Boosting -
svm,naive_bayes,cluster,decomposition -
nn: Module system, core layers, losses, activations -
optim: SGD, Adam - CNN layers (
nn/layers/conv.py,pooling.py) - RNN/LSTM/GRU (
nn/layers/recurrent.py) -
transformer: attention → encoder/decoder → full model - Docs site + tutorials
- First PyPI release (
v0.1.0)
Development
make dev # install with dev dependencies
make test # run tests with coverage
make lint # ruff + mypy
make format # black
make build # build sdist + wheel
make publish # twine upload (requires PyPI credentials)
License
MIT — see 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 neuralfabric-0.1.0.dev2.tar.gz.
File metadata
- Download URL: neuralfabric-0.1.0.dev2.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4699e805cd13bb4bd664f63d22b31131e529e4aa012e8bc25cbebe994cf52328
|
|
| MD5 |
72b4f871139546215c1bf3405eb4b36e
|
|
| BLAKE2b-256 |
c630fb4741328732b2e14b1f27cc0787669a4280a280aecb8cc755100980a043
|
Provenance
The following attestation bundles were made for neuralfabric-0.1.0.dev2.tar.gz:
Publisher:
publish.yml on aryanap07/neuralfabric
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neuralfabric-0.1.0.dev2.tar.gz -
Subject digest:
4699e805cd13bb4bd664f63d22b31131e529e4aa012e8bc25cbebe994cf52328 - Sigstore transparency entry: 1885287960
- Sigstore integration time:
-
Permalink:
aryanap07/neuralfabric@9173fc65e3fab930b76c940167999ee830b80ea3 -
Branch / Tag:
refs/tags/v0.1.0.dev2 - Owner: https://github.com/aryanap07
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9173fc65e3fab930b76c940167999ee830b80ea3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file neuralfabric-0.1.0.dev2-py3-none-any.whl.
File metadata
- Download URL: neuralfabric-0.1.0.dev2-py3-none-any.whl
- Upload date:
- Size: 29.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f4f85aba5dbd0289725eeb407f063213eee702c7cc0df071243dc8f04ca8a12
|
|
| MD5 |
8866b18fe1e01f2de0a6dea938032ed7
|
|
| BLAKE2b-256 |
cae9e0d9d4c66953efbfd2abf76892d59395ba4146a7d2a9f782494d29182437
|
Provenance
The following attestation bundles were made for neuralfabric-0.1.0.dev2-py3-none-any.whl:
Publisher:
publish.yml on aryanap07/neuralfabric
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neuralfabric-0.1.0.dev2-py3-none-any.whl -
Subject digest:
1f4f85aba5dbd0289725eeb407f063213eee702c7cc0df071243dc8f04ca8a12 - Sigstore transparency entry: 1885287997
- Sigstore integration time:
-
Permalink:
aryanap07/neuralfabric@9173fc65e3fab930b76c940167999ee830b80ea3 -
Branch / Tag:
refs/tags/v0.1.0.dev2 - Owner: https://github.com/aryanap07
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9173fc65e3fab930b76c940167999ee830b80ea3 -
Trigger Event:
push
-
Statement type: