msmbuilder / osprey

🦅Hyperparameter optimization for machine learning pipelines 🦅
http://msmbuilder.org/osprey
Apache License 2.0
74 stars 26 forks source link

New gp kernels #227

Closed RobertArbon closed 6 years ago

RobertArbon commented 7 years ago

Added the ability to add an arbitrary number of GPy kernels to the gp strategy.

    kernels:
      - { name : GPy.kern.Matern52, params : {ARD : True}, options : {independent : False} }
      - { name : GPy.kern.White, params : {}, options: {independent : False} }
  1. The params dictionary specifies all the keyword arguments to be supplied in the kernel's instantiation.

  2. The options dictionary is left as something that controls other options on how the kernel is instantiated. At the moment only independent is coded for which controls whether the kernel acts on each dimension independently (kern = np.sum([kernel(1, active_dims=[i]) for i in range(self.n_dims)]) or jointly (kern = kernel(self.n_dims)).

  3. Kernels listed here are summed (not multiplied).

  4. Kernels can't accept arguments from internal data structures as in the current version e.g.

        self._kernf = Fixed(self.n_dims, tdot(V))

    but this could be easily changed by a list of variables specified to be passed to the kernel instantiation via a call to eval().

This is good enough for my purposes at the moment, but if you like what I've done and want me to make other changes let me know I'd be happy to work further on this.