-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathshowChangeOperators.py
53 lines (40 loc) · 992 Bytes
/
showChangeOperators.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from GPy_ABCD.Util.kernelUtil import sampleCurves
from GPy_ABCD.Kernels.baseKernels import *
from GPy_ABCD.Kernels import sigmoidalKernels as _Sk
from matplotlib import pyplot as plt
## Direct Sigmoidal effects on a given kernel
kBase = C()
# # Ascending Sigmoid
# k_asc = kBase * _Sk.SigmoidalKernel(1, True)
# k_asc.plot()
# print(k_asc)
# print(sampleCurves(k_asc))
#
# # Descending Sigmoid
# k_desc = kBase * SigmoidalKernel(1, False)
# k_desc.plot()
# print(k_desc)
# print(sampleCurves(k_desc))
#
# # Peak Sigmoid
# k_peak = kBase * SigmoidalIndicatorKernel(1, True)
# k_peak.plot()
# print(k_peak)
# print(sampleCurves(k_peak))
#
# # Hole Sigmoid
# k_hole = kBase * SigmoidalIndicatorKernel(1, False)
# k_hole.plot()
# print(k_hole)
# print(sampleCurves(k_hole))
plt.show()
## Change Operators
k_CP = CP(LIN(), PER())
k_CP.plot()
print(k_CP)
print(sampleCurves(k_CP, xlims = (-3., 5.)))
k_CW = CW(LIN(), PER())
k_CW.plot()
print(k_CW)
print(sampleCurves(k_CW))
plt.show()