Questions tagged [quadratic-programming]

Quadratic programming (QP) is a special type of mathematical optimization problem. It is the problem of optimizing (minimizing or maximizing) a quadratic function of several variables subject to linear constraints on these variables.

Quadratic programming (QP) is a special type of mathematical optimization problem. It is the problem of optimizing (minimizing or maximizing) a quadratic function of several variables subject to linear constraints on these variables.

237 questions
0
votes
0 answers

quadratic programming in R

I have looked at some different optimizing approaches in R to solve my optimization solution, but it seems that all the algorithms don't work for my Problem. I have the following Problem: m=n-1 #length option sample (...) n=5 Dmat <-…
RBeginner
  • 244
  • 3
  • 7
0
votes
1 answer

Scipy: solve quadratic with double summation

I'm relatively new to scipy and I'm looking for a guidance. I have an unconstrained minimization problem of the form: Where a and b are coefficients and x is a vector of unknowns (can be of different length). I'm wondering about how to solve this…
0
votes
1 answer

NMath/SolverFoundation claims non-convex model, despite being solvable by Matlab's "quadprog"

I have a quadratic programming problem defined by the Hessian H and the vector c. This problem is in a reference solved using Matlab's quadprog function like that result = quadprog(H, c, [], [], [], [], lb, ub, init, opts); lb and ub are vectors of…
Jens
  • 6,275
  • 2
  • 25
  • 51
0
votes
3 answers

C++: How do you determine if a solution is trivial or doesn't exist for a quadratic function?

I'm working on a program that's supposed to calculate the roots of a quadratic function and output its roots. However, the output is not what it should be for all cases. When it's supposed to have no solutions or be trivial, it outputs as -nan(ind).…
0
votes
1 answer

Rcpp zeros of a quadratic equation in two variables

I am new to Rcpp so I apologize in advance if this question is simple to answer. I searched on the web but couldn't find much help and I am hoping the savviness in this forum can help me! I have an existing code in R using Rcpp, and I need to add to…
DSSY
  • 1
0
votes
2 answers

Constraint functions on FMIN_COBYLA (scipy optimize)

I'm on Scipy Optimize, using the fmin_cobyla function. I've struggled to write constraint functions that: make sure all items sum up to 1 make sure all items >= 0 Does anyone have insight? For fmin_slsqp, for example, I had a function: def…
0
votes
1 answer

how to use QP=Quadratic Programming in svm

I am using svm for anomaly detection as follow svmStruct = svmtrain(tr,label,'kernel_function','rbf','ShowPlot',true); ok1 = svmclassify(svmStruct,test1,'ShowPlot',true); default separating hyperplane method is SMO but I want to use QP i.e.…
ram om
  • 23
  • 1
  • 5
0
votes
1 answer

Find optimal vector that minimizes function

I am trying to find a vector that minimizes the residual sum of squares when multiplying a matrix. I know of scipy's optimize package (which has a minimize function). However, there is an extra constraint for my code. The sum of all entries of w…
0
votes
0 answers

Solve quadratic optimization with nonlinear constraints

I'm trying to solve the following quadratic programming problem:  minw wTΣw, s.t. wTe = 1, st. ‖w‖1 ≤ δ Where A is an identity matrix, Sigma is a covariance matrix and e is a vector of ones. The first constraint ensures that the solution adds up to…
tzi
  • 67
  • 1
  • 5
0
votes
1 answer

How do you plot nonlinear quadratic system?

Consider the following system of two nonlinear (quadratic) equations with = 0.400256 and = 0.916403. − + − + ^2 = 0 − + + − ^2 = 0 Plot the two implicit equations and observe that there are two solutions: one at the origin and the other one…
A. T
  • 19
  • 4
0
votes
1 answer

Is the Pearson correlation coefficient a suitable objective function for quadratic programming solvers?

Is the Pearson correlation coefficient -- with one vector, x, exogenous and another vector, y, as a choice variable -- a suitable quadratic objective function for quadratic programming solvers like Gurobi?
Shane
  • 447
  • 2
  • 6
  • 18
0
votes
1 answer

State of the art non-convex QCQP solver?

Do you know a non-convex QCQP solver? A big deal will be a software free for academics or students. I tried to find such solver without success... My problem is in the following form: with linear (strict and non strict) inequalities with logical…
0
votes
0 answers

Weighted Least Squares with constraints on coefficients using quadprog

I'm having difficulties using R's quadprog library to implement weighted least squares with 2 restrictions. The first restriction is that all the coefficients need to be greater than or equal to 0. The second restriction is that the coefficients…
Zslice
  • 412
  • 1
  • 5
  • 14
0
votes
1 answer

Can Cplex take two sparse matrices as input for Q

I am trying to minimize a very large binary quadratic programming problem with linear constraints using the CPLEX MATLAB API. However the quadratic function f = x'Qx has a very dense matrix Q. I can rewrite Q with very sparse matrices U and A: Q = U…
0
votes
0 answers

How to calculate a projection matrix for nonnegative constrained least squares?

Suppose we have a data vector z in R^p and a training data matrix X in R^(p*N), where N (N>p) is the number of samples in the training data matrix. If we'd like to find the projection of z to the linear subspace spanned by the columns of X, then we…