skbio.stats.ordination.OrdinationResults#

class skbio.stats.ordination.OrdinationResults(short_method_name, long_method_name, eigvals, samples, features=None, biplot_scores=None, sample_constraints=None, proportion_explained=None)[source]#

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. Will automatically display PNG/SVG representations of itself within the IPython Notebook.

Attributes:
short_method_namestr

Abbreviated ordination method name.

long_method_namestr

Ordination method name.

eigvalspd.Series

The resulting eigenvalues. The index corresponds to the ordination axis labels

samplespd.DataFrame

The position of the samples in the ordination space, row-indexed by the sample id.

featurespd.DataFrame

The position of the features in the ordination space, row-indexed by the feature id.

biplot_scorespd.DataFrame

Correlation coefficients of the samples with respect to the features.

sample_constraintspd.DataFrame

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

proportion_explainedpd.Series

Proportion explained by each of the dimensions in the ordination space. The index corresponds to the ordination axis labels

See also

ca
cca
pcoa
rda

Attributes

Attributes (inherited)

png

Get figure data in PNG format.

svg

Get figure data in SVG format.

Methods

plot([df, column, axes, axis_labels, title, ...])

Create a 3-D scatterplot of ordination results colored by metadata.

read([format])

Create a new OrdinationResults instance from a file.

rename(mapper[, matrix, strict])

Rename sample or feature IDs in the data matrix.

write(file[, format])

Write an instance of OrdinationResults to a file.

Special methods

__str__()

Return a string representation of the ordination results.

Special methods (inherited)

__eq__(value, /)

Return self==value.

__ge__(value, /)

Return self>=value.

__getstate__(/)

Helper for pickle.

__gt__(value, /)

Return self>value.

__hash__(/)

Return hash(self).

__le__(value, /)

Return self<=value.

__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

Details

default_write_format = 'ordination'#
__str__()[source]#

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.