Skip to main content

CvxFit is a package which provides classes for fitting convex functions to given data. Typical usage looks like this:

#!/usr/bin/env python

from cvxfit import CvxFit
import scipy as sp

#Generate data
N = 100
n = 4

def f_actual(x):
    return sp.sum(x*x)

X = sp.randn(N, n)
Y = sp.array([f_actual(pt) for pt in X])

#Initialize object with 5 affine functions
fit_object = CvxFit(X=X, Y=Y, type='pwl', k=5)

#Perform fit
fit_object.fit()

#Compare fits at (1,1,1,1)
pt = sp.ones((1, n))
print 'Actual value: ' + f_actual(pt)
print 'Approximate value: ' + fit_object.evaluate(pt)

Authors

This package was written and tested by Mainak Chowdhury, Alon Kipnis and Milind Rao.

Acknowledgements

This package came out of a course project for EE364b at Stanford University, Spring 2013-14, taught by Prof. Stephen Boyd. We would like to thank all members of the awesome teaching staff for their useful feedback and constructive suggestions.

Metadata

Release files for cvxfit 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cvxfit 0.1.1
File Size Uploaded Provenance Actions
cvxfit-0.1.1.tar.gz 7.1 kB Without provenance Details for cvxfit-0.1.1.tar.gz

Release files / cvxfit-0.1.1.tar.gz

Download URL cvxfit-0.1.1.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4e2c295f1340c9e35e0640deea8325f6c9a5c0852cae83af687a67d38e95452a
BLAKE2b-256 checksum
How to use checksums
78c0566af1fddc4e33b1fe6691977dd678dbb0eb6ede2b82214273b36128cf74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for cvxfit 0.1.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page