本文整理汇总了Python中system.System.dh方法的典型用法代码示例。如果您正苦于以下问题:Python System.dh方法的具体用法?Python System.dh怎么用?Python System.dh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类system.System
的用法示例。
在下文中一共展示了System.dh方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from system import System [as 别名]
# 或者: from system.System import dh [as 别名]
workers = simulate.createHyperbolicWorker(100, r, p, None, 1)
tasks = simulate.createBinaryTasks(1000)
outcomes = [True, False]
horizon = 3
samples = 1024
tutorials = 30
for b in range(1, 20):
belief = float(b)# / 10.0
for q in range(1, 2):
quality = float(q)
resetWorkers(workers)
system = System(outcomes, 1000, {'belief': belief, 'quality': quality})
answers = system.dh(tasks, outcomes, workers, [horizon, samples, tutorials])
count = 0
hired = 0
for i in range(0, len(answers)):
if answers[i][0] == tasks[i]:
count += 1
hired += answers[i][1]
percent = float(count) / float(len(tasks))
print 'belief ', belief, ' quality ', quality, ' percent ', percent, 'hired', hired