![]() |
#11
|
|||
|
|||
![]()
@jbaker, make sure you're not creating test cases with all points on the same side of the line (see instructions). Maybe then you won't get the positive definite complaint.
|
#12
|
|||
|
|||
![]()
I use a built-in command qp in octave.
http://www.gnu.org/software/octave/d...ogramming.html It seems to work, but I am not sure it can do well like cvxopt and other packages. |
#13
|
|||
|
|||
![]() Quote:
|
#14
|
|||
|
|||
![]()
what kind of problems? I have a Mac running Lion and installed cvxopt without a glitch...
|
#15
|
|||
|
|||
![]()
Yes, I caught the not-all-on-one-side requirement.
Now I've tried both in R and also using the CGAL library with C++, but the latter is also complaining that Q is not positive semidefinite! Which makes me think that I'm just being silly and constructing Q wrong. If you have points x_(d,i) where d = {1,2} is the dimension and i = {1..N}, with response y_(i) in {-1, 1}, then the matrix elements are Q_(ij) = y_(i) * y_(j) * sum_d [ x_(d,i) * x_(d,j) ] Right? |
#16
|
|||
|
|||
![]() Quote:
How did you install it? |
#17
|
|||
|
|||
![]()
@jbaker, I didn't have to go that far into the weeds, as I used an SVM package as opposed to a QP package. If you ignore the warnings, are you getting a sensible number of support vectors out? If you aren't, there definitely is a problem.
I don't see a problem with your formulation for Q, but again I didn't go that route. Someone else might see a problem that I missed. Last edited by dudefromdayton; 05-20-2012 at 03:45 PM. Reason: UPDATED |
#18
|
|||
|
|||
![]()
@alfansome, are you okay on the second paragraph from the cvxopt installation instructions? I haven't done this myself, but I looked it up.
"The package requires version 2.7 or 3.x of Python, and is built from source, so the header files and libraries for Python must be installed, as well as the core binaries. "The installation requires either ATLAS or BLAS + LAPACK. Using architecture optimized ATLAS libraries is recommended and gives a large performance improvement over standard BLAS & LAPACK libraries. Both header files and libraries must be installed." |
#19
|
|||
|
|||
![]() Quote:
Did you install it globally or only for a specific user? I don't know if it changes anything, but I installed it as root -- sudo python setup.py install -- on my machine. |
#20
|
|||
|
|||
![]()
After way too much sanity checking, I convinced myself that one should indeed plow ahead despite the positive-definiteness alarms. However in order to get CGAL not to abort, you have to #define CGAL_QP_NO_ASSERTIONS before including the headers!
![]() CGAL seems pretty slick, btw. |
![]() |
Tags |
hw7, package, quadratic programming |
Thread Tools | |
Display Modes | |
|
|