trinity.buffer.selector.difficulty_estimator module#
- class trinity.buffer.selector.difficulty_estimator.BaseBetaPREstimator(n: int, m: int = 16, lamb: float = 0.2, rho: float = 0.2)[source]#
 Bases:
object- __init__(n: int, m: int = 16, lamb: float = 0.2, rho: float = 0.2)[source]#
 alpha_{t+1} = (1 - lamb) * alpha_t + (1 - rho) * bar{s} + rho * tilde{s} beta_{t+1} = (1 - lamb) beta_t + (1 - rho) * bar{f} + rho * tilde{f}
- Parameters:
 n (int) β number of tasks.
m (int) β repeat times per tasks.
timeout (lamb) β discount factor of historical estimation.
rho (float) β weight of pseudo counts.
- n: int#
 
- m: int#
 
- lamb: float#
 
- rho: float#
 
- alphas: ndarray#
 
- betas: ndarray#
 
- class trinity.buffer.selector.difficulty_estimator.InterpolationBetaPREstimator(features: ndarray, m: int, lamb, rho, cap_coef_update_discount=0.9, adaptive_rho=False)[source]#
 Bases:
BaseBetaPREstimator- __init__(features: ndarray, m: int, lamb, rho, cap_coef_update_discount=0.9, adaptive_rho=False)[source]#
 alpha_{t+1} = (1 - lamb) * alpha_t + (1 - rho) * bar{s} + rho * tilde{s} beta_{t+1} = (1 - lamb) beta_t + (1 - rho) * bar{f} + rho * tilde{f}
- Parameters:
 n (int) β number of tasks.
m (int) β repeat times per tasks.
timeout (lamb) β discount factor of historical estimation.
rho (float) β weight of pseudo counts.