|ART

|ART

Adaptive Resonance Theory, ART Boston G. A.Carpenter 1976 G. A.Carpenter ART G. A.Carpenter S.Grossberg ATR ART ART ART ART ART ART ART I

@[toc]

1.

ART

ART ART

2. ART I

2.1

2.1.1

ART I C R 3 R G1 G2

2.1.2 C

n 3 R G1G_1 C 2/3 G1=1G_1 = 1 0 2/3 C C=XC=X G1=0G_1=0 2/3 C xi = tij ci=xic_i = x_i ci=0c_i=0 G1G_1 G1G_1 C G1G_1 C cic_i xix_i tijt_{ij} 1 cic_i 1 0 R C

2.1.3 R

R m m m C C R R 1 0 R C R R C

2.1.4

G2G_2 XX 0 X xi 0 G2=0 G2=1 R R0R_0 G1=G2G_1=G_2 R0R_0 R 0 XX 0 G1G_1 1 G1G_1 0 G1G_1 G1 C G1G_1 C ci xi tij 1 cic_i 1 0 Reset R TjT_j XX Reset

2.2

R R R A. B. R A B 4

2.2.1

X=0X=0 0 XX G1=1G_1=1 C R R BjB_j netj=BjTX= i=1nbijxinet_j=B_j^{T}X=\sum_{i=1}^n b_{ij}x_i netj =max j{netj}net_j^*=\max_j\{net_j\} rj =1r_j^*=1 0.

2.2.2

Tj T^ _j 0 _0 N0=XTtj = i=1ntij xi= i=1nciN_0=X^Tt_j^*=\sum_{i=1}^n t_{ij}^* x_i=\sum_{i=1}^n c_i xix_i N0N_0 1 0 N1N_1 N1= inxiN_1=\sum_i^n x_i \rho 0 10~1 N0/N1< N_0/N_1 </rho XX Tj T_j^* Reset N0/N1> N_0/N_1 >/rho XX XX Tj T_j^*

2.2.3

Reset R R0=0R_0=0,G1=1G_1=1, tj t^ _j R Bj B^ _j Tj T^ _j 1

2.2.4

Tj T^ _j Bj B^ _j R

2.3

ART I (1) C R BjB_j bij(0)=11+nb_{ij}(0) =/frac{1}{1+n} R C TjT_j 1 1 0~1 (2) X=(x1,x2,...,xn),xi (0,1)nX=(x_1, x_2,...,x_n), x_i/in (0,1)^n (3) R BjB_j XX BjTX= i=1nbijxiB_j^TX=\sum_{i=1}^n b_{ij}x_i (4) R J J^ j j^ rj =1,else,rj=0r^*_j=1, else, r_j=0 (5) R j T j C Tj T^ _j X ci=tij c_i=t^ _{ij} N1= 1nxi,N0= 1nciN_1=\sum_1^n x_i,N_0=\sum_1^n c_i (6) \rho (7) (8) R j j^ tij (t+1)=tij xit_{ij}^*(t+1)=t_{ij}^*x_i bij (t+1)=tij (t)xi0.5+ i=1ntij (t)xi=tij (t+1)0.5+ i=1ntij (t+1)b_{ij}^*(t+1)=\frac{t_{ij}^*(t)x_i}{0.5+\sum_{i=1}^n t_{ij}^*(t)x_i}=\frac{t_{ij}^*(t+1)}{0.5+\sum_{i=1}^n t_{ij}^*(t+1)} 0.5

2.4 ART I

""" ART1 author Toby """ import numpy as np def ART_learn(train_data_active, weight_t_active, weight_b_active, n): weight_t_update = train_data_active * weight_t_active weight_b_update = weight_t_update/(0.5 + np.sum(weight_t_update)) return weight_t_update, weight_b_update def ART_core(train_data, R_node_num, weight_b, weight_t, threshold_ro, n): data_length, data_num = train_data.shape result= np.zeros(data_num) for i in range(data_num): R_node = np.zeros(R_node_num) for n in range(R_node_num): net = [] for j in range(R_node_num): net.append(np.sum(np.dot(train_data[:,i], weight_b[:,j]))) j_max = np.where(net == np.max(net))[0][0] if R_node[j_max] == 1: net[j_max] = -n j_max = np.where(net == np.max(net))[0][0] R_node[j_max] = 1 weight_t_active = weight_t[:, j_max] weight_b_active = weight_b[:, j_max] Similarity_N0 = np.sum(weight_t_active*train_data[:,i]) Similarity_N1 = np.sum(train_data[:,1]) flag = 1 if threshold_ro < Similarity_N0/Similarity_N1: weight_t[:,j_max], weight_b[:,j_max] = ART_learn(train_data[:,i], weight_t_active, weight_b_active, j_max) print(' %d %d/n'%(i, j_max)) result[i] = j_max flag = 0 break if flag == 1: R_node_num = R_node_num + 1 if R_node_num == data_num + 1: print(' %d %d/n : %d/n'%(i, R_node_num, R_node_num)) return R_node_num,weight_b,weight_t,result weight_b = np.column_stack((weight_b, train_data[:,i])) weight_t = np.column_stack((weight_t, np.ones(data_length))) print(' %d %d/n'%(i, R_node_num)) result[i] = R_node_num return R_node_num,weight_b,weight_t,result train_data=np.array([[0,0,0,1,1,1,0], [0,0,0,1,1,0,0], [0,0,0,1,0,1,1], [1,0,1,0,1,0,1], [1,1,1,0,1,0,0], [1,1,0,0,0,0,1]]) data_length, data_num = train_data.shape N = 100 R_node_num = 3 weight_b = np.ones([data_length, R_node_num])/N weight_t = np.ones([data_length, R_node_num]) threshold_ro = 0.5 result_pre = np.zeros(data_num) IsOver = False for n in range(10): R_node_num, weight_b, weight_t, result = ART_core(train_data, R_node_num, weight_b, weight_t, threshold_ro,n) for i in range(min(len(result), len(result_pre))): IsOver = True if result[i] != result_pre[i]: IsOver = False break if IsOver: print(' ') break if R_node_num == data_num+1: print(' ') print("------------------------") result_pre = result

0 0

1 0

2 1

3 2

4 1

5 2

6 4


0 3

1 0

2 1

3 2

4 1

5 2

6 3


0 0

1 0

2 1

3 2

4 1

5 2

6 3


0 0

1 0

2 1

3 2

4 1

5 2

6 3

3 .

ART 1 ART I C R CMOS