Random-brain
About
Random brain is the neural network implementation of a random forest. Its purpose is to combine the strengths of multiple nerual networks.
Background on random forests
A random forest is a machine learning model that is composed of multiple decision trees. These trees in the forest all predict an outcome and the majority rules.
Similarities
Just as the random forest is a vote based ML algorithm, the random brain is a vote based algorithm as well, but uses neural networks specified by the user rather than decision forests.
Setting up Random brain
pip install random-brain
API
Init the brain module and class.
from random_brain import random_brain
brain = random_brain.random_brain()
import models()
Import models will take in a directory or a single .h5 file. Sub directories will be ignored.
brain.import_models(model_path = 'path/to/model.h5')
brain.import_models(model_path = 'path/to/directory')
show_brain()
Shows the keys used in the brain. This should just be the name of each imported model
brain.show_brain()
clear_brain()
Clear a single model or more by entering in the model name as a list. Leave blank to clear all models.
brain.clear_brain(item_list = ['model to remove'])
vote
Add in yTest to cast votes. Vote() will only return the votes as a numpy array and not actual predictions. This is useful if you want to run your own statistics on the votes.
brain.vote(yTest = [1, 2, 3, 4, ...])
predict (in development)
Add in your yTest to make predictions. This will attempt to make a prediction based off of the networks and will return a single answer. This is still in development.
In the future prediction and threading options will be added and improved.
brain.predict(yTest = [1, 2, 3, 4, ...])
Metadata
Release files for random-brain 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| random-brain-0.1.2.tar.gz | 4.6 kB | Without provenance | Details for random-brain-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| random_brain-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for random_brain-0.1.2-py3-none-any.whl |
Total release size: 9.3 kB
Release files / random-brain-0.1.2.tar.gz
| Download URL | random-brain-0.1.2.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52cea1e225c4a229483dc4d004262e251fcdc205264dff28103cc8605beea8b8
|
|
BLAKE2b-256 checksum How to use checksums |
ec1903c0a3f234340878903299aebfaad9914f96e10c4bdfa8d0a52401533eac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
|
Release files / random_brain-0.1.2-py3-none-any.whl
| Download URL | random_brain-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
958c011acf902f1e308dc31293a41d0efcbb6512684b5d5d5b8897e481449276
|
|
BLAKE2b-256 checksum How to use checksums |
23eb4f0d6a7a7e24fee938ffd9b9aafbf8fbaffcb220ef74fa1125aaa80d1977
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
|
Security for random-brain 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.