티스토리 뷰
cvxopt.solvers.qp()
- Purpose
2차 프로그램(quadratic program) 에 대한 인터페이스 제공
- Function
- Ex
1. reshape function to
(make matrix P , q)
2. Inequality Constraint
(make matrix G, h)
3. Equality constraint
(make matrix A, b)
4. python
import numpy from cvxopt
import matrix
P = matrix(numpy.diag([1,0]), tc=’d’)
q = matrix(numpy.array([3,4]), tc=’d’)
G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc=’d’)
h = matrix(numpy.array([0,0,-15,100,80]), tc=’d’)
from cvxopt import solvers
sol = solvers.qp(P,q,G,h)
* cvxopt는 별도의 행렬함수를 지원하므로 cvxopt.matrix 사용. (numpy matrix convert 가능)
* 부등호, 등호 제약조건 생략가능
* 참고
http://henryquant.blogspot.kr/
https://courses.csail.mit.edu/6.867/wiki/images/a/a7/Qp-cvxopt.pdf
http://cvxopt.org/userguide/coneprog.html?highlight=cvxopt%20solvers%20qp#cvxopt.solvers.qp
https://gist.github.com/mblondel/586753
- Total
- Today
- Yesterday
- IRR
- numpy
- AWS
- style transfer
- Machine Learning
- 터널링
- butterworth
- detrend
- VPN
- TensorFlow
- scipy
- pandas
- filter
- deep learning
- PYTHON
- FFT
- Computer science
- Rolling
- tacotron
- signal
- database
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |