mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-21 14:05:14 +02:00
Merge branch 'devel' into plotting_tests
This commit is contained in:
commit
218840d05c
14 changed files with 156 additions and 46 deletions
|
|
@ -15,7 +15,7 @@ addons:
|
|||
|
||||
env:
|
||||
- PYTHON_VERSION=2.7
|
||||
- PYTHON_VERSION=3.3
|
||||
#- PYTHON_VERSION=3.3
|
||||
- PYTHON_VERSION=3.4
|
||||
- PYTHON_VERSION=3.5
|
||||
|
||||
|
|
@ -61,7 +61,6 @@ deploy:
|
|||
password:
|
||||
secure: "vMEOlP7DQhFJ7hQAKtKC5hrJXFl5BkUt4nXdosWWiw//Kg8E+PPLg88XPI2gqIosir9wwgtbSBBbbwCxkM6uxRNMpoNR8Ixyv9fmSXp4rLl7bbBY768W7IRXKIBjpuEy2brQjoT+CwDDSzUkckHvuUjJDNRvUv8ab4P/qYO1LG4="
|
||||
on:
|
||||
tags: true
|
||||
branch: deploy
|
||||
distributions: $DIST
|
||||
skip_cleanup: true
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "1.0.9"
|
||||
__version__ = "1.2.0"
|
||||
|
|
|
|||
|
|
@ -7,4 +7,6 @@ from .mlp import MLP
|
|||
from .additive import Additive
|
||||
from .compound import Compound
|
||||
from .constant import Constant
|
||||
from .identity import Identity
|
||||
from .piecewise_linear import PiecewiseLinear
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class GPCoregionalizedRegression(GP):
|
|||
:type X_list: list of numpy arrays
|
||||
:param Y_list: list of observed values related to the different noise models
|
||||
:type Y_list: list of numpy arrays
|
||||
:param kernel: a GPy kernel, defaults to RBF ** Coregionalized
|
||||
:param kernel: a GPy kernel ** Coregionalized, defaults to RBF ** Coregionalized
|
||||
:type kernel: None | GPy.kernel defaults
|
||||
:likelihoods_list: a list of likelihoods, defaults to list of Gaussian likelihoods
|
||||
:type likelihoods_list: None | a list GPy.likelihoods
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class SparseGPCoregionalizedRegression(SparseGP):
|
|||
:type Y_list: list of numpy arrays
|
||||
:param Z_list: list of inducing inputs (optional)
|
||||
:type Z_list: empty list | list of numpy arrays
|
||||
:param kernel: a GPy kernel, defaults to RBF ** Coregionalized
|
||||
:param kernel: a GPy kernel ** Coregionalized, defaults to RBF ** Coregionalized
|
||||
:type kernel: None | GPy.kernel defaults
|
||||
:likelihoods_list: a list of likelihoods, defaults to list of Gaussian likelihoods
|
||||
:type likelihoods_list: None | a list GPy.likelihoods
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ def plot(parameterized, fignum=None, ax=None, colors=None, figsize=(12, 6)):
|
|||
else:
|
||||
raise ValueError("Need one ax per latent dimension input_dim")
|
||||
bg_lines.append(a.plot(means, c='k', alpha=.3))
|
||||
lines.extend(a.plot(x, means.T[i], c=colors.next(), label=r"$\mathbf{{X_{{{}}}}}$".format(i)))
|
||||
lines.extend(a.plot(x, means.T[i], c=next(colors), label=r"$\mathbf{{X_{{{}}}}}$".format(i)))
|
||||
fills.append(a.fill_between(x,
|
||||
means.T[i] - 2 * np.sqrt(variances.T[i]),
|
||||
means.T[i] + 2 * np.sqrt(variances.T[i]),
|
||||
|
|
@ -86,7 +86,7 @@ def plot_SpikeSlab(parameterized, fignum=None, ax=None, colors=None, side_by_sid
|
|||
# mean and variance plot
|
||||
a = fig.add_subplot(*sub1)
|
||||
a.plot(means, c='k', alpha=.3)
|
||||
plots.extend(a.plot(x, means.T[i], c=colors.next(), label=r"$\mathbf{{X_{{{}}}}}$".format(i)))
|
||||
plots.extend(a.plot(x, means.T[i], c=next(colors), label=r"$\mathbf{{X_{{{}}}}}$".format(i)))
|
||||
a.fill_between(x,
|
||||
means.T[i] - 2 * np.sqrt(variances.T[i]),
|
||||
means.T[i] + 2 * np.sqrt(variances.T[i]),
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ class SparseGPMinibatchTest(unittest.TestCase):
|
|||
def test_sparsegp_init(self):
|
||||
# Test if the different implementations give the exact same likelihood as the full model.
|
||||
# All of the following settings should give the same likelihood and gradients as the full model:
|
||||
try:
|
||||
np.random.seed(1234)
|
||||
Z = self.X[np.random.choice(self.X.shape[0], replace=False, size=10)].copy()
|
||||
Q = Z.shape[1]
|
||||
|
|
@ -149,6 +150,9 @@ class SparseGPMinibatchTest(unittest.TestCase):
|
|||
assert(m.checkgrad())
|
||||
m.optimize('adadelta', max_iters=10)
|
||||
assert(m.checkgrad())
|
||||
except ImportError:
|
||||
from nose import SkipTest
|
||||
raise SkipTest('climin not installed, skipping stochastic gradients')
|
||||
|
||||
def test_predict_missing_data(self):
|
||||
m = GPy.models.bayesian_gplvm_minibatch.BayesianGPLVMMiniBatch(self.Y, self.Q, X_variance=False, missing_data=True, stochastic=True, batchsize=self.Y.shape[1])
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ local_file = os.path.abspath(os.path.join(os.path.dirname( __file__ ), '..', 'in
|
|||
|
||||
# This specifies configurations specific to the user (it is found in the user home directory)
|
||||
home = os.getenv('HOME') or os.getenv('USERPROFILE')
|
||||
user_file = os.path.join(home,'.config','gpy', 'user.cfg')
|
||||
user_file = os.path.join(home,'.config','GPy', 'user.cfg')
|
||||
|
||||
# Read in the given files.
|
||||
config.readfp(open(default_file))
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ class PCA(object):
|
|||
kwargs.update(dict(s=s))
|
||||
plots = list()
|
||||
for i, l in enumerate(ulabels):
|
||||
kwargs.update(dict(color=colors.next(), marker=marker[i % len(marker)]))
|
||||
kwargs.update(dict(color=next(colors), marker=marker[i % len(marker)]))
|
||||
plots.append(ax.scatter(*X_[labels == l, :].T, label=str(l), **kwargs))
|
||||
ax.set_xlabel(r"PC$_1$")
|
||||
ax.set_ylabel(r"PC$_2$")
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ The Gaussian processes framework in Python.
|
|||
* Travis-CI [unit-tests](https://travis-ci.org/SheffieldML/GPy)
|
||||
* [](http://opensource.org/licenses/BSD-3-Clause)
|
||||
|
||||
[](https://travis-ci.org/SheffieldML/GPy) [](http://codecov.io/github/SheffieldML/GPy?branch=devel) [](http://depsy.org/package/python/GPy) [](https://landscape.io/github/SheffieldML/GPy/devel)
|
||||
[](https://travis-ci.org/SheffieldML/GPy) [](https://ci.appveyor.com/project/mzwiessele/gpy/branch/deploy) [](http://codecov.io/github/SheffieldML/GPy?branch=devel) [](http://depsy.org/package/python/GPy) [](https://landscape.io/github/SheffieldML/GPy/devel)
|
||||
|
||||
## Updated Structure
|
||||
|
||||
|
|
|
|||
89
appveyor.yml
Normal file
89
appveyor.yml
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
environment:
|
||||
pip_access:
|
||||
secure: 8/ZjXFwtd1S7ixd7PJOpptupKKEDhm2da/q3unabJ00=
|
||||
gpy_version: 1.2.0
|
||||
matrix:
|
||||
- PYTHON_VERSION: 2.7
|
||||
MINICONDA: C:\Miniconda-x64
|
||||
- PYTHON_VERSION: 3.5
|
||||
MINICONDA: C:\Miniconda35-x64
|
||||
|
||||
#configuration:
|
||||
# - Debug
|
||||
# - Release
|
||||
|
||||
install:
|
||||
- "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%"
|
||||
- conda config --set always_yes yes --set changeps1 no
|
||||
- conda update -q conda
|
||||
- conda info -a
|
||||
- "conda create -q -n build-environment python=%PYTHON_VERSION% numpy scipy matplotlib"
|
||||
- activate build-environment
|
||||
# We need wheel installed to build wheels
|
||||
- python -m pip install wheel
|
||||
# GPy needs paramz
|
||||
- python -m pip install paramz
|
||||
- python -m pip install nose-show-skipped
|
||||
- python -m pip install coverage
|
||||
- python -m pip install codecov
|
||||
- python -m pip install twine
|
||||
- "python setup.py develop"
|
||||
|
||||
build: off
|
||||
|
||||
test_script:
|
||||
# Put your test command here.
|
||||
# If you don't need to build C extensions on 64-bit Python 3.3 or 3.4,
|
||||
# you can remove "build.cmd" from the front of the command, as it's
|
||||
# only needed to support those cases.
|
||||
# Note that you must use the environment variable %PYTHON% to refer to
|
||||
# the interpreter you're using - Appveyor does not do anything special
|
||||
# to put the Python evrsion you want to use on PATH.
|
||||
#- "build.cmd %PYTHON%\\python.exe setup.py test"
|
||||
- "coverage run travis_tests.py"
|
||||
|
||||
after_test:
|
||||
# This step builds your wheels.
|
||||
- "python setup.py bdist_wheel bdist_wininst"
|
||||
- codecov
|
||||
|
||||
artifacts:
|
||||
# bdist_wheel puts your built wheel in the dist directory
|
||||
- path: dist\*
|
||||
|
||||
|
||||
deploy_script:
|
||||
- echo [distutils] > %USERPROFILE%\\.pypirc
|
||||
- echo index-servers = >> %USERPROFILE%\\.pypirc
|
||||
- echo pypi >> %USERPROFILE%\\.pypirc
|
||||
- echo test >> %USERPROFILE%\\.pypirc
|
||||
- echo[
|
||||
- echo [pypi] >> %USERPROFILE%\\.pypirc
|
||||
- echo username:maxz >> %USERPROFILE%\\.pypirc
|
||||
- echo password:%pip_access% >> %USERPROFILE%\\.pypirc
|
||||
- echo[
|
||||
- echo [test] >> %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 -r test dist/*
|
||||
}
|
||||
elseif ($env:APPVEYOR_REPO_BRANCH -eq 'deploy') {
|
||||
twine upload dist/*
|
||||
}
|
||||
else {
|
||||
echo not deploying on other branches
|
||||
}
|
||||
|
||||
# deploy:
|
||||
# - provider: GitHub
|
||||
# release: GPy-v$(gpy_version)
|
||||
# description: 'GPy windows install'
|
||||
# artifact: dist/*.exe # upload wininst to GitHub
|
||||
# draft: false
|
||||
# prerelease: false
|
||||
# on:
|
||||
# branch: deploy # release from deploy branch only
|
||||
# appveyor_repo_tag: true # deploy on tag push only
|
||||
24
codecov.yml
Normal file
24
codecov.yml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
codecov:
|
||||
branch: devel
|
||||
|
||||
coverage:
|
||||
precision: 2
|
||||
round: down
|
||||
range: "40...100"
|
||||
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
target: auto
|
||||
if_no_uploads: error
|
||||
|
||||
patch:
|
||||
default:
|
||||
if_no_uploads: error
|
||||
|
||||
changes: true
|
||||
|
||||
|
||||
comment:
|
||||
layout: "header, diff, changes, suggestions"
|
||||
behavior: default
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
[bumpversion]
|
||||
current_version = 1.0.9
|
||||
current_version = 1.2.0
|
||||
tag = False
|
||||
commit = True
|
||||
|
||||
[bumpversion:file:GPy/__version__.py]
|
||||
|
||||
[bdist_wheel]
|
||||
universal = 1
|
||||
[bumpversion:file:appveyor.yml]
|
||||
|
||||
[upload_docs]
|
||||
upload-dir = doc/build/html
|
||||
|
|
|
|||
11
setup.py
11
setup.py
|
|
@ -59,14 +59,7 @@ def read_to_rst(fname):
|
|||
|
||||
desc = """
|
||||
|
||||
- `GPy homepage <http://sheffieldml.github.io/GPy/>`_
|
||||
- `Tutorial notebooks <http://nbviewer.ipython.org/github/SheffieldML/notebook/blob/master/GPy/index.ipynb>`_
|
||||
- `User mailing-list <https://lists.shef.ac.uk/sympa/subscribe/gpy-users>`_
|
||||
- `Developer documentation <http://gpy.readthedocs.org/en/devel/>`_
|
||||
- `Travis-CI unit-tests <https://travis-ci.org/SheffieldML/GPy>`_
|
||||
- `License <https://opensource.org/licenses/BSD-3-Clause>`_
|
||||
|
||||
For full description and installation instructions please refer to the github page.
|
||||
Please refer to the github homepage for detailed instructions on installation and usage.
|
||||
|
||||
"""
|
||||
|
||||
|
|
@ -116,6 +109,7 @@ setup(name = 'GPy',
|
|||
author = read_to_rst('AUTHORS.txt'),
|
||||
author_email = "gpy.authors@gmail.com",
|
||||
description = ("The Gaussian Process Toolbox"),
|
||||
long_description = desc,
|
||||
license = "BSD 3-clause",
|
||||
keywords = "machine-learning gaussian-processes kernels",
|
||||
url = "http://sheffieldml.github.com/GPy/",
|
||||
|
|
@ -154,7 +148,6 @@ setup(name = 'GPy',
|
|||
include_package_data = True,
|
||||
py_modules = ['GPy.__init__'],
|
||||
test_suite = 'GPy.testing',
|
||||
long_description=desc,
|
||||
install_requires = ['numpy>=1.7', 'scipy>=0.16', 'six', 'paramz>=0.5.2'],
|
||||
extras_require = {'docs':['sphinx'],
|
||||
'optional':['mpi4py',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue