mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-01 07:46:22 +02:00
optimize_restarts() is now parallel (load-balanced). It also mantains compatibility with the verbose and robust options
This commit is contained in:
parent
894412a177
commit
1705ecce91
3 changed files with 41 additions and 10 deletions
|
|
@ -4,6 +4,16 @@
|
|||
|
||||
import numpy as np
|
||||
|
||||
def opt_wrapper(m, **kwargs):
|
||||
"""
|
||||
This function just wraps the optimization procedure of a GPy
|
||||
object so that optimize() pickleable (necessary for multiprocessing).
|
||||
"""
|
||||
m.randomize()
|
||||
m.optimize(**kwargs)
|
||||
return m.optimization_runs[-1]
|
||||
|
||||
|
||||
def linear_grid(D, n = 100, min_max = (-100, 100)):
|
||||
"""
|
||||
Creates a D-dimensional grid of n linearly spaced points
|
||||
|
|
@ -27,7 +37,7 @@ def kmm_init(X, m = 10):
|
|||
This is the same initialization algorithm that is used
|
||||
in Kmeans++. It's quite simple and very useful to initialize
|
||||
the locations of the inducing points in sparse GPs.
|
||||
|
||||
|
||||
:param X: data
|
||||
:param m: number of inducing points
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue