twodlearn.kernels module¶
-
class
twodlearn.kernels.
ConcatOnes
(**kargs)[source]¶ Bases:
twodlearn.core.common.TdlModel
Concat ones at the right of input matrix
Tdl autoinitialization with arguments:
Attributes:
-
class
twodlearn.kernels.
GaussianKernel
(l_scale=None, f_scale=None, y_scale=None, feature_ndims=1, **kargs)[source]¶ Bases:
twodlearn.core.common.TdlModel
gaussian kernel calculation between matrices X1 and X2
X1 is a matrix, whose rows represent samples. X2 is a matrix, whose rows represent samples.
\[K(i,j) = (f_{scale}^2) \exp(-0.5 (x_1(i)-x_2(j))^T (l^{-2}) I (x_1(i)-x_2(j)) ) + y_{scale}^2 I\]Tdl autoinitialization with arguments:
-
f_scale
[source]
-
feature_ndims
[source]
-
input_shape
[source]
-
l_scale
[source]
-
y_scale
[source]
-
-
class
twodlearn.kernels.
PairwiseL2
(x1, x2, name='PairwiseL2')[source]¶ Bases:
twodlearn.core.common.TdlOp
Tdl autoinitialization with arguments:
Attributes: