Skip to main content

An Wrapper for performing ensembling techniques on deep learning models

Project description

DEEP ENSEMBLE

Description

In the context of deep learning, This library is a wrapper, It allows one to perform ensembling techniques such as Stacked Ensembling, Weighted Ensembling, Ensembling based on Votes. This library get in an array of predictions made by different models on which the user wants to perform ensembling and it performs either of the three ensembling technique based on user choice.

  • What this does?

    • Gets array of predictions(probabilities)
    • Performs ensembling
    • Returns Score of the metrics(user prefers)
    • Returns Y_predicted resulting due to ensembling
  • Ensembling Techniques included

    • Weighted Ensembling
    • Ensembling by Voting
    • Stacked Ensembling

Deep Ensemble

Deep Ensemble is a python package for ensembling the prediciton results.

How to use:

Step 1: Install the libaray

pip install DeepEnsemble

Step 2:

Import the library, and specify the path of the csv file.

from DeepEnsemble.DeepEnsemble import DeepEnsembler

Ensembler = DeepEnsembler(Y_pred, Y_actual, type=None, predThreshold=0.5, metrics="accuracy_score")
score,Y_pred_ensembled = Ensembler.WeightedEnsembling()

Note:

  • Y_pred - Array of predictions made by models
  • Y_actual - Array of actual Class

There are some optional parameters that you can specify as listed below,

Usage:

from DeepEnsemble.DeepEnsemble import DeepEnsembler
Y_Pred = np.array([results of model1],
                  [results of model2],
                  [results of model3],
                   ....)
Y_actual = np.array([actual class])

---Example1:
Ensembler = DeepEnsembler(Y_Pred, Y_actual, type="Weighted", predThreshold=0.6, metrics="cohen_kappa_score")
score,Y_pred_ensembled = Ensembler.WeightedClassifier()

---Example2:
Ensembler = DeepEnsembler(Y_Pred, Y_actual, type="Voting", predThreshold=0.6, metrics="cohen_kappa_score")
score,Y_pred_ensembled = Ensembler.VotingClassifier()

---Example3:
Ensembler = DeepEnsembler(Y_Pred, Y_actual, type="Stacking", predThreshold=0.6, metrics="cohen_kappa_score")
score,Y_pred_ensembled = Ensembler.StackingClassifier()

Parameters


Parameter Default Value Limit Example
Y_pred none Provide a array with results of different models. np.array([results of model1],[results of model2],[results of model3],....)
Y_actual , Provide a array with actual class np.array([actual class])
type Weighted Weighted, Voted, Stacked
predThreshold 0.5 0 to 1 0.5
metrics Sklearn Classification metrics specify any valid classificaiton metrics from sklearn "accuracy_score"

--- THANK YOU, CHEERS ---

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

DeepEnsemble-0.0.3.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

DeepEnsemble-0.0.3-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file DeepEnsemble-0.0.3.tar.gz.

File metadata

  • Download URL: DeepEnsemble-0.0.3.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.0

File hashes

Hashes for DeepEnsemble-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c00eb769a7b84ab6702a0dbaaa6e53e4ffb7ac604e47d3755146cfede4db35a9
MD5 db120febd01de8df4ca0cebf2e718757
BLAKE2b-256 71f0d052ac0d5b9030af85ac528ac05cecd6763542f1c105b87b370a6da47fd5

See more details on using hashes here.

File details

Details for the file DeepEnsemble-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: DeepEnsemble-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.0

File hashes

Hashes for DeepEnsemble-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b9b8ea2b5bf2d12addc0035a6306c1da12b26920a924f0adcf86053f16510f54
MD5 ce4f8cc09d3dc0ed3162310e5812fb6b
BLAKE2b-256 28f175725a2309ac6f630db0a712e2de8a5ab5643f887c065a3be2e1323382b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page