Meta-Network
Meta-Network is an approach to ensemble learning where base learners are not constrained to the same task but rather take on distinct roles in the ensemble. Commonly, ensembles of classifiers do not have a distinction in each base learner's role. While each base learner may be diversified through bootstrapping or use of different parameters/models, their objectives are universally the same: classify its input to the best of its ability. Stacking and meta-classifiers introduce a sense of roles but each layer retains the same objective. Meta-Networks, however, remove this universal objective. By training the ensemble as a whole unit through backpropagation, each base learner may learn different objectives that orchestrate together to produce the ultimate objective, resulting in greater capacity for higher performance and solutions for complex problems.
This package hosts the basic meta-network model as well as additional implementations of the principle.
More details regarding Meta-Networks can be found in the documentation here.
Installation
Once you have a suitable python environment setup, metanetwork can be easily installed using pip:
pip install metanetwork
metanetworkis tested and supported on Python 3.4 up to Python 3.8. Usage on other versions of Python is not guaranteed to work as intended.
Usage
Meta-Networks are quite simple to use, although they do need some encouragement by creating the meta-network structure first. They generally follow sklearn API style.
from metanetwork import MetaNetwork, NeuralNetwork
# Create ensemble with a first layer of 3 estimators and a final layer of 1 estimator
estimators = [NeuralNetwork(), NeuralNetwork(), NeuralNetwork(), NeuralNetwork()]
for e in estimators[:-1]:
e.n_classes_ = 2 # Each estimator in the first layer produces 2 outputs
e[-1].n_classes_ = 4 # The final estimator produces the 4 class outputs
network = [estimators[:-1], estimators[-1:]]
# Create and train the metanetwork
mn = MetaNetwork(network).fit(train_X, train_Y)
# Predict some data
p = mn.predict(test_X)
For full details on usage, see the documentation.
Changelog
See the changelog for a history of notable changes to metanetwork.
Development
metanetwork is in heavy development. Don't look, it's embarrassing!
Help and Support
Documentation
Documentation for metanetwork can be found here.
Issues and Questions
Issues and Questions should be posed to the issue tracker here.
Release files for metanetwork 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| metanetwork-0.1.0.tar.gz | 27.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| metanetwork-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 62.3 kB
Release files / metanetwork-0.1.0.tar.gz
| Download URL | metanetwork-0.1.0.tar.gz |
|---|---|
| Size | 27.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce6d50df1c3c7ea1674ecd367b7e1c2257f6546a9a2451a5a283238b1ecb5784
|
|
BLAKE2b-256 checksum How to use checksums |
e77e4845f986a2366f6956415bf4df751e1732916114c73cffacca88a80d63b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2
|
Release files / metanetwork-0.1.0-py3-none-any.whl
| Download URL | metanetwork-0.1.0-py3-none-any.whl |
|---|---|
| Size | 35.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
246ccc56111c98e0c8ef56b747e6010145e964d6e6f992ae734b79a23ba438a9
|
|
BLAKE2b-256 checksum How to use checksums |
0600597fb103907f3e446102de7bc2be1b047f2740a3b23ddffc5c0e8c6f0a70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2
|