# TimeSeriesRegressionProblem¶

class probnum.problems.TimeSeriesRegressionProblem(locations, observations, measurement_models, solution=None)

Bases: `object`

Time series regression problem.

Fit a stochastic process to data, given a likelihood (realised by a `NonlinearGaussian` transition). Solved by filters and smoothers in `probnum.filtsmooth`.

Parameters
• observations (Union[Sequence, numpy.ndarray]) – Observations of the latent process.

• locations (Union[Sequence, numpy.ndarray]) – Grid-points on which the observations were taken.

• measurement_models (Union[Sequence, numpy.ndarray]) – Measurement models.

• solution (Optional[Union[Sequence, numpy.ndarray]]) – Array containing solution to the problem at `locations`. Used for testing and benchmarking.

Examples

```>>> import numpy as np
>>> from probnum import randprocs
>>> obs = [11.4123, -15.5123]
>>> loc = [0.1, 0.2]
>>> model = randprocs.markov.discrete.LTIGaussian(np.ones((1, 1)), np.ones(1), np.ones((1,1)))
>>> measurement_models = [model, model]
>>> rp = TimeSeriesRegressionProblem(observations=obs, locations=loc, measurement_models=measurement_models)
>>> rp
TimeSeriesRegressionProblem(locations=[0.1, 0.2], observations=[11.4123, -15.5123], measurement_models=[LTIGaussian(input_dim=1, output_dim=1), LTIGaussian(input_dim=1, output_dim=1)], solution=None)
>>> rp.observations
[11.4123, -15.5123]
```

Regression problems are also indexable.

```>>> len(rp)
2
>>> rp[0]
(0.1, 11.4123, LTIGaussian(input_dim=1, output_dim=1))
```

Attributes Summary

Attributes Documentation

solution: Optional[Union[Sequence, numpy.ndarray]] = None