asaplib.kernel package¶
Submodules¶
asaplib.kernel.kernel_transforms module¶
Methods and functions to convert descriptors to kernels for samples
Kernels are measures of similarity, i.e. s(a, b) > s(a, c) if objects a and b are considered “more similar” than objects a and c. A kernel must also be positive semi-definite.
Essentially, for each pair of samples a and b we compute k(a,b) based on the coordinates of descriptors d(a) and d(b)
-
class
asaplib.kernel.kernel_transforms.
Descriptors_to_Kernels
(k_spec_dict={})[source]¶ Bases:
object
-
add
(k_spec, tag)[source]¶ adding the specifications of a new kernel function :param k_spec: :type k_spec: a dictionary that specify which atomic descriptor to use
-
bind
()[source]¶ binds the objects that actually compute the kernels these objects need to have .transform() method to compute kernels from decriptor matrix [n_descriptors, n_samples]
-
-
class
asaplib.kernel.kernel_transforms.
Kernel_Function_Cosine
(k_spec)[source]¶ Bases:
asaplib.kernel.kernel_transforms.Kernel_Function_Base
-
class
asaplib.kernel.kernel_transforms.
Kernel_Function_Linear
(k_spec)[source]¶ Bases:
asaplib.kernel.kernel_transforms.Kernel_Function_Base
-
class
asaplib.kernel.kernel_transforms.
Kernel_Function_Polynomial
(k_spec)[source]¶ Bases:
asaplib.kernel.kernel_transforms.Kernel_Function_Base
asaplib.kernel.ml_kernel_operations module¶
some operations for kernel and distance matrices