DeepStack
DeepStack: Ensembles for Deep Learning
DeepStack is a Python module for building Deep Learning Ensembles originally built on top of Keras and distributed under the MIT license.
Installation
pip install deepstack
Stacking
Stacking is based on training a Meta-Learner on top of pre-trained Base-Learners. DeepStack offers an interface to fit the Meta-Learner on the predictions of the Base-Learners. In the following an Example based on top of pre-trained Keras Models (there is also an interface for generic models):
Usage
from deepstack.base import KerasMember # For a generic (i.e., Non-Keras Model) check the class `Member`
from deepstack.ensemble import StackEnsemble
model1 = ... # A Keras pre-trained Model (Base-Learner)
train_batches1 = ... # A numpy tuple (X_train, y_train) or Keras Data Iterator - Training Data for Meta-Learner
val_batches1 = ... # A numpy tuple (X_val, y_val) or Keras Data Iterator - Validation Data for Meta-Learner
member1 = KerasMember(name="Model1", keras_model=model1, train_batches=train_batches1, val_batches=val_batches1)
model2 = ...
train_batches2 = ...
val_batches2 = ...
member2 = KerasMember(name="Model2", keras_model=model2, train_batches=train_batches2, val_batches=val_batches2)
stack = StackEnsemble()
stack.add_member(member1) # Assumption: the data iterators of base-learners iterate over the same data and have same shape and classes.
stack.add_member(member2)
stack.fit() # Fits meta-learner based on training batches from its members (base-learners)
stack.describe() # Prints information about ensemble performance based on validation data
Check an example on the CIFAR-10 dataset: Cifar10.py.
Randomized Weighted Ensemble
Ensemble Technique that weights the prediction of each ensemble member, combining the weights to calculate a combined prediction. Weight optimization search is performed with randomized search based on the dirichlet distribution on a validation dataset.
It follows the same interface of the StackEnsemble. An example can be found in Cifar10.py.
Citing DeepStack
If you use DeepStack in a scientific publication, we would appreciate citations:
@misc{
title = {DeepStack: Ensembles for Deep Learning},
author = {Julio Borges},
url = {https://github.com/jcborges/DeepStack},
date = {2019}
}
Metadata
Release files for deepstack 0.0.9
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 |
|---|---|---|---|---|
| deepstack-0.0.9.tar.gz | 7.5 kB | Without provenance | Details for deepstack-0.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deepstack-0.0.9-py3-none-any.whl | Python 3 | none | any | Details for deepstack-0.0.9-py3-none-any.whl |
Total release size: 16.4 kB
Release files / deepstack-0.0.9.tar.gz
| Download URL | deepstack-0.0.9.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e5012dec6914d8009e0c5759772614ff78fb036e62b2617a89706b81704e393
|
|
BLAKE2b-256 checksum How to use checksums |
03eeafa7a702f50407bcebea660718bfba7544965bf853174abc9ba1e04262d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.5
|
Release files / deepstack-0.0.9-py3-none-any.whl
| Download URL | deepstack-0.0.9-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c11f7ee09084a5f9d5cef85db9240dca75d50859a2da4556fed5846878c4bade
|
|
BLAKE2b-256 checksum How to use checksums |
360a7555b16579570cad2ec2b02b7a52ae6406f983e8fdde156ac3fe109fd16f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.5
|
Security for deepstack 0.0.9
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.