contango.trading.analysis.graphing.parallel_coordinates
contango.trading.analysis.graphing.parallel_coordinates
ParallelCoordinates
ParallelCoordinates(config: C)
Bases: GraphType[ParallelCoordinatesConfig]
A graph type that shows parameter combinations across all swept parameters.
Source code in src\contango\trading\analysis\graph_type.py
26 27 28 29 30 31 32 33 | |
build
build(df: DataFrame) -> go.Figure
Builds the parallel coordinates plot across all swept parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
The experiment DataFrame. |
required |
Returns:
| Type | Description |
|---|---|
Figure
|
A plotly Figure. |
Source code in src\contango\trading\analysis\graphing\parallel_coordinates.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
ParallelCoordinatesConfig
dataclass
ParallelCoordinatesConfig(param_columns: list[str], target_metric: str = 'calmar_ratio', sample_size: int | None = None)
Bases: GraphConfig
A graph configuration specific to the parallel coordinates graph.
Attributes:
| Name | Type | Description |
|---|---|---|
param_columns |
list[str]
|
The parameter columns to include as axes. |
target_metric |
str
|
The name for the targeted metric used as the final axis and the color scale. |
sample_size |
int | None
|
The maximum amount of experiments to plot. |