鉴于<代码>A、b
和L2规范化参数beta = 0
,为什么<代码>ridge和>>><
给出两种不同的解决办法?
b = [ 0
-2
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3 ];
A = [
1 0 0 0
0.750000000000000 0.250000000000000 0 0
0.500000000000000 0.500000000000000 0 0
0.250000000000000 0.750000000000000 0 0
0 1 0 0
0 0.750000000000000 0.250000000000000 0
0 0.500000000000000 0.500000000000000 0
0 0.250000000000000 0.750000000000000 0
0 0 1 0
0 0 0.750000000000000 0.250000000000000
0 0 0.500000000000000 0.500000000000000
0 0 0.250000000000000 0.750000000000000
0 0 0 1
];
>> ridge(b, A, 0,0)
ans =
0.6942
-0.1856
0
-0.0468
>> A b
ans =
-0.8604
-3.4188
-2.8970
-3.0343