Ensemble Methods
The following tables are lists of existing methods for use on Ensembles, with short summaries of their purpose. The methods link to their API documentation for more detailed information.
Base Methods
These are some base methods used to perform operations on one or more Ensembles.
Method |
Description |
|---|---|
Creates an Ensemble from a dictionary of data. |
|
Creates an Ensemble from a dictionary of tables. |
|
Reads just an Ensemble’s metadata from a file. |
|
Tests if a file is a |
|
Reads an Ensemble from a file. |
|
Gets the number of distributions present in the file. |
|
Iterates through an Ensemble in a given file. |
|
Converts an Ensemble to a different parameterization. |
|
Concatenates a list of Ensembles with the same metadata into one Ensemble. |
|
Writes a dictionary of Ensembles to an HDF5 file. |
|
Reads a dictionary of Ensembles from an HDF5 file. |
|
Adds a new parameterization class to the dictionary of classes. |
Methods of the Ensemble class
General use methods
These are more methods that are used to perform operations on Ensembles, from creating them to writing them to file. These are methods of an existing Ensemble, and so you would write ens.set_ancil(ancil), for example.
Method |
Description |
|---|---|
Set the ancillary data dictionary. |
|
Add columns to the ancillary data dictionary. |
|
Convert Ensemble to another parameterization |
|
Appends another Ensemble to the current one. |
|
Re-create the Ensemble with new objdata and metadata, optionally ancillary data. |
|
Re-create the Ensemble with the given objdata and optionally ancillary data. |
|
Returns a dictionary of the metadata, objdata and ancillary data dictionaries, with conversion necessary for writing to file. |
|
Write the Ensemble to a |
|
Sets up an HDF5 file that can be written to iteratively. |
|
Write a chunk of the Ensemble objdata and ancillary data to the HDF5 file. |
|
Write Ensemble metadata to the output HDF5 file and close it. |
|
Returns an array of x values that can be used to plot all the distributions in the Ensemble. |
|
Plots the selected distribution as a curve and returns the figure axes. |
|
Plots the selected distribution as the default for that parameterization and returns the figure axes. |
Statistics Methods
Many of these methods are inherited from scipy.stats.rv_continuous. Some of these methods, such as pdf(), inherit from the SciPy method, but may have parameterization-specific functions to calculate the values. Others are inherited more directly.
Method |
Description |
|---|---|
Normalize the distributions in the Ensemble |
|
Returns the value of the probability density function (PDF) for each distribution at the given location(s) (see also SciPy). |
|
Return and cache the PDF values at the given grid points. |
|
Returns the log of the PDF for each distribution in the given location(s) (see also SciPy). |
|
Returns the cumulative distribution function (CDF) for each distribution in the given location(s) (see also SciPy). |
|
Returns the log of the CDF for each distribution in the given location(s) (see also SciPy). |
|
Returns the percentage point function (PPF) for each distribution in the given location(s) (see also SciPy). |
|
Returns the survival fraction (SF) for each distribution in the given location(s) (see also SciPy). |
|
Returns the log of the SF for each distribution in the given location(s) (see also SciPy). |
|
Returns the inverse of the SF for each distribution in the given location(s) (see also SciPy). |
|
Generate n samples from each distribution (see also SciPy). |
|
Returns some statistical moments for each of the distributions (see also SciPy). |
|
Return the mode of each of the distributions, evaluated on the given or cached grid points. |
|
Return the median of each of the distributions (see also SciPy). |
|
Return the means of each of the distributions (see also SciPy). |
|
Returns the variances for each of the distributions (see also SciPy). |
|
Returns the standard deviations of each of the distributions (see also SciPy). |
|
Returns the nth moment for each of the distributions (see also SciPy). |
|
Returns the differential entropy for each of the distributions (see also SciPy). |
|
Returns the intervals corresponding to a confidence level of alpha for each of the distributions (see also SciPy). |
|
Returns integrated histogram bin values for each of the distributions. |
|
Returns the integral under the PDFs between the given limits for each of the distributions. |
|
Returns the nth moment over a given range for each of the distributions. |