https://github.com/chuvalniy/tulia
Contains self-implemented Machine Learning algorithms using only numpy.
https://github.com/chuvalniy/tulia
boosting from-scratch knn learning logistic-regression machine ml numpy python random-forest regression sklearn testing xgboost
Last synced: 13 days ago
JSON representation
Contains self-implemented Machine Learning algorithms using only numpy.
- Host: GitHub
- URL: https://github.com/chuvalniy/tulia
- Owner: chuvalniy
- License: mit
- Created: 2023-11-01T19:50:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-13T13:53:59.000Z (about 1 year ago)
- Last Synced: 2025-01-16T00:11:39.747Z (about 1 month ago)
- Topics: boosting, from-scratch, knn, learning, logistic-regression, machine, ml, numpy, python, random-forest, regression, sklearn, testing, xgboost
- Language: Python
- Homepage:
- Size: 3.33 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

Tulia: a comprehensive machine learning project entirely from scratch, utilizing the power of Python and numpy.
## Features
### Simplicity
By encapsulating both the training and predicting logic within just a couple of classes, complexity is greatly reduced compared to popular frameworks that heavily rely on abstraction.
Moreover, the library provided here offers a streamlined approach by maintaining only essential parameters in the model class.### Familiar approach
This library uses sklearn API to build the codebase.
## Example usage
```python
from src.linear import LinearRegressionX_train, X_test, y_train, y_test = ...
lr = LinearRegression(n_steps=10_000, learning_rate=1e-4)
lr.fit(X_train, y_train)y_pred = lr.predict(X_test)
mse = mean_squared_error(y_pred, y_test) # Here mean_squared_error() is a pseudocode.
```## Installation
### To use in code
```sh
pip install tulia
```### Download a whole library
```sh
git clone https://github.com/chuvalniy/Tulia.git
pip install -r requirements.txt
```## Testing
Every machine learning model is provided with unit test that verifies correctness of fit and predict methods.
Execute the following command in your project directory to run the tests.
```python
pytest -v
```## Demonstration
This [demo](/demos) folder contains jupyter-notebooks that compare scikit-learn and Tulia performance.
## License
[MIT License](LICENSE)