import math


def event_prediction(alpha, var, r_t):
    """
     predict the total number of retweets
    :param alpha: a parameter of linear regression (alpha)
    :param var:  a parameter of linear regression (variance)
    :param r_t: the total number of tweet at the observation time
    :return: predicted number of retweets
    """

    if isinstance(alpha, float):
        r_est = r_t * (math.exp(alpha + (var / 2.0)))
        return r_est
    else:
        r_est = [r_t * (math.exp(alpha[i] + (var[i] / 2.0))) for i in range(len(alpha))]
        return r_est