Package for building Machine learning models
Project description
RedMind
This is a python library made to help you build machine learning models.
Developed by Diego Velez 2022
Quickstart
import numpy as np
from redmind.layers import Dense, Sigmoid
from redmind.network import NeuralNetwork
import redmind.functions as fn
# Prepare data
xor = np.array([[0, 0],
[0, 1],
[1, 0],
[1, 1]])
y = np.array([0, 1, 1, 0]).reshape(1,4)
x_test = xor.T
n_weights_1 = 10 # 3 neurons in the first layer
n_weights_2 = 1 # 1 neuron in the second layer (output)
nn = NeuralNetwork(layers=[
Dense(n_weights_1, x_test.shape[0]),
Sigmoid(),
Dense(n_weights_2, n_weights_1),
Sigmoid()
], cost_function=fn.mse,
grad_function=fn.mse_prime)
nn.set_verbose(True)
# Train
nn.train(X = x_test, Y = y, epochs = 1000, n_batches = 4, learning_rate=0.5)
# Predict
prediction_vector = nn.predict(np.array([[0],[0]]))
Go to samples folder for more samples
Objectives
- Classes definition and construction
- Forward propagation fully working
- Backward propagation working
- Train and predict fully working
- Add Optimization layers
- Add mini batch Gradient descent (through Dataloader)
- Add Gradient checking
- Support for multiple optimizers
- Learning rate decay
- Add early stoping support
- Add convolutional layers
- Add native pyplot support
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
redmind-0.0.3.tar.gz
(7.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file redmind-0.0.3.tar.gz.
File metadata
- Download URL: redmind-0.0.3.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fe72d0b7bb4cdb5290e2fd7f34f563fd079a994f5110db1e0c87f3b180036c9
|
|
| MD5 |
638977e47a1397e54403e2ed6118ec4b
|
|
| BLAKE2b-256 |
489ffc48542bd653b6fd3000f0e76c1ffa23915a2d7b3b38ca6e34cd1a2bbd7e
|
File details
Details for the file redmind-0.0.3-py3-none-any.whl.
File metadata
- Download URL: redmind-0.0.3-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a67f70efd25586127b67d459ad05597ac913bc96397d0da0c444c40a1f163c68
|
|
| MD5 |
bbfdb877f07c036bccb932cb126a694d
|
|
| BLAKE2b-256 |
18764ed3ec33528d33d3c49372b2a2a8f3b746cc4260a27705e75e610f42f2b9
|