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.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (280.3 kB view details)

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

myalgo_core-0.1.3-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.3-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.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for myalgo_core-0.1.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4ce579639ed9a559c5cbdfb4635aa12e35bf29b2122c184463d55a310faad194
MD5 569ac1de358f44338a1f091158c18381
BLAKE2b-256 94506910d9aa8762f12cc05bc8e2f173e3ccbd0663f074c3c0a2b54cb562a501

See more details on using hashes here.

Provenance

The following attestation bundles were made for myalgo_core-0.1.3-cp313-cp313-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.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for myalgo_core-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 60d07fa0b749d75f2f9fa90757c4ef5cc93f278a263b9886391218545d3cdc72
MD5 dda08b71530a851584caf393245f8eeb
BLAKE2b-256 e28a148aee3e707167db2f9d2c38d25b7713ef0e981b794cfbb0259d8b0cede1

See more details on using hashes here.

Provenance

The following attestation bundles were made for myalgo_core-0.1.3-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.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for myalgo_core-0.1.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 41e3b4db0f0c35ffd765773c71ca7aa436033e7634b76daccba3ddc6319b3b71
MD5 e6a58fd854005db85a65950861c7922d
BLAKE2b-256 e068eaeb45319bcb6dfb6957ba062dc090354acd7eb36b9a57f035d05fb08d85

See more details on using hashes here.

Provenance

The following attestation bundles were made for myalgo_core-0.1.3-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