Metadata-Version: 2.4
Name: neuralfabric
Version: 0.1.0.dev2
Summary: A from-scratch machine learning and deep learning framework, from linear regression to transformers.
Author-email: Aryan Patel <aryanpatel2906.ap@gmail.com>
License: MIT License
        
        Copyright (c) 2026 NeuralFabric Contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/aryanap07/neuralfabric
Project-URL: Repository, https://github.com/aryanap07/neuralfabric
Project-URL: Issues, https://github.com/aryanap07/neuralfabric/issues
Keywords: machine-learning,deep-learning,transformer,neural-network,autograd
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.23
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Provides-Extra: viz
Requires-Dist: matplotlib; extra == "viz"
Dynamic: license-file

# NeuralFabric

A from-scratch machine learning and deep learning framework, from linear regression to transformers.

## Installation

```bash
pip install neuralfabric
# or, for local development:
pip install -e ".[dev]"
```

## Quick start (target API — see roadmap)

```python
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

- [x] `core`: Tensor + autograd engine
- [x] `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

```bash
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](LICENSE).
