Skip to main content
`Ctrl`+`K`

# skbio.stats.ordination.OrdinationResults

class skbio.stats.ordination.OrdinationResults(short_method_name, long_method_name, eigvals, samples, sample_ids=None, features=None, feature_ids=None, biplot_scores=None, sample_constraints=None, constraint_ids=None, proportion_explained=None)

  Store ordination results, providing serialization and plotting support.

  Stores various components of ordination results. Provides methods for serializing/deserializing results, as well as generation of basic matplotlib 3-D scatterplots using the `plot` method.

  Attributes:
    short_method_name str

      Abbreviated ordination method name.

    long_method_name str

      Ordination method name.

    eigvals table_like

      The resulting eigenvalues. The index corresponds to the ordination axis labels. See Output formats for details.

    samples table_like

      The position of the samples in the ordination space, row-indexed by the sample id. See Output formats for details.

    features table_like

      The position of the features in the ordination space, row-indexed by the feature id. See Output formats for details.

    biplot_scores table_like

      Correlation coefficients of the samples with respect to the features. See Output formats for details.

    sample_constraints table_like

      Site constraints (linear combinations of constraining variables): coordinates of the sites in the space of the explanatory variables X. These are the fitted site scores. See Output formats for details.

    proportion_explained table_like

      Proportion explained by each of the dimensions in the ordination space. The index corresponds to the ordination axis labels. See Output formats for details.

    sample_ids, feature_ids, constraint_ids, output_format optional

      Standard table parameters. See Common parameters for details.

  See also

  `ca`
  `cca`
  `pcoa`
  `rda`

  Attributes

  `default_write_format` | Default write format for this object: `ordination`.

  Methods

  `plot` | Create a scatterplot of ordination results colored by metadata.
  `read` | Create a new `OrdinationResults` instance from a file.
  `rename` | Rename sample or feature IDs in the data matrix.
  `write` | Write an instance of `OrdinationResults` to a file.

  Special methods

  `__str__` | Return a string representation of the ordination results.

  Special methods (inherited)

  `__eq__` | Return self==value.
  `__ge__` | Return self>=value.
  `__getstate__` | Helper for pickle.
  `__gt__` | Return self>value.
  `__hash__` | Return hash(self).
  `__le__` | Return self<=value.
  `__lt__` | Return self<value.
  `__ne__` | Return self!=value.

  Details

  default_write_format = 'ordination'

    Default write format for this object: `ordination`.

  __str__()

    Return a string representation of the ordination results.

    String representation lists ordination results attributes and indicates whether or not they are present. If an attribute is present, its dimensions are listed. A truncated list of features and sample IDs are included (if they are present).

    Returns:
      str

        String representation of the ordination results.