Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

caioaao/wolpert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI Documentation status PyPI version

Wolpert, a stacked generalization framework

Wolpert is a scikit-learn compatible framework for easily building stacked ensembles. It supports:

  • Different stacking strategies
  • Multi-layer models
  • Different weights for each transformer
  • Easy to make it distributed

Quickstart

Install

The easiest way to install is using pip. Just run pip install wolpert and you're ready to go.

Building a simple model

First we need the layers of our model. The simplest way is using the helper function make_stack_layer:

from sklearn.ensemble import RandomForestClassifier
from sklearn.svm import SVC
from sklearn.neighbors import KNeighborsClassifier
from sklearn.linear_model import LogisticRegression
from wolpert import make_stack_layer, StackingPipeline

layer0 = make_stack_layer(SVC(), KNeighborsClassifier(),
                          RandomForestClassifier(),
                          blending_wrapper='holdout')

clf = StackingPipeline([('l0', layer0),
                        ('l1', LogisticRegression())])

And that's it! And StackingPipeline inherits a scikit learn class: the Pipeline, so it works just the same:

clf.fit(Xtrain, ytrain)
ypreds = clf.predict_proba(Xtest)

This is just the basic example, but there are several ways of building a stacked ensemble with this framework. Make sure to check the User Guide to know more.

About

A stacked generalization framework. Built on top of scikit learn

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy