Kernels
Kern_Linear
-
class Kern_Linear : public virtual Kern_Base
Linear kernel also knows as dot product kernel
Defined for two vectors x and y:
\[ K(\mathbf{x}, \mathbf{y}) = \mathbf{x}^T \mathbf{y} = \sum_i x^{(i)} y^{(i)} \]Subclassed by DM_Kern_Linear
Public Functions
-
virtual std::string get_label() const override
Return label of this object.
-
virtual double prime(const aed_type &b, const aed_type &af, const aed_type &ff) const override
Calculate inner product of the kernel derivative wrt to the second argument (b wrt af) with the force descriptor
b = basis vector
af = atomic energy descriptor
ff = force descriptor (TODO i-th dir component of it) TODO consider calculating all 3-directions at once
-
inline virtual void set_basis(const Matrix) override
Set basis for calculations.
Public Members
-
std::string label = "Kern_Linear"
Label used for this class
-
virtual std::string get_label() const override
Kern_Quadratic
-
class Kern_Quadratic : public virtual Kern_Base
Quadratic kernel - special case of 2nd order polynomial kernel
Defined for two vectors x and y:
\[ K(\mathbf{x}, \mathbf{y}) = \Big( \mathbf{x}^T \mathbf{y} \Big)^2 = \Big( \sum_i x^{(i)} y^{(i)} \Big)^2 \]See also
Subclassed by DM_Kern_Quadratic
Public Functions
-
virtual double prime(const aed_type &b, const aed_type &af, const aed_type &ff) const override
Calculate inner product of the kernel derivative wrt to the second argument (b wrt af) with the force descriptor
b = basis vector
af = atomic energy descriptor
ff = force descriptor (TODO i-th dir component of it) TODO consider calculating all 3-directions at once
-
virtual std::string get_label() const override
Return label of this object.
Public Members
-
std::string label = "Kern_Quadratic"
Label used for this class
-
virtual double prime(const aed_type &b, const aed_type &af, const aed_type &ff) const override
Kern_LQ
-
class Kern_LQ : public virtual Kern_Base
Linear + Quadratic kernel
Defined for two vectors x and y:
\[ K(\mathbf{x}, \mathbf{y}) = \mathbf{x}^T \mathbf{y} + \Big(\mathbf{x}^T \mathbf{y} \Big)^2 = \sum_i x^{(i)} y^{(i)} + \Big(\sum_i x^{(i)} y^{(i)} \Big)^2 \]See also
Subclassed by DM_Kern_LQ
Public Functions
-
virtual double prime(const aed_type &b, const aed_type &af, const aed_type &ff) const override
Calculate inner product of the kernel derivative wrt to the second argument (b wrt af) with the force descriptor
b = basis vector
af = atomic energy descriptor
ff = force descriptor (TODO i-th dir component of it) TODO consider calculating all 3-directions at once
-
virtual std::string get_label() const override
Return label of this object.
Public Members
-
std::string label = "Kern_LQ"
Label used for this class
-
virtual double prime(const aed_type &b, const aed_type &af, const aed_type &ff) const override
Kern_RBF
-
class Kern_RBF : public virtual Kern_Base
Radial Basis Function kernel.
Defined for two vectors x and y:
\[ K(\mathbf{x}, \mathbf{y}) = \exp\Big( -\frac{||\mathbf{x}-\mathbf{y}||^2} {2\sigma^2} \Big) \]Required Config key: MPARAMS <double> \( \sigma \)
See also
Subclassed by DM_Kern_RBF
Public Functions
-
Kern_RBF()
Label used for this class
-
virtual double prime(const aed_type &b, const aed_type &af, const aed_type &ff) const override
Calculate inner product of the kernel derivative wrt to the second argument (b wrt af) with the force descriptor
b = basis vector
af = atomic energy descriptor
ff = force descriptor (TODO i-th dir component of it) TODO consider calculating all 3-directions at once
-
virtual std::string get_label() const override
Return label of this object.
-
Kern_RBF()
Kern_Polynomial
-
class Kern_Polynomial : public virtual Kern_Base
Polynomial kernel.
Defined for two vectors x and y:
\[ K(\mathbf{x}, \mathbf{y}) = \big( \gamma*\mathbf{x}^T \mathbf{y} + \mathrm{c} \big)^{\mathrm{d}} \]Required Config key: MPARAMS <int> d <double> \( \gamma \) c
See also
Subclassed by DM_Kern_Polynomial
Public Functions
-
virtual std::string get_label() const override
Return label of this object.
-
virtual double prime(const aed_type &b, const aed_type &af, const aed_type &ff) const override
Calculate inner product of the kernel derivative wrt to the second argument (b wrt af) with the force descriptor
b = basis vector
af = atomic energy descriptor
ff = force descriptor (TODO i-th dir component of it) TODO consider calculating all 3-directions at once
Public Members
-
std::string label = "Kern_Polynomial"
Label used for this class
-
virtual std::string get_label() const override
Kern_Sigmoid
-
class Kern_Sigmoid : public virtual Kern_Base
Sigmoid kernel.
Defined for two vectors x and y:
\[ K(\mathbf{x}, \mathbf{y}) = \tanh\big( \gamma*\mathbf{x}^T \mathbf{y} + \mathrm{c} \big) \]Required Config key: MPARAMS <double> \( \gamma \) c
See also
Subclassed by DM_Kern_Sigmoid
Public Functions
-
Kern_Sigmoid()
Label used for this class
-
virtual double prime(const aed_type &b, const aed_type &af, const aed_type &ff) const override
Calculate inner product of the kernel derivative wrt to the second argument (b wrt af) with the force descriptor
b = basis vector
af = atomic energy descriptor
ff = force descriptor (TODO i-th dir component of it) TODO consider calculating all 3-directions at once
-
virtual std::string get_label() const override
Return label of this object.
-
Kern_Sigmoid()
Kernel
-
class Kern_Base : public virtual Function_Base
Abstract class to be used as a base for all kernels.
b = basis vector
af = atomic energy descriptor
ff = force descriptor
all derivatives are defined wrt to the second argument
Subclassed by DM_Kern_Base, Kern_LQ, Kern_Linear, Kern_Polynomial, Kern_Quadratic, Kern_RBF, Kern_Sigmoid
Public Functions
-
virtual double prime(const aed_type &b, const aed_type &af, const aed_type &ff) const = 0
Calculate inner product of the kernel derivative wrt to the second argument (b wrt af) with the force descriptor
b = basis vector
af = atomic energy descriptor
ff = force descriptor (TODO i-th dir component of it) TODO consider calculating all 3-directions at once
-
virtual void set_basis(const Matrix b)
Set basis for calculations.
-
virtual const Matrix &get_basis() const
Return basis stored by this object.
-
virtual Matrix get_basis()
Return basis stored by this object.