C*********g 发帖数: 3728 | 1 ab=constant1
bc=constant2
cd=constant3
de=constant4
ef=constant5
ac=constant6
be=constant7
.
.
.
a,b,c,d,e,f,g,h...are variables within range of 0 to 1,size of this function
array is huge.
有没有办法化成某一种最小二乘法?最好是matlab或者IDL
多谢。 |
sc 发帖数: 122 | 2 log一下不就变得很简单了?
【在 C*********g 的大作中提到】 : ab=constant1 : bc=constant2 : cd=constant3 : de=constant4 : ef=constant5 : ac=constant6 : be=constant7 : . : . : .
|
C*********g 发帖数: 3728 | 3 天才阿!
但是怎么加上变量都在0-1区间的约束呢?
多谢!
【在 sc 的大作中提到】 : log一下不就变得很简单了?
|
r****y 发帖数: 1437 | 4
ab = const1
bc = const2
ac = const6
overconstrained set of equations?
【在 C*********g 的大作中提到】 : 天才阿! : 但是怎么加上变量都在0-1区间的约束呢? : 多谢!
|
r****y 发帖数: 1437 | 5
maybe this works
let a priori covariance matrix as
Sa = diag{0.25, 0.25, ...}
first guess [0.5, 0.5, ...]
minimize
(y-Kx)'(y-Kx) + x'Sax
【在 C*********g 的大作中提到】 : 天才阿! : 但是怎么加上变量都在0-1区间的约束呢? : 多谢!
|
r****y 发帖数: 1437 | 6
or set the cost function as
(y-Kx)'(y-Kx) + L(x)
L(x) is infinite (in code, a very very large number) if any x>1 or <0
is 0 of 0
【在 r****y 的大作中提到】 : : maybe this works : let a priori covariance matrix as : Sa = diag{0.25, 0.25, ...} : first guess [0.5, 0.5, ...] : minimize : (y-Kx)'(y-Kx) + x'Sax
|
c*******e 发帖数: 8624 | 7 do an svd decomposition
in matlab, let x = pinv(A)*b
【在 r****y 的大作中提到】 : : or set the cost function as : (y-Kx)'(y-Kx) + L(x) : L(x) is infinite (in code, a very very large number) if any x>1 or <0 : is 0 of 0
|
c*******e 发帖数: 8624 | 8 not sure about the 0 to 1 thing, hehe
do an svd decomposition
in matlab, let x = pinv(A)*b
【在 c*******e 的大作中提到】 : do an svd decomposition : in matlab, let x = pinv(A)*b
|
sc 发帖数: 122 | 9 不知道。
这个方程组也不知道是over constrain还是under constrain呢
线性代数方程组在这两个情况下都可以google出来吧?
我没goo过,不知道啊..
【在 C*********g 的大作中提到】 : 天才阿! : 但是怎么加上变量都在0-1区间的约束呢? : 多谢!
|
c*******e 发帖数: 8624 | 10 in the least square sense.
【在 sc 的大作中提到】 : 不知道。 : 这个方程组也不知道是over constrain还是under constrain呢 : 线性代数方程组在这两个情况下都可以google出来吧? : 我没goo过,不知道啊..
|
C*********g 发帖数: 3728 | 11 对不起,这段没有明白,你是给出的加边界条件的方法吗?多谢了
【在 r****y 的大作中提到】 : : or set the cost function as : (y-Kx)'(y-Kx) + L(x) : L(x) is infinite (in code, a very very large number) if any x>1 or <0 : is 0 of 0
|
C*********g 发帖数: 3728 | 12 是啊,我看到sc的log一下子觉得就有救了,matlab里面svd那么快,咔咔
【在 c*******e 的大作中提到】 : do an svd decomposition : in matlab, let x = pinv(A)*b
|