Ejemplo n.º 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)
Ejemplo n.º 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