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

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.0-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.0-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.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for myalgo_core-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7dda5c4d8aa44ca26738523e0a826e47465b6cc7ac5a9ecd45289e715203d775
MD5 3e4563c817b208ab99087ab563dcbf01
BLAKE2b-256 407aa65bcea0bab35c9093ed02529cb3561b771e925498aa1770140273fb5cfb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for myalgo_core-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 688aa456411044e4284efb58afb8ff4114ab4b81f664853c786bca6033c13f5c
MD5 8dea11a03cb7df2c40f063df9cf578e2
BLAKE2b-256 48b5df273895cb19fb6366ea1e90c7b2496f3c053996e66fae7e88075e1d39ce

See more details on using hashes here.

Provenance

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