Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neuralfabric-0.1.0.dev2.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neuralfabric-0.1.0.dev2-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

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

Hashes for neuralfabric-0.1.0.dev2.tar.gz
Algorithm Hash digest
SHA256 4699e805cd13bb4bd664f63d22b31131e529e4aa012e8bc25cbebe994cf52328
MD5 72b4f871139546215c1bf3405eb4b36e
BLAKE2b-256 c630fb4741328732b2e14b1f27cc0787669a4280a280aecb8cc755100980a043

See more details on using hashes here.

Provenance

The following attestation bundles were made for neuralfabric-0.1.0.dev2.tar.gz:

Publisher: publish.yml on aryanap07/neuralfabric

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file neuralfabric-0.1.0.dev2-py3-none-any.whl.

File metadata

File hashes

Hashes for neuralfabric-0.1.0.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 1f4f85aba5dbd0289725eeb407f063213eee702c7cc0df071243dc8f04ca8a12
MD5 8866b18fe1e01f2de0a6dea938032ed7
BLAKE2b-256 cae9e0d9d4c66953efbfd2abf76892d59395ba4146a7d2a9f782494d29182437

See more details on using hashes here.

Provenance

The following attestation bundles were made for neuralfabric-0.1.0.dev2-py3-none-any.whl:

Publisher: publish.yml on aryanap07/neuralfabric

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page