Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document functions #5

Open
cheater opened this issue Aug 1, 2017 · 2 comments
Open

Document functions #5

cheater opened this issue Aug 1, 2017 · 2 comments

Comments

@cheater
Copy link
Contributor

cheater commented Aug 1, 2017

Maybe write short one liners that tell users what things like berhu, huber, quadform, hmax, hmin do - they are difficult to understand like that. Giving a link to a wikipedia article for further explanation is good too.

@chrisnc
Copy link
Owner

chrisnc commented Aug 3, 2017

hmin and hmax are just min and max, but named so as not to conflict with the definitions in the Prelude.

huber is the Huber loss function: quadratic loss for small |x|, and linear elsewhere.
Described here: https://en.wikipedia.org/wiki/Huber_loss

berhu is the reverse Huber loss function. Linear loss for small |x|, and quadratic elsewhere. The name is borrowed from CVX: https://github.com/cvxr/CVX/blob/master/functions/berhu.m

quadform is the quadratic form: x'*Q*x for vector x and matrix Q, which is convex if Q is positive definite, but can't be recognized as such in DCP without the quadform primitive.

If you would like to open a PR to add docstrings for these and others that would be to your liking, I will happily merge it, but I don't really have the time or the will to actively maintain this project.

@cheater
Copy link
Contributor Author

cheater commented Aug 7, 2017

thanks for the info, that's good enough for me for now. I'll leave the issue open so these may be added as doc strings in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants