## models.OnnxPredictor


An [OnnxModel](models.OnnxModel.md#prospicio.models.OnnxModel) behind the model interface: each graph input bound to


Usage

``` python
models.OnnxPredictor()
```


design columns, one output read as each row's mean, and a family for predictive draws.


## Parameters


`model: OnnxModel`  

`family: str`  
The family of the predictive draws (`poisson`, [gamma](distributions.Burr.md#prospicio.distributions.Burr.gamma), …).

`inputs: dict of str to list of str`  
Each graph input's design columns: a rank-2 input takes its columns in order (`[rows, columns]`), a rank-1 input one column. An integer input (an embedding's category codes) must hold whole numbers.

`output: int = ``0`  
Which output is the mean.

`scale: (mean, link) = ``"mean"`  
`"mean"`: the output is the mean. `"link"`: the output is on the link's scale and added to the design's offset, `mu = g^-1(offset + output)` (a CANN's correction, or a network trained with an exposure offset).

`link: str`  
The link for `scale="link"`; by default the log link for the gamma, inverse Gaussian and Tweedie, the canonical link otherwise.

`dispersion: float = ``1`  
The family's dispersion for predictive draws.

`theta: float`  
The negative binomial's [theta](models.TwoPartFit.md#prospicio.models.TwoPartFit.theta) or the Tweedie power.

`power: float`  
The negative binomial's [theta](models.TwoPartFit.md#prospicio.models.TwoPartFit.theta) or the Tweedie power.


## Methods

| Name | Description |
|----|----|
| [predict()](#predict) | Expected response for each row of [design](models.Coding.md#prospicio.models.Coding.design). |
| [predict_distribution()](#predict_distribution) | Joint predictive distribution across the rows: process draws from |

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


#### predict()


Expected response for each row of [design](models.Coding.md#prospicio.models.Coding.design).


Usage

``` python
predict(design)
```


##### Raises


`ValueError`  
If a graph input is not bound, a bound column is missing, or an integer input holds a fraction.


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


#### predict_distribution()


Joint predictive distribution across the rows: process draws from


Usage

``` python
predict_distribution(design, n_sims, seed)
```


the family and dispersion around the predicted means.


##### Parameters


`design: Design`  

`n_sims: int`  

`seed: int`  


##### Returns


`PredictiveDistribution`
