Skip to main content

ML algorithms with C++ backends

Project description

PyPI CI License

MyAlgo

MyAlgo is my Machine Learning project which is focused on building Linear Regression and Artificial Neural Network from scratch without using high level machine learning libraries such as Tensorflow, PyTorch and scikit-learn.

The main goal of this project is to combining

  • python as a user facing python API
  • C++ as a high performance computational backend (only for numerical calculations)

Read More : Documentation

Implemented Algorithms

Linear Regression

Feature Supported values
Methods Normal Equation, GD, SGD
Regularization Lasso, Ridge, Elastic net

Example usage:

model = LinearRegression(method='gd', lr=0.01, epochs=1000)
model.fit(X_train, y_train)
predictions = model.predict(X_test)

2. ANN

Feature Supported values
Layers Flatten, Dense
Activations ReLU, sigmoid, Tanh, Softmax
Loss functions MSE, cross-entropy

Example usage:

model = NeuralNetwork(
  Flatten((28,28)),
  Dense(128, activation='relu'),
  Dense(10, activation='softmax')
)
model.compile(loss='categorical_crossentropy', lr=0.01)
model.train(X_train, y_train, epochs=11, batch_size=32)

Installation

pip install myalgo

Results of MINST dataset training

MNIST Results

Author

Vitthal Humbe — github.com/vitthalhumbe B.Tech second year, AI/ML

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

myalgo_core-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (280.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

myalgo_core-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (277.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file myalgo_core-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for myalgo_core-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 80481f5cb327cc3af93f74968f8778ba478ad08d955ed4f0f9aeb91eeeda898b
MD5 4a78d80ebe831c842cc0953eae8e0e96
BLAKE2b-256 2a8cc35581e0f3dd6a61b96cb6fdb34048ecce3190d54b3f35d6e33c716e81d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for myalgo_core-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on vitthalhumbe/MyAlgo

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

File details

Details for the file myalgo_core-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for myalgo_core-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b3d6aee4c5c2ec6a01f85c6df434f85e5508128ad878fb3f555645d21e01f8f2
MD5 827ebb8470dc6a96f290cc830c4397ca
BLAKE2b-256 5fc104263a7ca760c6ce6ad5527a05c0f1d2e0e83feeb39148f69cadbb3e2486

See more details on using hashes here.

Provenance

The following attestation bundles were made for myalgo_core-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on vitthalhumbe/MyAlgo

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