example::PoissonModel #
Poisson Model.
#include <poisson_model.h>
Inherits from example::LinearModel
Public Functions #
| Name | |
|---|---|
| PoissonModel(const arma::mat & x, const arma::mat & z) Constructs and fits a new PoissonModel. |
|
| PoissonModel(const arma::mat & C, const arma::vec & d) Constructs a new PoissonModel. |
|
| auto | simulate(const arma::mat & x, bool add_noise =false) simulates Poisson model |
Additional inherited members #
Public Functions inherited from example::LinearModel
| Name | |
|---|---|
| auto | C() const get output matrix (C) |
| auto | d() const get output bias (d) |
Public Attributes inherited from example::LinearModel
| Name | |
|---|---|
| const size_t | n_x number of input channels |
| const size_t | n_y number of output channels |
Protected Attributes inherited from example::LinearModel
| Name | |
|---|---|
| arma::mat | C_ output matrix |
| arma::vec | d_ output bias |
Public Function Details #
PoissonModel #
PoissonModel(
const arma::mat & x,
const arma::mat & z
)
Parameters:
- x Input data [n_x x n_t]
- z Measured output data [n_y x n_t]
Given input/output data, constructs and fits a new PoissonModel:
\[ \mathbf{y}_t = \exp\left(\mathbf{C} \mathbf{x}_{t} + \mathbf{d}\right) \] \[ \mathbf{z}_t \sim \mathcal{N}\left(\mathbf{y}_t , \mathbf{R} \right) \]where \( \mathbf{x}_{t} \) , \( \mathbf{y}_{t} \) , and \( \mathbf{z}_{t} \) the input, output, and measurement, respectively; \( \mathbf{C} \) is the output matrix; \( \mathbf{d} \) is the output bias; and \( \mathbf{R} \) is the covariance of the assumed Gaussian measurement noise.
PoissonModel #
PoissonModel(
const arma::mat & C,
const arma::vec & d
)
Parameters:
- C output matrix
- d output bias
Constructs a new PoissonModel from parameters:
\[ \mathbf{y}_t = \exp \left( \mathbf{C} \mathbf{x}_{t} + \mathbf{d} \right) \] \[ \mathbf{z}_t \sim \mathcal{N}\left(\mathbf{y}_t , \mathbf{R} \right) \]where \( \mathbf{x}_{t} \) , \( \mathbf{y}_{t} \) , and \( \mathbf{z}_{t} \) the input, output, and measurement, respectively; \( \mathbf{C} \) is the output matrix; \( \mathbf{d} \) is the output bias.
simulate #
auto simulate(
const arma::mat & x,
bool add_noise =false
)
Parameters:
- x input data
- add_noise whether to add measurement noise
Return: model output
Updated on 4 March 2021 at 09:51:17 CST