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

View file

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright (c) 2015, Alex Grigorevskiy, Arno Solin
# Licensed under the BSD 3-clause license (see LICENSE.txt)
""" """
Classes in this module enhance Brownian motion covariance function with the Classes in this module enhance Brownian motion covariance function with the
Stochastic Differential Equation (SDE) functionality. Stochastic Differential Equation (SDE) functionality.

View file

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright (c) 2015, Alex Grigorevskiy, Arno Solin
# Licensed under the BSD 3-clause license (see LICENSE.txt)
""" """
Classes in this module enhance Linear covariance function with the Classes in this module enhance Linear covariance function with the
Stochastic Differential Equation (SDE) functionality. Stochastic Differential Equation (SDE) functionality.

View file

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright (c) 2015, Alex Grigorevskiy, Arno Solin
# Licensed under the BSD 3-clause license (see LICENSE.txt)
""" """
Classes in this module enhance Matern covariance functions with the Classes in this module enhance Matern covariance functions with the
Stochastic Differential Equation (SDE) functionality. Stochastic Differential Equation (SDE) functionality.

View file

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright (c) 2015, Alex Grigorevskiy, Arno Solin
# Licensed under the BSD 3-clause license (see LICENSE.txt)
""" """
Classes in this module enhance Matern covariance functions with the Classes in this module enhance Matern covariance functions with the
Stochastic Differential Equation (SDE) functionality. Stochastic Differential Equation (SDE) functionality.

View file

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright (c) 2015, Alex Grigorevskiy, Arno Solin
# Licensed under the BSD 3-clause license (see LICENSE.txt)
""" """
Classes in this module enhance Static covariance functions with the Classes in this module enhance Static covariance functions with the
Stochastic Differential Equation (SDE) functionality. Stochastic Differential Equation (SDE) functionality.

View file

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright (c) 2015, Alex Grigorevskiy, Arno Solin
# Licensed under the BSD 3-clause license (see LICENSE.txt)
""" """
Classes in this module enhance several stationary covariance functions with the Classes in this module enhance several stationary covariance functions with the
Stochastic Differential Equation (SDE) functionality. Stochastic Differential Equation (SDE) functionality.

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,8 @@
# -*- coding: utf-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 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. # 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_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 c_index = index.copy() # create a copy because this object is passed to the smoother
if calc_grad_log_likelihood: if calc_grad_log_likelihood:

View file

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

View file

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*- # -*- 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. 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 The need of this module appeared because of the way state_space_main module

View file

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright (c) 2015, Alex Grigorevskiy
# Licensed under the BSD 3-clause license (see LICENSE.txt)
""" """
Testing state space related functions. Testing state space related functions.
""" """

View file

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright (c) 2015, Alex Grigorevskiy
# Licensed under the BSD 3-clause license (see LICENSE.txt)
""" """
Test module for state_space_main.py Test module for state_space_main.py
""" """