FIX: SDE inference. Couple of bug fixes and minor syntactic madifications.

This commit is contained in:
Alexander Grigorievskiy 2016-03-08 17:56:20 +02:00
parent 3ef070a0dc
commit 529ac15cdf
12 changed files with 199 additions and 180 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Alex Grigorevskiy
# Licensed under the BSD 3-clause license (see LICENSE.txt)
"""
Created on Thu Feb 19 12:32:32 2015
Main functionality for state-space inference.
"""
import collections # for cheking whether a variable is iterable
@ -771,7 +771,7 @@ class DescreteStateSpace(object):
# m - vector for calculating matrices. Required for EKF. Not used here.
c_p_A = p_A.copy() # create a copy because this object is passed to the smoother
c_p_Q = p_A.copy() # create a copy because this object is passed to the smoother
c_p_Q = p_Q.copy() # create a copy because this object is passed to the smoother
c_index = index.copy() # create a copy because this object is passed to the smoother
if calc_grad_log_likelihood:

View file

@ -63,9 +63,10 @@ class StateSpace(Model):
# Default kernel
if kernel is None:
self.kern = kern.Matern32(1)
raise ValueError("State-Space Model: the kernel must be provided.")
else:
self.kern = kernel
self.link_parameter(self.kern)
self.link_parameter(self.likelihood)
self.posterior = None

View file

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Alex Grigorevskiy
# Licensed under the BSD 3-clause license (see LICENSE.txt)
"""
This module is intended for the setup of state_space_main module.
The need of this module appeared because of the way state_space_main module