mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-15 06:52:39 +02:00
logistic seems working but more tests are needed
This commit is contained in:
parent
4dc6f0ec6c
commit
91e625a9bd
2 changed files with 5 additions and 3 deletions
|
|
@ -316,10 +316,12 @@ class MiscTests(unittest.TestCase):
|
|||
X = (2 * np.pi) * np.random.random(151) - np.pi
|
||||
Y = np.sin(X) + np.random.normal(0,0.2,151)
|
||||
Y = np.array([np.power(abs(y),float(1)/3) * (1,-1)[y<0] for y in Y])
|
||||
Y = np.abs(Y)
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
warp_k = GPy.kern.RBF(1)
|
||||
warp_f = GPy.util.warping_functions.TanhFunction(n_terms=2)
|
||||
#warp_f = GPy.util.warping_functions.TanhFunction(n_terms=2)
|
||||
warp_f = GPy.util.warping_functions.LogisticFunction(n_terms=2)
|
||||
warp_m = GPy.models.WarpedGP(X[:, None], Y[:, None], kernel=warp_k, warping_function=warp_f)
|
||||
|
||||
m = GPy.models.GPRegression(X[:, None], Y[:, None])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue