Structured Ensemble Learning
Project description
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
metanetwork
is 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.
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 metanetwork-0.1.0.tar.gz
.
File metadata
- Download URL: metanetwork-0.1.0.tar.gz
- Upload date:
- Size: 27.0 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce6d50df1c3c7ea1674ecd367b7e1c2257f6546a9a2451a5a283238b1ecb5784 |
|
MD5 | 15db5bc235f98a48a4ebe2a9c3c38c7b |
|
BLAKE2b-256 | e77e4845f986a2366f6956415bf4df751e1732916114c73cffacca88a80d63b2 |
File details
Details for the file metanetwork-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: metanetwork-0.1.0-py3-none-any.whl
- Upload date:
- Size: 35.3 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 246ccc56111c98e0c8ef56b747e6010145e964d6e6f992ae734b79a23ba438a9 |
|
MD5 | 7ccdda26262f3300994476bde252dce6 |
|
BLAKE2b-256 | 0600597fb103907f3e446102de7bc2be1b047f2740a3b23ddffc5c0e8c6f0a70 |