> For the complete documentation index, see [llms.txt](https://time-series-features.gitbook.io/pyspi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://time-series-features.gitbook.io/pyspi/information-about-pyspi/api-reference/pyspi.calculator.correlationframe.md).

# pyspi.calculator.CorrelationFrame

> *<mark style="color:blue;">class</mark>* **pyspi.calculator.CorrelationFrame**(*<mark style="color:blue;">cf=None, \*\*kwargs</mark>*)

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

## Example

```python
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)

```

<table><thead><tr><th width="252">Parameters</th><th>Description</th></tr></thead><tbody><tr><td></td><td><ul><li><strong>cf</strong> (<a href="/pyspi/information-about-pyspi/api-reference/pyspi.calculator.calculatorframe.md">CalculatorFrame</a>, optional) - An instance of a CalculatorFrame or Caclulator object.</li><li><strong>kwargs</strong> (<em>dict</em>, <em>optional</em>) - Additional keyword arguments for CorrelationFrame initialisation.</li></ul></td></tr></tbody></table>

> **`__init__`**(*cf=None, \*\*kwargs*)

## Methods

<table><thead><tr><th width="395">Attribute</th><th>Description</th></tr></thead><tbody><tr><td><code>__</code><strong><code>init__</code></strong><code>(cf=None, **kwargs)</code></td><td>Constructor for initialising the CorrelationFrame object. Accepts a <a href="/pyspi/information-about-pyspi/api-reference/pyspi.calculator.calculatorframe.md">CalculatorFrame</a> ('cf') and additional keyword arguments.</td></tr><tr><td><code>get_pvalues()</code></td><td>-</td></tr><tr><td><code>merge()</code></td><td>Merges the current CorrelationFrame with another.</td></tr><tr><td><code>compute_significant_values()</code></td><td>-</td></tr><tr><td><code>get_average_correlation</code>(thresh=0.2, absolute=True, summary="mean", remove_insig=False)</td><td>Calculates and returns the average correlation, with various options for thresholding, absolutes and removing insignificant values.</td></tr><tr><td><code>get_feature_matrix</code>(sthresh=0.8, dthresh=0.2, dropduplicates=True)</td><td>Returns feature matrix based on specified thresholds and duplication settings.</td></tr><tr><td><code>relabel_spis</code>(names, labels)</td><td>-</td></tr><tr><td><code>set_sgroup_names</code>(names=None)</td><td>-</td></tr><tr><td></td><td></td></tr></tbody></table>

## Attributes

| Method    | Description                          |
| --------- | ------------------------------------ |
| `name`    | Name of the CorrelationFrame object. |
| `dlabels` | -                                    |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://time-series-features.gitbook.io/pyspi/information-about-pyspi/api-reference/pyspi.calculator.correlationframe.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
