-
Notifications
You must be signed in to change notification settings - Fork 0
/
sparse_bls.m
37 lines (34 loc) · 1.07 KB
/
sparse_bls.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function wk = sparse_bls(A,b,lam,itrs)
%
% note: built upon previously released codes (https://broadlearning.ai/)
%
% Chen and Liu 2017: Chen, C. P., & Liu, Z. (2017). Broad learning system:
% An effective and efficient incremental learning system
% without the need for deep architecture. IEEE
% transactions on neural networks and learning systems,
% 29(1), 10-24.
%
% Chen et al. 2018: Chen, C. P., Liu, Z., & Feng, S. (2018). Universal
% approximation capability of broad learning system and
% its structural variations. IEEE transactions on neural
% networks and learning systems, 30(4), 1191-1204.
%
AA = (A') * A;
m = size(A,2);
n = size(b,2);
x = zeros(m,n);
wk = x;
ok=x;uk=x;
L1=eye(m)/(AA+eye(m));
L2=L1*A'*b;
for i = 1:itrs,
tempc=ok-uk;
ck = L2+L1*tempc;
ok=shrinkage(ck+uk, lam);
uk=uk+(ck-ok);
wk=ok;
end
end
function z = shrinkage(x, kappa)
z = max( x - kappa,0 ) - max( -x - kappa ,0);
end