From 747d24d2fa44502caf61efcc2cebbbb16bfb9680 Mon Sep 17 00:00:00 2001 From: mzwiessele Date: Thu, 13 Oct 2016 12:19:59 +0100 Subject: [PATCH] chg: added polynomial basis func kernel --- GPy/kern/src/basis_funcs.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/GPy/kern/src/basis_funcs.py b/GPy/kern/src/basis_funcs.py index 5d589aa6..bbd6ab17 100644 --- a/GPy/kern/src/basis_funcs.py +++ b/GPy/kern/src/basis_funcs.py @@ -102,6 +102,26 @@ class BasisFuncKernel(Kern): phi2 = phi2[:, None] return phi1.dot(phi2.T) +class PolinomialBasisFuncKernel(BasisFuncKernel): + def __init__(self, input_dim, degree, variance=1., active_dims=None, ARD=True, name='polinomial_basis'): + """ + A linear segment transformation. The segments start at start, \ + are then linear to stop and constant again. The segments are + normalized, so that they have exactly as much mass above + as below the origin. + + Start and stop can be tuples or lists of starts and stops. + Behaviour of start stop is as np.where(X