def create_prediction_series(lis, predictor):
    """
    this function returns a list, lets call it p, of the length of the given lis
    such that p[i] = the prediction of the i'th element in lis given the first i-1 elements
    to make things nice, p[0] would be equal to lis[0]

    :param lis:
    :param predictor:
    :return: the prediction list created
    """
    p = [lis[0]]
    for i in range(1, len(lis)):
        p.append(predictor.predict(lis[: i]))

    return p