pyspi.calculator.CalculatorFrame
class pyspi.calculator.CalculatorFrame(calculators=None, name=None, datasets=None, names=None, labels=None)
Container for batch level commands such as computing/pruning/initialising multiple datasets at once.
Example
calculators - Initial set of calculators to be added to the frame.
datasets (list, optional) - A list of datasets to initialise calculators with.
names (list of str, optional) - Corresponding names for each dataset in 'datasets'.
labels (list, optional) - Labels for the datasets in 'datasets'.
kwargs (dict, optional) - Additional keyword arguments for calculator initialisation.
__init__
(calculators=None, name=None, datasets=None, names=None, labels=None, **kwargs)
Methods
from_calculator
(calculator)
Creates a CalculatorFrame from a single calculator.
set_calculator
(calculators)
Sets the calculator(s) for the frame.
add_calculator
(calc)
Adds a calculator to the existing frame.
init_from_list
(datasets, names, labels, **kwargs)
Initialises calculators from a list of datasets.
init_from_yaml
(document, normalise=True, n_processes=None, n_observations=None, **kwargs)
Initialises calculators from a YAML file.
merge
(other)
Merges another CalculatorFrame's calculations into the current frame.
compute
(calc)
Computes results for each calculator object.
set_group
(calc, *args)
Sets the group for each calculator.
get_correlation_df
(with_labels=False, **kwargs)
Generates a DataFrame showing correlations between SPIs for each dataset.
Attributes
name
The name of the CalculatorFrame.
Last updated