similar to: minimization a quadratic form with some coef fixed and some constrained

Displaying 20 results from an estimated 1100 matches similar to: "minimization a quadratic form with some coef fixed and some constrained"

2006 Jan 13
3
Can I ask for the C code inside an R function using .C?
Hello, all, It is a general question, but I couldn't find the answer elsewhere. I am using an R function using .C but don't understand one of its behaviors without the C code. I am wondering the so-called 'open source'. It doesn't include the C code together with the R function, does it? So what I want to ask is whether it is justified, possible or polite to ask for the C
2008 Aug 15
2
How to substitute special characters within a data frame?
Hello all, I have a data frame in R, imported from an excel file in Swedish. The original file contains several columns that have special characters, such as \¨{a}, \¨{o}, and so on. After import such special characters are represented in the data frame by "\\345", "\\366" etc (don't ask me why). For example, a word "Hårkan" becomes ''H\\345rkan".
2005 Jun 03
2
using so-library involving Taucs
Dear R developers, The trace of the hat matrix H~(n,n) is computed as follows: tr(H) = tr(BS^-1B') = tr(S^-1B'B) := tr(X) = sum(diag(X)) with B~(n,p), S~(p,p). Since p is of the order 10^3 but S is sparse I would like to employ Taucs linear solver ( http://www.tau.ac.il/~stoledo/taucs/ ) on SX = B'B. (Further improvement by implying a looping over i=1,...,p, calling
2012 May 08
3
Numerical integration of a two dimensional function over a disk
Hello, there!   Basically my problem is very clear. I would like to take a (numerical) integration of a function f(x,y) which can be quite complex of x and y, over a disk (x-a)^2+(y-b)^2<= r^2 (with r constant). However, after some search in R, I just cannot find a function in R that suits my purpose. Function Integrate applies to one dimensional, and adaptIntegrate to rectangle. In my case, it
2006 Mar 20
1
help on regression
Dear R-users, I would like to know if there is any way to minimize || y - Xb||^2 under the constraint b'b=1. Thank you Giancarlo
2014 Aug 10
2
New Python API? (was: Re: About the return value of value_value)
(renaming subject as I am partially getting off-topic) On Sunday 10 August 2014 16:26:07 Richard W.M. Jones wrote: > > The next issue I see now is about the value_value function. This is > > briefly documented as: "return data length, data type and data of a > > value". > > > > For Perl, Python and OCaml, this is not true. A tuple is returned > >
2009 Nov 25
1
R: Re: R: Re: chol( neg.def.matrix ) WAS: Re: Choleski and Choleski with pivoting of matrix fails
Dear Peter, thank you very much for your answer. My problem is that I need to calculate the following quantity: solve(chol(A)%*%Y) Y is a 3*3 diagonal matrix and A is a 3*3 matrix. Unfortunately one eigenvalue of A is negative. I can anyway take the square root of A but when I multiply it by Y, the imaginary part of the square root of A is dropped, and I do not get the right answer. I tried
2004 Oct 06
0
quadratically constrained quadratic programming
Hi, Does anybody have experience to solve an quadratic programming problem with quadratic constraints in R? It seems that the package "quadprog" only handles the quadratic programming with linear constraint. My probelm is to maximze x^T\Sigma_{xy} y, subject to x^Tx=1, y^T\Sigma_{yy} y=1, and sum(y)<t, or sum(y)=t, where x and y are the variable, and the Sigma's and t are
2012 Apr 17
1
What functions are available for Quadratically Constrained Quadratic Programming in R?
Hi all, Could anybody please point me to the solver function in R on QCQP? The quadprog package seems to be only able to handle the linear constraints... Thank you! [[alternative HTML version deleted]]
2004 Aug 11
0
always NaN after some running in R, but all fine in S-plus
Hello, S-plus and R helpers,(sorry for cross-post) I wrote some simple C code for one likelihood to be optimized (using optim(MASS)). I use same function, same data, same starting points and same DLL in R and S-plus for comparison. (I compiled it with 'Rcmd SHLIB likelihood.c' and the header files of it include only R.h and math.h). While it works quite fine in S-plus, it forever returns
2007 Jan 24
1
Matrix question: obtaining the square root of a positive definite matrix?
I want to compute B=A^{1/2} such that B*B=A. For example a=matrix(c(1,.2,.2,.2,1,.2,.2,.2,1),ncol=3) so > a [,1] [,2] [,3] [1,] 1.0 0.2 0.2 [2,] 0.2 1.0 0.2 [3,] 0.2 0.2 1.0 > a%*%a [,1] [,2] [,3] [1,] 1.08 0.44 0.44 [2,] 0.44 1.08 0.44 [3,] 0.44 0.44 1.08 > b=a%*%a i have tried to use singular value decomposion > c=svd(b) > c$u%*%diag(sqrt(c$d))
2012 Jul 31
1
about changing order of Choleski factorization and inverse operation of a matrix
Dear All, My question is simple but I need someone to help me out. Suppose I have a positive definite matrix A. The funtion chol() gives matrix L, such that A = L'L. The inverse of A, say A.inv, is also positive definite and can be factorized as A.inv = M'M. Then A = inverse of (A.inv) = inverse of (M'M) = (inverse of M) %*% (inverse of M)' = ((inverse of
2005 Mar 24
1
How to stop the minimization when the condition does not hold
Dear experts! I have a minimization problem with non-linear constraint and Objective function(theta)=lambda*(Constr)^2-f(x,theta). Theta is a vector of parameters. I'd like to stop the optimization after the value of the constraint is less or equal some constant value, say d, and save the last computed value of the function. For this purpose, I thought to define the Objective function like
2017 Jun 20
1
Can I use tabu search for minimization problem ?
Hi all, I want to use tabu search to solve my minimization problem. but tabu search in R is for maximization, so I turn my function from f to -f? but the eUtilityKeep always be 0 from the second position. I have go through a part of source code found that it always give the default value to compare, move <- ifelse(maxTaboo > maxNontaboo & maxTaboo > aspiration,
2011 Oct 12
2
Minimization/Optimization under functional constraints
Hi, I hope someone can help me with the following issue. I need find the minimum beta that satisfies the following: inf{beta>0 | f(x+beta*f(x))*f(x)<=0} where f() is a function and x is a sample statistic. Functions such as "nlminb" and "constrOptim" minimize a function and output the parameter (under parameter constraints). I need to minimize the parameter (also
2004 Jan 09
0
minimization using Powell's method without derivative
Good evening! I have a multi-dimensional minimization problem whose gradient is pretty hard to code. I tried Nelder and Mead method implemented in function optim and it does not work well. I also tried the quasi Newton method in optim using difference as approximate derivative. It does not work well either. I just went through Numerical Recipes book. The book discusses another method without
2010 Feb 09
2
Double Integral Minimization Problem
Hello all, I am trying to minimize a function which contains a double integral, using "nlminb" for the minimization and "adapt" for the integral. The integral is over two variables (thita and radiusb) and the 3 free parameters I want to derive from the minimization are counts0, index and radius_eff. I have used both tasks in the past successfully but this is the first time
2012 May 08
1
Translation of Linear minimization probelm from matlab to r
Hi everyone, i?m a new user of R and i?m trying to translate an linear optimization problem from Matlab into r. The matlab code is as follow: options = optimset('Diagnostics','on'); [x fval exitflag] = linprog(f,A,b,Aeq,beq,lb,ub,[],options); exitflag fval x=round(x); Where: f = Linear objective function vector (vector of 45,rows) A = Matrix for linear inequality
2018 Jan 20
0
Bi variate minimization problem
Dear all, I'm working on the following problem: Assume two datasets: Y, Y that represent the same physical quantity Q. Dataset X contains values of Q after an event A while dataset Y contains values of Q after an event B. In R X, Y are vectors of the same length, containing effectivelly a number of observations of Q in each state. Q is a continous variable. Now, the two datasets should
2000 Sep 13
2
minimization
Hi, I got a code from S that uses 'nlminb' to minimize a function with constraints. Is there a similar function in R? Thanks. R. Heberto Ghezzo Ph.D. Meakins-Christie Labs McGill University Montreal - Canada heberto at meakins.lan.mcgill.ca -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read