Skip to main content

This is a comprehensive package designed to demystify the concepts of gradients and their applications across various machine learning algorithms. With this release, developers and researchers gain access to a powerful toolkit that simplifies the understanding and implementation of gradient-based optimization techniques.

Project description

pytest License

Gradient-Based Learning

A comprehensive Python library for gradient-based learning, including neural networks, logistic regression, support vector machines (SVM), and more.

Introduction

The Gradient-Based Learning Library is a versatile toolset for implementing and experimenting with various machine learning algorithms that rely on gradient descent optimization. From basic linear regression to complex neural networks, this library provides a unified interface for building, training, and evaluating models.

Features

  • Implementation of the Variable class for automatic differentiation
  • Support for various activation functions and cost functions
  • Modular neural network architecture with customizable layers and activations
  • Logistic regression and support vector machine (SVM) implementations
  • Optimizers including stochastic gradient descent (SGD) and batch gradient descent
  • Extensible and easy-to-use API for adding custom models and functionalities

Installation

Install the library using pip:

pip install gradientblueprint

Usage

To use the library, import the necessary modules and classes into your Python code:

from gradientblueprint import Variable, MLP, LogisticRegression, SVM, Optimizer, CostFunction

Then, create instances of the provided classes and customize them according to your requirements. Here's a basic example of building and training a neural network:

# Define input dimension and layer dimensions
input_dim = 10
layer_dims = [32, 16, 8]

# Create a multilayer perceptron (MLP)
mlp = MLP(input_dim=input_dim, layers_dim=layer_dims, activations=['relu', 'relu', 'sigmoid'])

# Define optimizer and cost function
optimizer = Optimizer()
cost_function = CostFunction.mean_squared_error

# Train the MLP
for epoch in range(num_epochs):
    # Perform forward pass
    # Perform backward pass and update weights using optimizer

Refer to the documentation and examples for detailed usage instructions and customization options.

Examples

Explore the examples directory for detailed usage examples and tutorials on how to use different components of the library:

  • Simple MLP Example: Basic usage example of building and training a multilayer perceptron (MLP).
  • Logistic Regression Example: Example demonstrating how to use logistic regression for binary classification.
  • SVM Example: Example illustrating how to use support vector machines (SVM) for classification tasks.

Documentation

For detailed documentation, including API reference and usage guidelines, refer to the Documentation.

Contributing

Contributions to the Gradient-Based Learning Library are welcome! If you find any issues or have suggestions for improvement, please submit a pull request or open an issue on GitHub.

Please read the Contributing Guide for details on how to contribute to this project.

License

This project is licensed under the MIT License.

Star History

Star History Chart

Project details


Download files

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

Source Distribution

gradientblueprint-1.0.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

gradientblueprint-1.0.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file gradientblueprint-1.0.0.tar.gz.

File metadata

  • Download URL: gradientblueprint-1.0.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for gradientblueprint-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d9a053df25096f74640589b5e3cb5b824adb5f6e0923f5d41d74af1f70b7d6d3
MD5 3afd591942657b30de802effb46d813e
BLAKE2b-256 5e38a1615328c79fc175201bc5aae8920e0281513e55b833ab0abeba14f693a8

See more details on using hashes here.

File details

Details for the file gradientblueprint-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gradientblueprint-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4674bd120148d765affe6f2f2253fd3ab48852761f11bfb6cf328e0b81f96d92
MD5 385e4b95ec78335e25b16e77d1c923e0
BLAKE2b-256 7af4f2d6ab02b7da8a3087a530f3b4537618add9104e2cee80e79066076dcc33

See more details on using hashes here.

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