Commit graph

1085 commits

Author SHA1 Message Date
Martin Bubel
a6d78d79aa replace np.float by float 2023-10-16 18:53:11 +02:00
Martin Bubel
3c3ec60dea
Fix issues encountered in modern python versions (#1011)
* Update setup.py

remove special handling of scipy dependencies for old python versions

* Update __init__.py

replace numpy type by native type

* replace np.bool by bool
2023-04-21 17:32:33 +01:00
Yixin Lin
0a9893e839
Fix rank>0 thread exiting during SparseGP multiprocessing (#731)
If you run mpiexec -n 2 on any code to try to use MPI multiprocessing for SparseGPRegression, it crashes (see #618) because the rank>1 processes do not have ret defined.
2022-04-17 09:25:17 -07:00
gehbiszumeis
bb1bc50886
to_dict() and from_dict() functionality for Coregionalize Kernel and MixedNoise Likelihood class, appveyor CI resurrected (#951)
This PR adds two main things to GPy:
- to- and from-dict functions for the kernels listed belop
- a fix for the appveyor CI
Please see the squashed commit messages listed below.
Authors: @gehbiszumeis @ppk42 respectively
Reviewer: @ekalosak 

---
* new: added to_dict() method to Coregionalize kernel class

* new: added to_dict() method to MixedNoise likelihood class

* fix: made Y_metadata dict content serializable

* fix: typo

* added additional needed parameters to to_dict() method for Coregionalize kernel + added _build_from_input dict method

* new: added possibility to build MixedNoise likelihood from input_dict

* Y_metadata conversion from serializable to np.array when loading from dict

* fix: rework Y_metadata part for compatibility with unittests !minor

* conda cleanup in appveyors pipeline

* conda clean up after conda update

* conda clean before conda update

* try pinning packages for conda

* revert all conda changes

* conda clean all (not only packages)

* use conda update anaconda

* pin conda package

* pin conda package

* try installing charset-normalizer beforehand

* try to get from conda-forge

* revert all conda changes

* Try to fix the conda update challange.

See: https://community.intel.com/t5/Intel-Distribution-for-Python/Conda-update-Conda-fails/td-p/1126174

It is just a try for a different context/(conda version).

* Still fixing build error on appveyor

I also use a newer miniconda version for greater python versions.

* Update appveyor.yml

Thinking it over it decided to use miniconda38 for all python versions unless python 3.5.

* revert miniconda versioning changes

* adjust GPy version in appveyor.yml

* 1st attempt bring the appveyor build to life again

* #955 fixing ci build on appveyor

After bringing the miniconda env to work again, the wrong matplotlib version was used. This commit should fix that.

* #955 Fix CI build

Freezing numpy and scipy was a bad idea.
I freeze matplotlib  dependend  on the python version only.

* add: built_from_dict method for White Kernel

Co-authored-by: Peter Paul Kiefer <ppk42@users.noreply.github.com>
Co-authored-by: Peter Paul Kiefer <dafisppk@gmail.com>
2021-12-09 14:14:27 -05:00
Eric Kalosa-Kenyon
62d735e6a6
Fix GPy.priors.InverseGamma (#903)
* fixed InverseGamma prior: beforehand, it was a child class of Gamma but it defined a broken __new__ method of its own. Now, it just inherits Gamma's __new__; also added a test that ensures the InverseGamma can be instantiated and integrated into a GPy model

* overwrote misleading inherited methods in InverseGamma, deleted unnecessary repeated code
2021-05-26 17:37:55 -07:00
Aditya Saini
6751515c19
Fix docstring for gp.py::GP.__init__() (#915)
Removed indication in docstring that was incorrect: `kernel` is a required arg, but docstring stated it was optional. Now, docstring does not say it's optional.
2021-05-18 10:14:58 -07:00
monabf
ff82f12c3d
Corrected Multivariate Gaussian prior (#775)
* Corrected MultivariateGaussian prior

Some corrections including adapting to current version of pdinv, correcting the expressions of constant, pdf and its gradient, and adding the printing function. After some tests, seems to run as expected, similarly to the Gaussian prior which was already working.

* Added test of MultivariateGaussian prior

Simple unit test for creating a kernel with Multivariate Gaussian prior over the lengthscales, then performing GP regression.

* Took care of case where x of shape (n, 1) for multivariate Gaussian prior

* Got rid of unnecessary asserts in Multivariate Gaussian prior since loss of time

Co-authored-by: and <buisson-fenet@is.mpg.de>
2021-05-14 15:21:47 -07:00
Julien Bect
44f4739efb maint: Wrap very long lines (> 400 chars) 2020-06-24 16:22:19 +01:00
Julien Bect
0a9b1cc10d maint: Remove tabs (and some trailing spaces) 2020-06-20 08:11:01 +02:00
Neil Lawrence
490c4c73f5
Merge pull request #829 from jbect/init-super
Use super().__init__ consistently
2020-06-19 11:16:43 +01:00
bobturneruk
ef044197fb parameterization of priors 2020-06-18 14:41:06 +01:00
bobturneruk
66015895a7 lower level detail 2020-06-18 14:41:05 +01:00
bobturneruk
59a7742a9c initial core docs, class diagram 2020-06-18 14:41:05 +01:00
bobturneruk
07371cd777 add placeholder 2020-06-18 14:41:05 +01:00
bobturneruk
3375458dbb change rst syntax 2020-06-18 14:41:05 +01:00
Julien Bect
5dd81288f2 Use super().__init__ consistently, instead of sometimes calling base class __init__ directly 2020-06-18 15:32:59 +02:00
Zhenwen Dai
1f9ac259ca
Merge pull request #783 from MashaNaslidnyk/num-data-fix
Update self.num_data in GP when X is updated
2020-03-13 10:08:05 +00:00
Antoine Blanchard
7550b1e5ef fix normalizer 2020-01-14 15:32:25 -05:00
Masha Naslidnyk 🦉
7871af8dec self.num_data and self.input_dim are set dynamically in class GP() after the shape of X. In MRD, the user-specific values are passed around until X is defined. 2020-01-10 12:42:03 +00:00
Masha Naslidnyk 🦉
1e06c6ce2f Update self.num_data in GP when X is updated 2019-09-05 14:39:13 +01:00
mzwiessele
8446da628b fix: samples tests and plotting, multioutput 2018-09-02 19:07:23 +01:00
Neil Lawrence
e623078954
Merge branch 'devel' into devel 2018-09-01 04:38:02 -07:00
robromijnders
4b998da73a fix typo in docstring for GP.opimize() 2018-08-29 18:30:42 +02:00
Keerthana Elango
eca5806518 Return deserialized models with actual type instead of base type 2018-07-24 10:46:33 +01:00
Moreno
11aa6ea27b Serialization: Add docstrings 2018-06-07 09:52:13 +01:00
Moreno
7b2af57aee Sparse GP serialization 2018-05-16 08:53:55 +01:00
Diego Torrejon
69eb888ad1 Maintains consistency with numpy arrays 2018-03-22 16:32:05 -04:00
Diego Torrejon
90c2912ace Fixes the dimensions of the samples output 2018-03-21 18:00:13 -04:00
mzwiessele
47cf3ed696 fix: Gamma prior no assignment after init 2018-02-22 16:33:54 +01:00
Max Zwiessele
56696ced27
Merge pull request #597 from marpulli/devel
Allow calculation of full predictive covariance matrices with multipl…
2018-02-12 16:32:12 +01:00
Mark Pullin
aa116517cf Make predictive_gradients more efficient 2018-02-06 20:51:59 +00:00
Mark Pullin
ccfcfa1a85 Allow calculation of full predictive covariance matrices with multiple outputs and normalization 2018-02-05 11:21:02 +00:00
Max Zwiessele
2cd2d991ce
fix: #590
Y_normalized was not used for running optimization
2018-01-10 14:16:36 +01:00
Andrei Paleyes
ae3ea375f8 Moved posterior_covariance to Posterior class 2018-01-08 15:07:57 +00:00
Andrei Paleyes
0e2ec01839 Implemented utility function to compute covariance between points in GP Model 2018-01-05 11:40:59 +00:00
Neil Lawrence
0d26609b15
Rewrite poster_samples_f to return NxDxsize 2018-01-01 01:18:08 +01:00
Neil Lawrence
ff4f861fcb
Testing for dims should be checking whether 2nd dim is greater than 1 2017-12-31 23:22:23 +01:00
Neil Lawrence
cb1ab89d8a
Update gp.py
Sample return seemed to have been based on number of training data, not number of posterior samples requested.
2017-12-31 22:54:43 +01:00
Mark Pullin
456b7cd83b Small correction to doc 2017-11-27 10:58:21 +00:00
Mark Pullin
a24a9b3edc Add mean function functionality to dtc inference method 2017-11-13 22:18:42 +00:00
mzwiessele
8826ebeb8d fix: uniform prior instantiation 2017-10-02 16:04:44 +01:00
mzwiessele
28487a9551 fix: uniform prior can be positive and negative, depending on lower and upper bound 2017-10-02 11:47:25 +01:00
Max Zwiessele
3d38df94d8 Paramz 0.8 2017-10-02 09:40:47 +01:00
Moreno
e572bfb746 Basic framework for serializing GPy models 2017-09-11 12:18:01 +01:00
Alex Feldstein
4e8c95055c fix in sparse_gp_mpi optimizer 2017-03-20 13:27:25 -04:00
Alex Feldstein
221f7f792f fix for parallel optimization 2017-03-17 19:32:47 -04:00
mzwiessele
67b497e5df fix: beiwang will add GMM in full 2017-02-28 10:04:07 +00:00
mzwiessele
6cd13ac2b3 fix: Fixed numpy 1.12 indexing and shape preservation 2017-02-23 14:45:18 +00:00
mzwiessele
6fc0cc630c fix: predictive_gradients for new posterior class 2017-01-10 14:38:09 +00:00
beiwang
6aab528af2 gmm_creation 2016-11-11 18:12:14 +00:00