a user-friendly Python package for neural networks.
Project description
NeuralX
NeuralX is a Python package for creating neural networks with a wide range of features, including gradient checks, regularization, dropout, mini batch, and various optimization methods. This package is designed to be beginner-friendly, making it easy for users to understand neural network structures and build powerful models.
Features
- Gradient Checks: Ensure the correctness of your neural network's gradients with built-in gradient check tools.
- Regularization: Apply L1 and L2 regularization to prevent overfitting and improve model robustness.
- Dropout: Implement dropout layers for more effective regularization and enhanced generalization.
- Optimization Methods: Choose from different optimization methods, including the popular Adam optimizer, to train your models efficiently.
Installation
You can install NeuralX using pip
:
pip install neuralx
Usage
To get started with NeuralX, follow these steps:
- Import the necessary modules from NeuralX.
- Build your neural network architecture, specifying layers, activation functions, and other parameters.
- Train your model on your dataset using the chosen optimization method.
- Evaluate the model's performance using the provided tools, including the confusion matrix implementation.
Here's a simple example of how to use NeuralX to create a basic neural network:
import neuralx as nx
# create layers description
layers = [
(training_set.shape[0], None, None, None),
(5, 'he', 'relu', 1), # no_of_units, normalization_method, activation_function, dropout_keeping_probability
(2, 'he', 'relu', 1),
(1, 'he', 'sigmoid', 1)
]
# Create a neural network
model = nx.NeuralNetwork(layers)
# Train the model
model.train(
training_set,
training_set_labels,
no_of_epochs=1000,
optimization={'name': 'momentum', 'beta': 0.9},
is_mini_batch=True,
learning_rate=0.001
)
# Evaluate the model using the confusion matrix
cm = nx.ConfusionMatrix(model, test_set, test_set_labels)
print(cm)
print(cm.statistics())
Contributing
We welcome contributions from the community. Feel free to submit bug reports, feature requests, or even pull requests. Together, we can make NeuralX even better!
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file neuralx-1.0.6.tar.gz
.
File metadata
- Download URL: neuralx-1.0.6.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5e2b26f1a9ca5e5d3e17aa15d1f434e2a8360265cba4fb67387808f5581d8af |
|
MD5 | cd8a9413f0eec23a5ae39e5146e69f24 |
|
BLAKE2b-256 | 8b693ae876ab56c94ffe04897d1dcdb1242191d7c79c4e5ad6a07c59fa09fb23 |
File details
Details for the file neuralx-1.0.6-py3-none-any.whl
.
File metadata
- Download URL: neuralx-1.0.6-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14d19ef5a5875751d572540fb45d7ee9ba507abec9308722ca25480c07c837b2 |
|
MD5 | 2ec9888a44055c321f98d4659869c4c3 |
|
BLAKE2b-256 | f7cd208dca6bb735ac0c26a480981a6a24a25337607bf8716babfef3b013190b |