common.py
def expected_p_t(step: int, p0: float, c_lambda: float, model_type: str) -> float:
    """
    Computes expected value of transition probability according to theoretical results.
    :param step:
    :param p0:
    :param c_lambda:
    :param model_type:
    :return:
    """
    if model_type == 'success_punished':
        e = (2 * c_lambda - 1) ** step * p0 + (1 - (2 * c_lambda - 1) ** step) / 2 if c_lambda != 0.5 else 0.5
    elif model_type == 'success_rewarded':
        e = p0
    elif model_type == 'success_punished_two_lambdas':
        e = 0
    elif model_type == 'success_rewarded_two_lambdas':
        e = 0
    else:
        raise Exception(f'Unexpected walk type: {model_type}')
    return e

    Computes expected value of transition probability according to theoretical results.
    :param step:
    :param p0:
    :param c_lambda:
    :param model_type:
    :return:
    
Computes expected value of transition probability according to theoretical results.
Computes expected value of transition probability according to theoretical results .
def expected_p_t(step: int, p0: float, c_lambda: float, model_type: str) -> float:
    if model_type == 'success_punished':
        e = (2 * c_lambda - 1) ** step * p0 + (1 - (2 * c_lambda - 1) ** step) / 2 if c_lambda != 0.5 else 0.5
    elif model_type == 'success_rewarded':
        e = p0
    elif model_type == 'success_punished_two_lambdas':
        e = 0
    elif model_type == 'success_rewarded_two_lambdas':
        e = 0
    else:
        raise Exception(f'Unexpected walk type: {model_type}')
    return e
def expected_p_t ( step : int , p0 : float , c_lambda : float , model_type : str ) -> float : if model_type == 'success_punished' : e = ( 2 * c_lambda - 1 ) ** step * p0 + ( 1 - ( 2 * c_lambda - 1 ) ** step ) / 2 if c_lambda != 0.5 else 0.5 elif model_type == 'success_rewarded' : e = p0 elif model_type == 'success_punished_two_lambdas' : e = 0 elif model_type == 'success_rewarded_two_lambdas' : e = 0 else : raise Exception ( f'Unexpected walk type: {model_type}' ) return e
Computes expected value of transition probability according to theoretical results.
Computes expected value of transition probability according to theoretical results .
"""
    Computes expected value of transition probability according to theoretical results.
    :param step:
    :param p0:
    :param c_lambda:
    :param model_type:
    :return:
    """
None
step
int
None
p0
float
None
c_lambda
float
None
model_type
str
None