pyspi.calculator.CorrelationFrame

class pyspi.calculator.CorrelationFrame(cf=None, **kwargs)

Container for handling correlation data derived from a set of calculators.

Example

from pyspi.calculator import CorrelationFrame, CalculatorFrame
from pyspi.calculator import Calculator

# create the calculator frame using your data
calc_frame = CalculatorFrame(calculators=[Calculator(dataset=dataset), 
    Calculator(dataset=dataset2)]
    
# create the correlation frame
corr_frame = CorrelationFrame(cf=calc_frame)

ParametersDescription

  • cf (CalculatorFrame, optional) - An instance of a CalculatorFrame or Caclulator object.

  • kwargs (dict, optional) - Additional keyword arguments for CorrelationFrame initialisation.

__init__(cf=None, **kwargs)

Methods

AttributeDescription

__init__(cf=None, **kwargs)

Constructor for initialising the CorrelationFrame object. Accepts a CalculatorFrame ('cf') and additional keyword arguments.

get_pvalues()

-

merge()

Merges the current CorrelationFrame with another.

compute_significant_values()

-

get_average_correlation(thresh=0.2, absolute=True, summary="mean", remove_insig=False)

Calculates and returns the average correlation, with various options for thresholding, absolutes and removing insignificant values.

get_feature_matrix(sthresh=0.8, dthresh=0.2, dropduplicates=True)

Returns feature matrix based on specified thresholds and duplication settings.

relabel_spis(names, labels)

-

set_sgroup_names(names=None)

-

Attributes

MethodDescription

name

Name of the CorrelationFrame object.

dlabels

-

Last updated

All page cover images on this wiki are created with the help of DALL-E, an AI program developed by OpenAI, or stock images from Unsplash.