def scores(self, scaling):
    "Compute site and species scores for different scalings.\n\n        Parameters\n        ----------\n        scaling : int\n\n            For a more detailed explanation of the interpretation, check\n            Legendre & Legendre 1998, section 9.4.3. The notes that\n            follow are quick recommendations.\n\n            Scaling type 1 maintains :math:`\\chi^2` distances between\n            rows (sites): in the transformed space, the euclidean\n            distances between rows are equal to the :math:`\\chi^2`\n            distances between rows in the original space. It should be\n            used when studying the ordination of sites. Rows (sites)\n            that are near a column (species) have high contributions\n            from it.\n\n            Scaling type 2 preserves :math:`\\chi^2` distances between\n            columns (species), so euclidean distance between columns\n            after transformation is equal to :math:`\\chi^2` distance\n            between columns in the original space. It is best used\n            when we are interested in the ordination of species. A\n            column (species) that is next to a row (site) means that\n            it is more abundant there.\n\n            Other types of scalings are currently not implemented, as\n            they're less used by ecologists (Legendre & Legendre 1998,\n            p. 456).\n\n            In general, species appearing far from the center of the\n            biplot and far from its edges will probably exhibit better\n            relationships than species either in the center (may be\n            multimodal species, not related to the shown ordination\n            axes...) or the edges (sparse species...).\n\n        Returns\n        -------\n        OrdinationResults\n            Object that stores the computed eigenvalues, the\n            proportion explained by each of them (per unit),\n            transformed coordinates, etc.\n\n        See Also\n        --------\n        OrdinationResults\n        "
    if (scaling not in {1, 2}):
        raise NotImplementedError('Scaling {0} not implemented.'.format(scaling))
    V = ((self.column_marginals[:, None] ** (- 0.5)) * self.U)
    V_hat = ((self.row_marginals[:, None] ** (- 0.5)) * self.U_hat)
    F = (V_hat * self.W)
    F_hat = (V * self.W)
    eigvals = (self.W ** 2)
    species_scores = [V, F_hat][(scaling - 1)]
    site_scores = [F, V_hat][(scaling - 1)]
    return OrdinationResults(eigvals=eigvals, species=species_scores, site=site_scores, site_ids=self.row_ids, species_ids=self.column_ids)
Compute site and species scores for different scalings.

Parameters
----------
scaling : int

    For a more detailed explanation of the interpretation, check
    Legendre & Legendre 1998, section 9.4.3. The notes that
    follow are quick recommendations.

    Scaling type 1 maintains :math:`\chi^2` distances between
    rows (sites): in the transformed space, the euclidean
    distances between rows are equal to the :math:`\chi^2`
    distances between rows in the original space. It should be
    used when studying the ordination of sites. Rows (sites)
    that are near a column (species) have high contributions
    from it.

    Scaling type 2 preserves :math:`\chi^2` distances between
    columns (species), so euclidean distance between columns
    after transformation is equal to :math:`\chi^2` distance
    between columns in the original space. It is best used
    when we are interested in the ordination of species. A
    column (species) that is next to a row (site) means that
    it is more abundant there.

    Other types of scalings are currently not implemented, as
    they're less used by ecologists (Legendre & Legendre 1998,
    p. 456).

    In general, species appearing far from the center of the
    biplot and far from its edges will probably exhibit better
    relationships than species either in the center (may be
    multimodal species, not related to the shown ordination
    axes...) or the edges (sparse species...).

Returns
-------
OrdinationResults
    Object that stores the computed eigenvalues, the
    proportion explained by each of them (per unit),
    transformed coordinates, etc.

See Also
--------
OrdinationResults
def scores(self, scaling):
    "Compute site and species scores for different scalings.\n\n        Parameters\n        ----------\n        scaling : int\n\n            For a more detailed explanation of the interpretation, check\n            Legendre & Legendre 1998, section 9.4.3. The notes that\n            follow are quick recommendations.\n\n            Scaling type 1 maintains :math:`\\chi^2` distances between\n            rows (sites): in the transformed space, the euclidean\n            distances between rows are equal to the :math:`\\chi^2`\n            distances between rows in the original space. It should be\n            used when studying the ordination of sites. Rows (sites)\n            that are near a column (species) have high contributions\n            from it.\n\n            Scaling type 2 preserves :math:`\\chi^2` distances between\n            columns (species), so euclidean distance between columns\n            after transformation is equal to :math:`\\chi^2` distance\n            between columns in the original space. It is best used\n            when we are interested in the ordination of species. A\n            column (species) that is next to a row (site) means that\n            it is more abundant there.\n\n            Other types of scalings are currently not implemented, as\n            they're less used by ecologists (Legendre & Legendre 1998,\n            p. 456).\n\n            In general, species appearing far from the center of the\n            biplot and far from its edges will probably exhibit better\n            relationships than species either in the center (may be\n            multimodal species, not related to the shown ordination\n            axes...) or the edges (sparse species...).\n\n        Returns\n        -------\n        OrdinationResults\n            Object that stores the computed eigenvalues, the\n            proportion explained by each of them (per unit),\n            transformed coordinates, etc.\n\n        See Also\n        --------\n        OrdinationResults\n        "
    if (scaling not in {1, 2}):
        raise NotImplementedError('Scaling {0} not implemented.'.format(scaling))
    V = ((self.column_marginals[:, None] ** (- 0.5)) * self.U)
    V_hat = ((self.row_marginals[:, None] ** (- 0.5)) * self.U_hat)
    F = (V_hat * self.W)
    F_hat = (V * self.W)
    eigvals = (self.W ** 2)
    species_scores = [V, F_hat][(scaling - 1)]
    site_scores = [F, V_hat][(scaling - 1)]
    return OrdinationResults(eigvals=eigvals, species=species_scores, site=site_scores, site_ids=self.row_ids, species_ids=self.column_ids)