def triCubicWeights(x, xi):
    """
    Calculate the weights for the regression.

    Args:
        x (pandas.core.series.Series): a set of points.
        xi (float): The specific point in the set with respect to which the
            weights are calculated.

    Returns:
        pandas.core.series.Series: The set of regression weights to use at xi.

    """
    diffs = abs(x - xi)
    return (1.0 - (diffs / (1.0001 * max(diffs))) ** 3) ** 3
