Пример #1
0
def flowtest_isp(T, **kw):
    logger.info('ISP flowtest')
    logger.info('Require rng initialization')
    logger.info('\n    '.join(str(k) + ' ' + str(v) for k, v in kw.items()))
    s = c3synthetic_isp_rng(**kw)
    reward, regret, similarity = contextual_cascading_sherry(contextual(s, cascade=True, rgamma=True), T=T)
    reward, regret, similarity = contextual_cascading_sherry(contextual(s, cascade=True, rgamma=False), T=T)
    reward, regret, similarity = contextual_full_lijing(contextual(s, cascade=False, rgamma=False), T=T)
    reward, regret, similarity = absolute_cascading_ucb(contextual(s, cascade=True, rgamma=True), T=T)
    reward, regret, similarity = absolute_cascading_ucb(contextual(s, cascade=True, rgamma=False), T=T)
Пример #2
0
def flowtest_movielens(T, **kw):
    logger.info('Movielens flowtest')
    logger.info('Require rng initialization')
    logger.info('\n    '.join(str(k) + ' ' + str(v) for k, v in kw.items()))
    s = c3_movielens_rng(**kw)
    reward, regret, similarity = contextual_cascading_sherry(contextual(s, cascade=True, rgamma=True, descend=False), T=T)
    plt.plot(reward, 'r')
    reward, regret, similarity = contextual_cascading_sherry(contextual(s, cascade=True, rgamma=True, descend=True), T=T)
    plt.plot(reward, 'b')
    reward, regret, similarity = contextual_full_lijing(contextual(s, cascade=False, rgamma=True, descend=False), T=T)
    plt.plot(reward, 'g')
    reward, regret, similarity = absolute_cascading_ucb(contextual(s, cascade=True, rgamma=True, descend=False), T=T)
    plt.plot(reward, 'y')
    #reward, regret, similarity = absolute_cascading_ucb(contextual(s, cascade=True, rgamma=True, descend=True), T=T)
    return reward, regret
Пример #3
0
def flowtest_gisp(T, **kw):
    logger.info('Gamma ISP flowtest')
    logger.info('Require rng initialization')
    logger.info('\n    '.join(str(k) + ' ' + str(v) for k, v in kw.items()))
    s = c3synthetic_Zisp_rng(**kw)
    reward, regret, similarity = contextual_cascading_gsherry(contextual(s, cascade=True, rgamma=True), T=T, gamma=1.00)
    reward, regret, similarity = contextual_cascading_gsherry(contextual(s, cascade=True, rgamma=True), T=T, gamma=0.98)
    reward, regret, similarity = contextual_cascading_gsherry(contextual(s, cascade=True, rgamma=True), T=T, gamma=0.96)
    reward, regret, similarity = contextual_cascading_gsherry(contextual(s, cascade=True, rgamma=True), T=T, gamma=0.94)
    reward, regret, similarity = contextual_cascading_gsherry(contextual(s, cascade=True, rgamma=True), T=T, gamma=0.92)
    reward, regret, similarity = contextual_cascading_gsherry(contextual(s, cascade=True, rgamma=True), T=T, gamma=0.9)
    reward, regret, similarity = contextual_cascading_gsherry(contextual(s, cascade=True, rgamma=True), T=T, gamma=0.88)
    reward, regret, similarity = contextual_cascading_gsherry(contextual(s, cascade=True, rgamma=True), T=T, gamma=0.86)
    reward, regret, similarity = contextual_cascading_gsherry(contextual(s, cascade=True, rgamma=True), T=T, gamma=0.84)
    reward, regret, similarity = contextual_cascading_gsherry(contextual(s, cascade=True, rgamma=True), T=T, gamma=0.82)
    reward, regret, similarity = contextual_cascading_gsherry(contextual(s, cascade=True, rgamma=True), T=T, gamma=0.80)