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.
Metadata
Release files for neuralx 1.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| neuralx-1.0.6.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| neuralx-1.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.2 kB
Release files / neuralx-1.0.6.tar.gz
| Download URL | neuralx-1.0.6.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d5e2b26f1a9ca5e5d3e17aa15d1f434e2a8360265cba4fb67387808f5581d8af
|
|
BLAKE2b-256 checksum How to use checksums |
8b693ae876ab56c94ffe04897d1dcdb1242191d7c79c4e5ad6a07c59fa09fb23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / neuralx-1.0.6-py3-none-any.whl
| Download URL | neuralx-1.0.6-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14d19ef5a5875751d572540fb45d7ee9ba507abec9308722ca25480c07c837b2
|
|
BLAKE2b-256 checksum How to use checksums |
f7cd208dca6bb735ac0c26a480981a6a24a25337607bf8716babfef3b013190b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|