代码拉取完成,页面将自动刷新
同步操作将从 laozibabac/Bio_CN_Parser 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#! /usr/bin/python
import brain_util as bu
import simulations
import unittest
class TestBrainFunction(unittest.TestCase):
def test_projection(self):
w = simulations.project_sim(1000000, 1000, 0.001, 0.05, 25)
self.assertEqual(w[-2], w[-1])
def test_pattern_completion(self):
(_, winners) = simulations.pattern_com(
100000, 317, 0.05, 0.05, 25, 0.5, 5)
self.assertGreaterEqual(bu.overlap(winners[24], winners[29]), 300)
def test_association(self):
(_, winners) = simulations.association_sim(100000, 317, 0.05, 0.1, 10)
self.assertLessEqual(bu.overlap(winners[9], winners[19]), 2)
self.assertGreaterEqual(bu.overlap(winners[9], winners[29]), 100)
self.assertGreaterEqual(bu.overlap(winners[19], winners[29]), 100)
self.assertGreaterEqual(bu.overlap(winners[9], winners[39]), 20)
def test_merge(self):
(w_a, w_b, w_c) = simulations.merge_sim(100000,317,0.01,0.05,50)
self.assertLessEqual(w_a[-1], 3200)
self.assertLessEqual(w_b[-1], 3200)
self.assertLessEqual(w_c[-1], 6400)
if __name__ == '__main__':
unittest.main()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。