【发布时间】:2016-09-09 10:11:58
【问题描述】:
我在这里写了一个二维融合套索代码。
[m n] = size(circle);
cvx_begin
variable theta(m, n);
minimize( norm(circle-theta, 'fro'));
subject to
sum(sum(abs(theta(:,1:n-1)-theta(:,2:n)))) == 0;
sum(sum(abs(theta(1:m-1,:)-theta(2:m,:)))) == 0;
cvx_end
奇怪的是,节目报告,
在 cvxprob 中(第 28 行)在 cvx_begin 中(第 41 行)使用 cvxprob/newcnstr 时出错(第 192 行)有纪律的凸编程错误:
无效约束:{convex} == {constant}== 中的错误(第 12 行) b = newcnstr( evalin( 'caller', 'cvx_problem', '[]' ), x, y, '==' );
在我删除约束中的abs() 后,程序可以运行,但这不是我期望的约束。
【问题讨论】:
-
嗯什么。那不是 MATLAB 代码,是吗?
-
使用MATLAB下的cvx包
标签: matlab machine-learning convex-optimization cvx