本文整理匯總了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