diff --git a/.travis.yml b/.travis.yml
index 51b9ca2b..63fa1c5e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,8 +16,9 @@ addons:
env:
- PYTHON_VERSION=2.7
#- PYTHON_VERSION=3.3
- - PYTHON_VERSION=3.4
+ #- PYTHON_VERSION=3.4
- PYTHON_VERSION=3.5
+ - PYTHON_VERSION=3.6
before_install:
- wget https://github.com/mzwiessele/travis_scripts/raw/master/download_miniconda.sh
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 88284db3..6b1a8a65 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,149 @@
# Changelog
+## v1.7.6 (2017-06-19)
+
+### Fix
+
+* Appveyor not uploading to testpypi for now. [mzwiessele]
+
+### Other
+
+* Bump version: 1.7.5 → 1.7.6. [mzwiessele]
+
+
+## v1.7.5 (2017-06-19)
+
+### Fix
+
+* Splitting forecast tests into 3 to circumvent 10 minute stop of travis. [mzwiessele]
+
+### Other
+
+* Bump version: 1.7.4 → 1.7.5. [mzwiessele]
+
+
+## v1.7.4 (2017-06-19)
+
+### Fix
+
+* Paramz version for parallel optimization fix. [mzwiessele]
+
+### Other
+
+* Bump version: 1.7.3 → 1.7.4. [mzwiessele]
+
+
+## v1.7.3 (2017-06-19)
+
+### Fix
+
+* Appveyor build failing. [mzwiessele]
+
+### Other
+
+* Bump version: 1.7.2 → 1.7.3. [mzwiessele]
+
+
+## v1.7.2 (2017-06-17)
+
+### Fix
+
+* Appveyor build python 3.6. [mzwiessele]
+
+### Other
+
+* Bump version: 1.7.1 → 1.7.2. [mzwiessele]
+
+
+## v1.7.1 (2017-06-17)
+
+### Fix
+
+* Appveyor build python 3.6. [mzwiessele]
+
+### Other
+
+* Bump version: 1.7.0 → 1.7.1. [mzwiessele]
+
+
+## v1.7.0 (2017-06-17)
+
+### Fix
+
+* Support for 3.5 and higher now that 3.6 is out. [mzwiessele]
+
+### Other
+
+* Bump version: 1.6.3 → 1.7.0. [mzwiessele]
+
+
+## v1.6.3 (2017-06-17)
+
+### Other
+
+* Bump version: 1.6.2 → 1.6.3. [mzwiessele]
+
+* Merge pull request #504 from rmcantin/devel. [Max Zwiessele]
+
+* Fix python 2-3 compatibility. [Ruben Martinez-Cantin]
+
+* Merge pull request #511 from dirmeier/devel. [Max Zwiessele]
+
+* Added LICENSE file to MANIFEST.in. [dirmeier]
+
+
+## v1.6.2 (2017-04-12)
+
+### Fix
+
+* Updated keywords. [mzwiessele]
+
+### Other
+
+* Bump version: 1.6.1 → 1.6.2. [mzwiessele]
+
+* Merge pull request #491 from alexfeld/parallel_opt. [Max Zwiessele]
+
+ fix for parallel optimization
+
+* Fix in sparse_gp_mpi optimizer. [Alex Feldstein]
+
+* Fix for parallel optimization. [Alex Feldstein]
+
+* Merge pull request #492 from pgmoren/devel. [Zhenwen Dai]
+
+ We did some benchmarking on classification. These changes should be fine. Let's merge it in.
+
+* Changes in EP/EPDTC to fix numerical issues and increase the flexibility of the inference. [Moreno]
+
+ Changes to avoid numerical issues and improve the performance:
+ - Keep value of the EP parameters between calls
+ - Enforce positivity of tau_tilde
+ - Stable computation of the EP moments for the Bernoulli likelihood
+ - Compute marginal in the GP model without directly inverting tau_tilde
+
+ Changes to improve the flexibility:
+ - Add parameter for maximum number of iterations
+ - Distinguish between alternated/nested mode
+ - Distinguish between sequential/parallel updates in EP
+
+* Merge pull request #489 from SheffieldML/linalg_cython-1. [Max Zwiessele]
+
+ cython in linalg fix #458
+
+* Cython in linalg. [Max Zwiessele]
+
+ did set cython to working if linalg_cython was importable.
+
+* Merge pull request #486 from SheffieldML/deploy. [Max Zwiessele]
+
+ Merge pull request #471 from SheffieldML/devel
+
+* Merge pull request #471 from SheffieldML/devel. [Max Zwiessele]
+
+ new version
+
+
## v1.6.1 (2017-02-28)
### Fix
diff --git a/GPy/__version__.py b/GPy/__version__.py
index f49459c7..9f0329de 100644
--- a/GPy/__version__.py
+++ b/GPy/__version__.py
@@ -1 +1 @@
-__version__ = "1.6.1"
+__version__ = "1.7.7"
diff --git a/GPy/core/gp.py b/GPy/core/gp.py
index b90c95c1..7f23e5af 100644
--- a/GPy/core/gp.py
+++ b/GPy/core/gp.py
@@ -562,11 +562,12 @@ class GP(Model):
"""
self.inference_method.on_optimization_start()
try:
- super(GP, self).optimize(optimizer, start, messages, max_iters, ipython_notebook, clear_after_finish, **kwargs)
+ ret = super(GP, self).optimize(optimizer, start, messages, max_iters, ipython_notebook, clear_after_finish, **kwargs)
except KeyboardInterrupt:
print("KeyboardInterrupt caught, calling on_optimization_end() to round things up")
self.inference_method.on_optimization_end()
raise
+ return ret
def infer_newX(self, Y_new, optimize=True):
"""
diff --git a/GPy/core/sparse_gp_mpi.py b/GPy/core/sparse_gp_mpi.py
index a26b858f..f12ae7a7 100644
--- a/GPy/core/sparse_gp_mpi.py
+++ b/GPy/core/sparse_gp_mpi.py
@@ -88,9 +88,9 @@ class SparseGP_MPI(SparseGP):
def optimize(self, optimizer=None, start=None, **kwargs):
self._IN_OPTIMIZATION_ = True
if self.mpi_comm==None:
- super(SparseGP_MPI, self).optimize(optimizer,start,**kwargs)
+ ret = super(SparseGP_MPI, self).optimize(optimizer,start,**kwargs)
elif self.mpi_comm.rank==0:
- super(SparseGP_MPI, self).optimize(optimizer,start,**kwargs)
+ ret = super(SparseGP_MPI, self).optimize(optimizer,start,**kwargs)
self.mpi_comm.Bcast(np.int32(-1),root=0)
elif self.mpi_comm.rank>0:
x = self.optimizer_array.copy()
@@ -111,6 +111,7 @@ class SparseGP_MPI(SparseGP):
self._IN_OPTIMIZATION_ = False
raise Exception("Unrecognizable flag for synchronization!")
self._IN_OPTIMIZATION_ = False
+ return ret
def parameters_changed(self):
if isinstance(self.inference_method,VarDTC_minibatch):
diff --git a/GPy/testing/gpy_kernels_state_space_tests.py b/GPy/testing/gpy_kernels_state_space_tests.py
index f39eb9d0..c06093dd 100644
--- a/GPy/testing/gpy_kernels_state_space_tests.py
+++ b/GPy/testing/gpy_kernels_state_space_tests.py
@@ -306,11 +306,7 @@ class StateSpaceKernelsTests(np.testing.TestCase):
gp_kernel=gp_kernel,
mean_compare_decimal=2, var_compare_decimal=2)
- def test_forecast(self,):
- """
- Test time-series forecasting.
- """
-
+ def test_forecast_regular(self,):
# Generate data ->
np.random.seed(339) # seed the random number generator
#import pdb; pdb.set_trace()
@@ -334,37 +330,102 @@ class StateSpaceKernelsTests(np.testing.TestCase):
#import pdb; pdb.set_trace()
- def get_new_kernels():
- periodic_kernel = GPy.kern.StdPeriodic(1,active_dims=[0,])
- gp_kernel = GPy.kern.Linear(1, active_dims=[0,]) + GPy.kern.Bias(1, active_dims=[0,]) + periodic_kernel
- gp_kernel.std_periodic.lengthscale.constrain_bounded(0.25, 1000)
- gp_kernel.std_periodic.period.constrain_bounded(0.15, 100)
+ periodic_kernel = GPy.kern.StdPeriodic(1,active_dims=[0,])
+ gp_kernel = GPy.kern.Linear(1, active_dims=[0,]) + GPy.kern.Bias(1, active_dims=[0,]) + periodic_kernel
+ gp_kernel.std_periodic.lengthscale.constrain_bounded(0.25, 1000)
+ gp_kernel.std_periodic.period.constrain_bounded(0.15, 100)
- periodic_kernel = GPy.kern.sde_StdPeriodic(1,active_dims=[0,])
- ss_kernel = GPy.kern.sde_Linear(1,X,active_dims=[0,]) + \
- GPy.kern.sde_Bias(1, active_dims=[0,]) + periodic_kernel
+ periodic_kernel = GPy.kern.sde_StdPeriodic(1,active_dims=[0,])
+ ss_kernel = GPy.kern.sde_Linear(1,X,active_dims=[0,]) + \
+ GPy.kern.sde_Bias(1, active_dims=[0,]) + periodic_kernel
- ss_kernel.std_periodic.lengthscale.constrain_bounded(0.25, 1000)
- ss_kernel.std_periodic.period.constrain_bounded(0.15, 100)
+ ss_kernel.std_periodic.lengthscale.constrain_bounded(0.25, 1000)
+ ss_kernel.std_periodic.period.constrain_bounded(0.15, 100)
- return ss_kernel, gp_kernel
-
- ss_kernel, gp_kernel = get_new_kernels()
self.run_for_model(X_train, Y_train, ss_kernel, kalman_filter_type = 'regular',
use_cython=False, optimize_max_iters=30, check_gradients=True,
predict_X=X_test,
gp_kernel=gp_kernel,
mean_compare_decimal=2, var_compare_decimal=2)
+ def test_forecast_svd(self,):
+ # Generate data ->
+ np.random.seed(339) # seed the random number generator
+ #import pdb; pdb.set_trace()
+ (X,Y) = generate_sine_data(x_points=None, sin_period=5.0, sin_ampl=5.0, noise_var=2.0,
+ plot = False, points_num=100, x_interval = (0, 40), random=True)
+
+ (X1,Y1) = generate_linear_data(x_points=X, tangent=1.0, add_term=20.0, noise_var=0.0,
+ plot = False, points_num=100, x_interval = (0, 40), random=True)
+
+ Y = Y + Y1
+
+ X_train = X[X <= 20]
+ Y_train = Y[X <= 20]
+ X_test = X[X > 20]
+ Y_test = Y[X > 20]
+
+ X.shape = (X.shape[0],1); Y.shape = (Y.shape[0],1)
+ X_train.shape = (X_train.shape[0],1); Y_train.shape = (Y_train.shape[0],1)
+ X_test.shape = (X_test.shape[0],1); Y_test.shape = (Y_test.shape[0],1)
+ # Generate data <-
+
+ #import pdb; pdb.set_trace()
+
+ periodic_kernel = GPy.kern.StdPeriodic(1,active_dims=[0,])
+ gp_kernel = GPy.kern.Linear(1, active_dims=[0,]) + GPy.kern.Bias(1, active_dims=[0,]) + periodic_kernel
+ gp_kernel.std_periodic.lengthscale.constrain_bounded(0.25, 1000)
+ gp_kernel.std_periodic.period.constrain_bounded(0.15, 100)
+
+ periodic_kernel = GPy.kern.sde_StdPeriodic(1,active_dims=[0,])
+ ss_kernel = GPy.kern.sde_Linear(1,X,active_dims=[0,]) + \
+ GPy.kern.sde_Bias(1, active_dims=[0,]) + periodic_kernel
+
+ ss_kernel.std_periodic.lengthscale.constrain_bounded(0.25, 1000)
+ ss_kernel.std_periodic.period.constrain_bounded(0.15, 100)
- ss_kernel, gp_kernel = get_new_kernels()
self.run_for_model(X_train, Y_train, ss_kernel, kalman_filter_type = 'svd',
use_cython=False, optimize_max_iters=30, check_gradients=False,
predict_X=X_test,
gp_kernel=gp_kernel,
mean_compare_decimal=2, var_compare_decimal=2)
- ss_kernel, gp_kernel = get_new_kernels()
+ def test_forecast_svd_cython(self,):
+ # Generate data ->
+ np.random.seed(339) # seed the random number generator
+ #import pdb; pdb.set_trace()
+ (X,Y) = generate_sine_data(x_points=None, sin_period=5.0, sin_ampl=5.0, noise_var=2.0,
+ plot = False, points_num=100, x_interval = (0, 40), random=True)
+
+ (X1,Y1) = generate_linear_data(x_points=X, tangent=1.0, add_term=20.0, noise_var=0.0,
+ plot = False, points_num=100, x_interval = (0, 40), random=True)
+
+ Y = Y + Y1
+
+ X_train = X[X <= 20]
+ Y_train = Y[X <= 20]
+ X_test = X[X > 20]
+ Y_test = Y[X > 20]
+
+ X.shape = (X.shape[0],1); Y.shape = (Y.shape[0],1)
+ X_train.shape = (X_train.shape[0],1); Y_train.shape = (Y_train.shape[0],1)
+ X_test.shape = (X_test.shape[0],1); Y_test.shape = (Y_test.shape[0],1)
+ # Generate data <-
+
+ #import pdb; pdb.set_trace()
+
+ periodic_kernel = GPy.kern.StdPeriodic(1,active_dims=[0,])
+ gp_kernel = GPy.kern.Linear(1, active_dims=[0,]) + GPy.kern.Bias(1, active_dims=[0,]) + periodic_kernel
+ gp_kernel.std_periodic.lengthscale.constrain_bounded(0.25, 1000)
+ gp_kernel.std_periodic.period.constrain_bounded(0.15, 100)
+
+ periodic_kernel = GPy.kern.sde_StdPeriodic(1,active_dims=[0,])
+ ss_kernel = GPy.kern.sde_Linear(1,X,active_dims=[0,]) + \
+ GPy.kern.sde_Bias(1, active_dims=[0,]) + periodic_kernel
+
+ ss_kernel.std_periodic.lengthscale.constrain_bounded(0.25, 1000)
+ ss_kernel.std_periodic.period.constrain_bounded(0.15, 100)
+
self.run_for_model(X_train, Y_train, ss_kernel, kalman_filter_type = 'svd',
use_cython=True, optimize_max_iters=30, check_gradients=False,
predict_X=X_test,
diff --git a/GPy/util/datasets.py b/GPy/util/datasets.py
index 6cad1eed..f8fa8239 100644
--- a/GPy/util/datasets.py
+++ b/GPy/util/datasets.py
@@ -206,7 +206,10 @@ def authorize_download(dataset_name=None):
def download_data(dataset_name=None):
"""Check with the user that the are happy with terms and conditions for the data set, then download it."""
- import itertools
+ try:
+ from itertools import zip_longest
+ except ImportError:
+ from itertools import izip_longest as zip_longest
dr = data_resources[dataset_name]
if not authorize_download(dataset_name):
@@ -220,8 +223,8 @@ def download_data(dataset_name=None):
if 'suffices' in dr: zip_urls += (dr['suffices'], )
else: zip_urls += ([],)
- for url, files, save_names, suffices in itertools.zip_longest(*zip_urls, fillvalue=[]):
- for f, save_name, suffix in itertools.zip_longest(files, save_names, suffices, fillvalue=None):
+ for url, files, save_names, suffices in zip_longest(*zip_urls, fillvalue=[]):
+ for f, save_name, suffix in zip_longest(files, save_names, suffices, fillvalue=None):
download_url(os.path.join(url,f), dataset_name, save_name, suffix=suffix)
return True
diff --git a/GPy/util/normalizer.py b/GPy/util/normalizer.py
index 78ad945d..557d9825 100644
--- a/GPy/util/normalizer.py
+++ b/GPy/util/normalizer.py
@@ -1,7 +1,7 @@
'''
Created on Aug 27, 2014
-@author: t-mazwie
+@author: Max Zwiessele
'''
import logging
import numpy as np
diff --git a/MANIFEST.in b/MANIFEST.in
index 8e665256..cf220f31 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -16,6 +16,9 @@ recursive-include GPy *.c
recursive-include GPy *.h
recursive-include GPy *.pyx
+# LICENSE
+include LICENSE.txt
+
# Testing
#include GPy/testing/baseline/*.png
#include GPy/testing/pickle_test.pickle
diff --git a/README.md b/README.md
index 5a771e1b..ffbf6a34 100644
--- a/README.md
+++ b/README.md
@@ -76,7 +76,7 @@ If that is the case, it is best to clean the repo and reinstall.
[
](http://www.apple.com/osx/)
[
](https://en.wikipedia.org/wiki/List_of_Linux_distributions)
-Python 2.7, 3.4 and higher
+Python 2.7, 3.5 and higher
## Citation
diff --git a/appveyor.yml b/appveyor.yml
index 4ffda8f9..73e13280 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -3,12 +3,14 @@ environment:
secure: 8/ZjXFwtd1S7ixd7PJOpptupKKEDhm2da/q3unabJ00=
COVERALLS_REPO_TOKEN:
secure: d3Luic/ESkGaWnZrvWZTKrzO+xaVwJWaRCEP0F+K/9DQGPSRZsJ/Du5g3s4XF+tS
- gpy_version: 1.6.1
+ gpy_version: 1.7.7
matrix:
- PYTHON_VERSION: 2.7
MINICONDA: C:\Miniconda-x64
- PYTHON_VERSION: 3.5
MINICONDA: C:\Miniconda35-x64
+ - PYTHON_VERSION: 3.6
+ MINICONDA: C:\Miniconda36-x64
#configuration:
# - Debug
@@ -62,21 +64,21 @@ deploy_script:
- echo test >> %USERPROFILE%\\.pypirc
- echo[
- echo [pypi] >> %USERPROFILE%\\.pypirc
-- echo username:maxz >> %USERPROFILE%\\.pypirc
-- echo password:%pip_access% >> %USERPROFILE%\\.pypirc
+- echo username = maxz >> %USERPROFILE%\\.pypirc
+- echo password = %pip_access% >> %USERPROFILE%\\.pypirc
- echo[
- echo [test] >> %USERPROFILE%\\.pypirc
-- echo repository:https://test.pypi.org/legacy/ >> %USERPROFILE%\\.pypirc
-- echo username:maxz >> %USERPROFILE%\\.pypirc
-- echo password:%pip_access% >> %USERPROFILE%\\.pypirc
+- echo repository = https://testpypi.python.org/pypi >> %USERPROFILE%\\.pypirc
+- echo username = maxz >> %USERPROFILE%\\.pypirc
+- echo password = %pip_access% >> %USERPROFILE%\\.pypirc
- ps: >-
- if ($env:APPVEYOR_REPO_BRANCH -eq 'devel') {
- twine upload --skip-existing -r test dist/*
+ If ($env:APPVEYOR_REPO_BRANCH -eq 'devel') {
+ echo not deploying on devel # twine upload --skip-existing -r test dist/*
}
- elseif ($env:APPVEYOR_REPO_BRANCH -eq 'deploy') {
+ ElseIf ($env:APPVEYOR_REPO_BRANCH -eq 'deploy') {
twine upload --skip-existing dist/*
}
- else {
+ Else {
echo not deploying on other branches
}
diff --git a/setup.cfg b/setup.cfg
index 514f36eb..15ead644 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 1.6.1
+current_version = 1.7.7
tag = True
commit = True
diff --git a/setup.py b/setup.py
index ec18c338..55f81762 100644
--- a/setup.py
+++ b/setup.py
@@ -150,7 +150,7 @@ setup(name = 'GPy',
py_modules = ['GPy.__init__'],
test_suite = 'GPy.testing',
setup_requires = ['numpy>=1.7'],
- install_requires = ['numpy>=1.7', 'scipy>=0.16', 'six', 'paramz>=0.6.9'],
+ install_requires = ['numpy>=1.7', 'scipy>=0.16', 'six', 'paramz>=0.7.4'],
extras_require = {'docs':['sphinx'],
'optional':['mpi4py',
'ipython>=4.0.0',
@@ -169,9 +169,14 @@ setup(name = 'GPy',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3.3',
- 'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
+ 'Framework :: IPython',
+ 'Intended Audience :: Science/Research',
+ 'Intended Audience :: Developers',
+ 'Topic :: Software Development',
+ 'Topic :: Software Development :: Libraries :: Python Modules',
+
]
)