Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

scikit-learn-compatible estimators from Civis Analytics

Project Description

scikit-learn-compatible estimators from Civis Analytics

Installation

Installation with pip is recommended:

$ pip install civisml-extensions

For development, a few additional dependencies are needed:

$ pip install -r dev-requirements.txt

Contents and Usage

This package contains scikit-learn-compatible estimators for stacking ( StackedClassifier, StackedRegressor), non-negative linear regression ( NonNegativeLinearRegression), preprocessing pandas DataFrames ( DataFrameETL), and using Hyperband for cross-validating hyperparameters ( HyperbandSearchCV).

Usage of these estimators follows the standard sklearn conventions. Here is an example of using the StackedClassifier:

>>> from sklearn.linear_model import LogisticRegression
>>> from sklearn.ensemble import RandomForestClassifier
>>> from civismlext.stacking import StackedClassifier
>>> # Note that the final estimator 'metalr' is the meta-estimator
>>> estlist = [('rf', RandomForestClassifier()),
>>>            ('lr', LogisticRegression()),
>>>            ('metalr', LogisticRegression())]
>>> mysm = StackedClassifier(estlist)
>>> # Set some parameters, if you didn't set them at instantiation
>>> mysm.set_params(rf__random_state=7, lr__random_state=8,
>>>                 metalr__random_state=9, metalr__C=10**7)
>>> # Fit
>>> mysm.fit(Xtrain, ytrain)
>>> # Predict!
>>> ypred = mysm.predict_proba(Xtest)

See the doc strings of the various estimators for more information.

Contributing

See CONTIBUTING.md for information about contributing to this project.

License

BSD-3

See LICENSE.md for details.

Release History

Release History

This version
History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
civisml-extensions-0.1.5.tar.gz (35.1 kB) Copy SHA256 Checksum SHA256 Source Oct 31, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting