## models.Comparison


The result of [compare](models.compare.md#prospicio.models.compare): every model's score on every metric and


Usage

``` python
models.Comparison(
    models,
    metrics,
    split_scores,
)
```


split.


## Attributes


`models: list of str`  

`metrics: list of str`  

`split_scores: dict`  
`split_scores[(model, metric)]` is the list of per-split scores.


## Methods

| Name | Description |
|----|----|
| [best()](#best) | The model with the lowest mean `metric`. |
| [difference_std_error()](#difference_std_error) | Standard error of the per-split difference from the best model. |
| [mean()](#mean) | Mean score over the splits. |
| [std_error()](#std_error) | Standard deviation of the split scores over the square root of |
| [table()](#table) | One row per model and metric: [model](reserving.OneYearFit.md#prospicio.reserving.OneYearFit.model), `metric`, [mean](risk.Gpd.md#prospicio.risk.Gpd.mean), |

------------------------------------------------------------------------


#### best()


The model with the lowest mean `metric`.


Usage

``` python
best(metric)
```


------------------------------------------------------------------------


#### difference_std_error()


Standard error of the per-split difference from the best model.


Usage

``` python
difference_std_error(model, metric)
```


The splits are shared, so the paired difference is much less noisy than either mean: a model within about two of these of the best is not clearly worse.


------------------------------------------------------------------------


#### mean()


Mean score over the splits.


Usage

``` python
mean(model, metric)
```


------------------------------------------------------------------------


#### std_error()


Standard deviation of the split scores over the square root of


Usage

``` python
std_error(model, metric)
```


their number.


------------------------------------------------------------------------


#### table()


One row per model and metric: [model](reserving.OneYearFit.md#prospicio.reserving.OneYearFit.model), `metric`, [mean](risk.Gpd.md#prospicio.risk.Gpd.mean),


Usage

``` python
table()
```


[std_error](models.Comparison.md#prospicio.models.Comparison.std_error) and [difference_std_error](models.Comparison.md#prospicio.models.Comparison.difference_std_error), as a list of dicts (pass it to `pandas.DataFrame` for a frame).
