( A, B )---3*30*2---( 1, 0 )( 0, 1 )
让网络的输入只有3个节点,AB训练集各由6张二值化的图片组成,让差值结构中有6个1, 行分布是0,1,1,1,1,2列分布是2,2,2.统计迭代次数并排序。
差值结构 | A-B | 迭代次数 | 行分布 | 列分布 | 36组平均迭代次数 | 构造平均列 | 平均列 | 列排斥力 | 列排斥能 | |||||||||||||
0 | 1 | 1 | 3*4*4*2*1*0-0*0*0*0*0*0 | 4039 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4071.286 | 2 | 2 | 4 | 14.61111 | 18.61111 | |||
1 | 0 | 0 | 3*4*4*2*1*0-0*0*0*0*0*0 | 4039 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4071.286 | 1 | 1 | ||||||
1 | 0 | 0 | 3*4*4*2*1*0-0*0*0*0*0*0 | 4039 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4071.286 | 1 | 1 | ||||||
0 | 1 | 0 | 3*4*4*2*1*0-0*0*0*0*0*0 | 4039 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4071.286 | 2 | 2 | ||||||
0 | 0 | 1 | 3*4*4*2*1*0-0*0*0*0*0*0 | 4039 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4071.286 | 2 | 2 | ||||||
0 | 0 | 0 | 3*4*4*2*1*0-0*0*0*0*0*0 | 4039 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4071.286 | 0 | |||||||
| 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4071.286 | ||||||||||||
0 | 1 | 1 | 3*4*1*4*2*0-0*0*0*0*0*0 | 4072 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4100.074 | 2 | 2 | 4 | 14.41667 | 18.41667 | |||
1 | 0 | 0 | 3*4*1*4*2*0-0*0*0*0*0*0 | 4072 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4100.074 | 1 | 1 | ||||||
0 | 0 | 1 | 3*4*1*4*2*0-0*0*0*0*0*0 | 4072 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4100.074 | 2 | 2 | ||||||
1 | 0 | 0 | 3*4*1*4*2*0-0*0*0*0*0*0 | 4072 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4100.074 | 1 | 1 | ||||||
0 | 1 | 0 | 3*4*1*4*2*0-0*0*0*0*0*0 | 4072 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4100.074 | 2 | 2 | ||||||
0 | 0 | 0 | 3*4*1*4*2*0-0*0*0*0*0*0 | 4072 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4100.074 | 0 | |||||||
| 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4100.074 | ||||||||||||
0 | 1 | 1 | 3*4*1*2*4*0-0*0*0*0*0*0 | 4115 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4129.241 | 2 | 2 | 4 | 16.25 | 20.25 | |||
1 | 0 | 0 | 3*4*1*2*4*0-0*0*0*0*0*0 | 4115 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4129.241 | 1 | 1 | ||||||
0 | 0 | 1 | 3*4*1*2*4*0-0*0*0*0*0*0 | 4115 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4129.241 | 2 | 2 | ||||||
0 | 1 | 0 | 3*4*1*2*4*0-0*0*0*0*0*0 | 4115 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4129.241 | 2 | 2 | ||||||
1 | 0 | 0 | 3*4*1*2*4*0-0*0*0*0*0*0 | 4115 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4129.241 | 1 | 1 | ||||||
0 | 0 | 0 | 3*4*1*2*4*0-0*0*0*0*0*0 | 4115 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4129.241 | 0 | |||||||
| 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4129.241 | ||||||||||||
1 | 1 | 0 | 6*4*1*1*2*0-0*0*0*0*0*0 | 4110 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4135.623 | 2 | 2 | 4 | 16.38889 | 24.38889 | |||
1 | 0 | 0 | 6*4*1*1*2*0-0*0*0*0*0*0 | 4110 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4135.623 | 2 | 2 | ||||||
0 | 0 | 1 | 6*4*1*1*2*0-0*0*0*0*0*0 | 4110 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4135.623 | 1 | 1 | ||||||
0 | 0 | 1 | 6*4*1*1*2*0-0*0*0*0*0*0 | 4110 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4135.623 | 1 | 1 | ||||||
0 | 1 | 0 | 6*4*1*1*2*0-0*0*0*0*0*0 | 4110 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4135.623 | 2 | 2 | ||||||
0 | 0 | 0 | 6*4*1*1*2*0-0*0*0*0*0*0 | 4110 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4135.623 | 0 | |||||||
| 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4135.623 | ||||||||||||
0 | 1 | 1 | 3*2*4*1*4*0-0*0*0*0*0*0 | 4149 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4172.369 | 2 | 2 | 4 | 17.61111 | 25.61111 | |||
0 | 1 | 0 | 3*2*4*1*4*0-0*0*0*0*0*0 | 4149 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4172.369 | 2 | 2 | ||||||
1 | 0 | 0 | 3*2*4*1*4*0-0*0*0*0*0*0 | 4149 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4172.369 | 1 | 1 | ||||||
0 | 0 | 1 | 3*2*4*1*4*0-0*0*0*0*0*0 | 4149 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4172.369 | 2 | 2 | ||||||
1 | 0 | 0 | 3*2*4*1*4*0-0*0*0*0*0*0 | 4149 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4172.369 | 1 | 1 | ||||||
0 | 0 | 0 | 3*2*4*1*4*0-0*0*0*0*0*0 | 4149 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4172.369 | 0 | |||||||
| 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4172.369 | ||||||||||||
0 | 1 | 1 | 3*2*1*4*4*0-0*0*0*0*0*0 | 4175 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4201.082 | 2 | 2 | 4 | 18.91667 | 26.91667 | |||
0 | 1 | 0 | 3*2*1*4*4*0-0*0*0*0*0*0 | 4175 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4201.082 | 2 | 2 | ||||||
0 | 0 | 1 | 3*2*1*4*4*0-0*0*0*0*0*0 | 4175 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4201.082 | 2 | 2 | ||||||
1 | 0 | 0 | 3*2*1*4*4*0-0*0*0*0*0*0 | 4175 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4201.082 | 1 | 1 | ||||||
1 | 0 | 0 | 3*2*1*4*4*0-0*0*0*0*0*0 | 4175 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4201.082 | 1 | 1 | ||||||
0 | 0 | 0 | 3*2*1*4*4*0-0*0*0*0*0*0 | 4175 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4201.082 | 0 | |||||||
| 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 4201.082 |
共有6组,
构造平均列 | ||||||
0 | 1 | 1 | 2 | 2 | ||
0 | 1 | 0 | 2 | |||
0 | 0 | 1 | 2 | |||
1 | 0 | 0 | 1 | |||
1 | 0 | 0 | 1 | |||
0 | 0 | 0 |
在结构中黄色的两个1的顶部是0,绿色的两个1顶部对应的是1,为区分这种情况,让黄色的两个1的面值就是1,让绿色的两个1的面值是列数量的和2.
设差值结构的行为x列为y,a,b为差值结构点的面值
按照计算列排斥力和列排斥能的方法分别计算各组,得到表格
A-B | 36组平均迭代次数 | 列排斥力 | 列排斥能 |
3*4*4*2*1*0-0*0*0*0*0*0 | 4071 | 14.61111 | 18.61111 |
3*4*1*4*2*0-0*0*0*0*0*0 | 4100 | 14.41667 | 18.41667 |
3*4*1*2*4*0-0*0*0*0*0*0 | 4129 | 16.25 | 20.25 |
6*4*1*1*2*0-0*0*0*0*0*0 | 4136 | 16.38889 | 24.38889 |
3*2*4*1*4*0-0*0*0*0*0*0 | 4172 | 17.61111 | 25.61111 |
3*2*1*4*4*0-0*0*0*0*0*0 | 4201 | 18.91667 | 26.91667 |
比较迭代次数曲线和排斥力和排斥能的曲线
可以根据排斥能去排序迭代次数。
平均列还有一种特殊的情况,比如用0,3,3,3,3,6反向的构造差值结构
A | B | C | ||||||||
1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | ||
1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | ||
0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | ||
1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | ||
0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | ||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||
A1 | B1 | C1 | ||||||||
1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | ||
0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | ||
1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | ||
0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | ||
1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | ||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
因为全0列对迭代次数没有影响,可以得到A-C1共6种可能,A和A1;B和B1,C和C1之间没有列顺序。但是A,B,C之间甚至也没有行顺序。因此这个平均列不仅丢失了差值结构的列顺序信息,甚至行顺序信息也丢失了,测量他们的迭代次数得到
差值结构 | A-B | 迭代次数 | 行分布 | 列分布 | 36组平均迭代次数 | 构造平均列 | 平均列 | 列排斥力 | 列排斥能 | |||||||||||||
1 | 1 | 0 | 6*4*2*4*2*0-0*0*0*0*0*0 | 3367.9 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3377.191 | 3 | 3 | 6 | 58.125 | 76.125 | |||
1 | 0 | 0 | 6*4*2*4*2*0-0*0*0*0*0*0 | 3367.9 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3377.191 | 3 | 3 | ||||||
0 | 1 | 0 | 6*4*2*4*2*0-0*0*0*0*0*0 | 3367.9 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3377.191 | 3 | 3 | ||||||
1 | 0 | 0 | 6*4*2*4*2*0-0*0*0*0*0*0 | 3367.9 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3377.191 | 3 | 3 | ||||||
0 | 1 | 0 | 6*4*2*4*2*0-0*0*0*0*0*0 | 3367.9 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3377.191 | 3 | 3 | ||||||
0 | 0 | 0 | 6*4*2*4*2*0-0*0*0*0*0*0 | 3367.9 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3377.191 | 0 | |||||||
| 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3377.191 | ||||||||||||
1 | 1 | 0 | 6*2*4*4*2*0-0*0*0*0*0*0 | 3376.9 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3379.389 | 3 | 3 | 6 | 58.125 | 76.125 | |||
0 | 1 | 0 | 6*2*4*4*2*0-0*0*0*0*0*0 | 3376.9 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3379.389 | 3 | 3 | ||||||
1 | 0 | 0 | 6*2*4*4*2*0-0*0*0*0*0*0 | 3376.9 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3379.389 | 3 | 3 | ||||||
1 | 0 | 0 | 6*2*4*4*2*0-0*0*0*0*0*0 | 3376.9 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3379.389 | 3 | 3 | ||||||
0 | 1 | 0 | 6*2*4*4*2*0-0*0*0*0*0*0 | 3376.9 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3379.389 | 3 | 3 | ||||||
0 | 0 | 0 | 6*2*4*4*2*0-0*0*0*0*0*0 | 3376.9 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3379.389 | 0 | |||||||
| 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3379.389 | ||||||||||||
1 | 1 | 0 | 6*4*4*2*2*0-0*0*0*0*0*0 | 3379.3 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3379.697 | 3 | 3 | 6 | 58.125 | 76.125 | |||
1 | 0 | 0 | 6*4*4*2*2*0-0*0*0*0*0*0 | 3379.3 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3379.697 | 3 | 3 | ||||||
1 | 0 | 0 | 6*4*4*2*2*0-0*0*0*0*0*0 | 3379.3 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3379.697 | 3 | 3 | ||||||
0 | 1 | 0 | 6*4*4*2*2*0-0*0*0*0*0*0 | 3379.3 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3379.697 | 3 | 3 | ||||||
0 | 1 | 0 | 6*4*4*2*2*0-0*0*0*0*0*0 | 3379.3 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3379.697 | 3 | 3 | ||||||
0 | 0 | 0 | 6*4*4*2*2*0-0*0*0*0*0*0 | 3379.3 | 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3379.697 | 0 | |||||||
| 0 | 1 | 1 | 1 | 1 | 2 | 0 | 3 | 3 | 3379.697 |
事实上这3组的迭代次数几乎没有差别,可以认为是相同的。所以尽管这种平均列的构造方法无法保存这3个结构的行顺序信息,但神经网络本身也无法区分这3个结构。因此用这种平均列的方法把神经网络压缩为一个维度是有内在合理性的。