def compute_projection(X, current_x_id, alphas=None, k_ij_slash=None,
    current_component=None):
    """
    compute the projection according to Eq.9 in Hoffman's paper.
    Projection: from hyper-high dimensional to n_component-dimensional, as potential
    :param X: (N,n)
    :param current_x_id: int
    :param current_component: int, ranged from 1 to n_principal_component
    :param alphas : array, row-eigenvectors
    :param k_ij_slash: array, K'ij matrix
    :argument
    :return projection: float, the error of current_x
    """
    N, _ = X.shape
    projection = 0
    for i in range(N):
        projection += alphas[current_component, i] * k_ij_slash[current_x_id, i
            ]
    return projection
