Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation on T2 measure #9

Open
franciscopana opened this issue Nov 6, 2024 · 0 comments
Open

Fix documentation on T2 measure #9

franciscopana opened this issue Nov 6, 2024 · 0 comments

Comments

@franciscopana
Copy link

franciscopana commented Nov 6, 2024

def t2(X, y):
    """
    Calculates the Average number of features per dimension (T2) metric. 

    To obtaint this measure, the number of dimensions describing the dataset is divided by the number of instances.

    .. math::

        T2=\\frac{m}{n}

    :type X: array-like, shape (n_samples, n_features)
    :param X: Dataset
    :type y: array-like, shape (n_samples)
    :param y: Labels

    :rtype: float
    :returns: T2 score
    """
    X = np.copy(X)
    return X.shape[1]/X.shape[0]

I think that the description of this measure is wrong. This measure, by diving number of features by the number of instances, calculates the Average Number of Features per Data Point. The description refers "Features per Dimension", which is not adequate considering the formula of this measure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant