pub struct StateSpaceModel {
pub observation_matrix: Array2<f64>,
pub transition_matrix: Array2<f64>,
pub selection_matrix: Array2<f64>,
pub observation_cov: Array2<f64>,
pub state_cov: Array2<f64>,
pub initial_state_mean: Array1<f64>,
pub initial_state_cov: Array2<f64>,
}Expand description
State space model specification
Fields§
§observation_matrix: Array2<f64>Observation matrix Z (n_obs × n_states)
transition_matrix: Array2<f64>Transition matrix T (n_states × n_states)
selection_matrix: Array2<f64>Selection matrix R (n_states × n_disturbances)
observation_cov: Array2<f64>Observation covariance H (n_obs × n_obs)
state_cov: Array2<f64>State disturbance covariance Q (n_disturbances × n_disturbances)
initial_state_mean: Array1<f64>Initial state mean α₀ (n_states)
initial_state_cov: Array2<f64>Initial state covariance P₀ (n_states × n_states)
Implementations§
Source§impl StateSpaceModel
impl StateSpaceModel
Sourcepub fn local_level(obs_var: f64, level_var: f64) -> Self
pub fn local_level(obs_var: f64, level_var: f64) -> Self
Create local level model (random walk plus noise)
Sourcepub fn local_linear_trend(obs_var: f64, level_var: f64, slope_var: f64) -> Self
pub fn local_linear_trend(obs_var: f64, level_var: f64, slope_var: f64) -> Self
Create local linear trend model
Sourcepub fn arma(ar_coef: &[f64], ma_coef: &[f64], sigma2: f64) -> Self
pub fn arma(ar_coef: &[f64], ma_coef: &[f64], sigma2: f64) -> Self
Create ARMA(p, q) model in state space form
Sourcepub fn filter(&self, y: &Array1<f64>) -> Result<KalmanFilterResults>
pub fn filter(&self, y: &Array1<f64>) -> Result<KalmanFilterResults>
Apply Kalman filter to time series
Sourcepub fn smooth(
&self,
filter_results: &KalmanFilterResults,
) -> KalmanFilterResults
pub fn smooth( &self, filter_results: &KalmanFilterResults, ) -> KalmanFilterResults
Apply Kalman smoother (Rauch-Tung-Striebel smoother)
Trait Implementations§
Source§impl Clone for StateSpaceModel
impl Clone for StateSpaceModel
Source§fn clone(&self) -> StateSpaceModel
fn clone(&self) -> StateSpaceModel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StateSpaceModel
impl RefUnwindSafe for StateSpaceModel
impl Send for StateSpaceModel
impl Sync for StateSpaceModel
impl Unpin for StateSpaceModel
impl UnsafeUnpin for StateSpaceModel
impl UnwindSafe for StateSpaceModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.