Machine learning framework built on second-order optimization
Project description
peak-engines
peak-engines is machine learning framework that focuses on applying advanced optimization algorithms to build better models. Here are some examples of what it can do:
Ridge Regression Parameter Optimization
By expressing cross-validation as an optimization objective and computing derivatives, peak-engines is able to efficiently find regularization parameters that lead to the best score on a leave-one-out or generalized cross-validation. It, futhermore, scales to handle multiple regularizers.
Warped Linear Regression
Let X and y denote the feature matrix and target vector of a regression dataset. Under the assumption of normally distributed errors, Ordinary Least Squares (OLS) finds the linear model that maximizes the likelihood of the dataset
What happens when errors aren't normally distributed? Well, the model will be misspecified and there's no reason to think its likelihood predictions will be accurate. This is where Warped Linear Regression can help. It introduces an extra step to OLS where it transforms the target vector using a malleable, monotonic function f parameterized by ψ and adjusts the parameters to maximize the likelihood of the transformed dataset
By introducing the additional transformation step, Warped Linear Regression is more general-purpose than OLS while still retaining the strong structure and interpretability.
Installation
pip install peak-engines
Tutorials
Articles
- How to Do Ridge Regression Better
- What Form of Cross-Validation Should You Use?
- What to Do When Your Model Has a Non-Normal Error Distribution
Examples
- example/ridge_regression/california_housing.ipynb: Measure the performance of different ridge regression models for predicting housing values.
- example/ridge_regression/pollution.ipynb: Build ridge regression models to predict mortality rates from air quality.
- example/warped_linear_regression/boston_housing.ipynb: Build a warped linear regression model to predict housing values.
- example/warped_linear_regression/abalone.ipynb: Predict the age of sea snails using warped linear regression.
Documentation
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 Distributions
Built Distributions
Hashes for peak_engines-0.2.3-cp32-abi3-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d760e4df80cb0f88f806847c4feffd2d1b2a9833c1ee25d9f673c56f33bb27de |
|
MD5 | f28f00de9f90226675213b3864e1120c |
|
BLAKE2b-256 | 02e7f96a75dc6d9f9cc4bb9977466dbdd3478152ad14b33ea244e8dbcf92d864 |
Hashes for peak_engines-0.2.3-cp32-abi3-macosx_10_9_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5c548a69eb1cbf04f9ee03a38aaf4e93e09bb338b62babe871948be13a44bb1 |
|
MD5 | b1cf4a9f13391ae4c9386c9a4f634b25 |
|
BLAKE2b-256 | 7053e57fef8838f6e82fd5f0f776d9f167c584a51fdcb22415f96ee764a36ccf |
Hashes for peak_engines-0.2.3-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb5264d7ada69c03c7c84a977a766d028fa7eef2c10edf3dae3a02a19b5f7dbc |
|
MD5 | 85176b6aff22c588ec1f47fcff6acca3 |
|
BLAKE2b-256 | 1e470ae7c5a632341707128830a82168ba108a4d82f6ad761ae7f7a3772bc75a |
Hashes for peak_engines-0.2.3-cp27-cp27mu-macosx_10_9_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d908d7dbc5519015a757755a5e99fbc920dd4ca4c67d2800024accc92437c2e2 |
|
MD5 | fa2e75680bc0699c6ac570ddb7b411f5 |
|
BLAKE2b-256 | a02622a382a74d3d080f0f515664f0d3f39595bc7fa7590d55933b14ccd25ec4 |
Hashes for peak_engines-0.2.3-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ef2bcb15041a9659cbe8c746ca8b8df0cccb550b30fd0d58ab8dfddea6f38b8 |
|
MD5 | 95eb21acdd736cc18796997823c497ad |
|
BLAKE2b-256 | 946efbf84bbe310976ac4ff32b634320def9274cf615d3e8100d697dffb05503 |
Hashes for peak_engines-0.2.3-cp27-cp27m-macosx_10_9_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d75755c8fcc7167277dd51636e6741f7a6ee7533fcedcf6ce2ea99fe35d6d4f |
|
MD5 | 42569dfb1609290c33a3a92e37b9297d |
|
BLAKE2b-256 | d7dde69a7ba9c3bc1bbe1219288a2ad23ec7030aa61e13fa24639c991878dfa2 |