Regressors
Overview
The models listed in this section map to C++ classes and the exact keywords you use in a configuration or task file. The match is literal but case-insensitive:
MODEL M_KRR Kern_RBF # pick Kernel Ridge Regression
MODEL M_BLR BF_Polynomial2 # pick Bayesian Linear Regression
Quick syntax guide
MODEL <Regressor> [<Kernel> | <BasisF>]
<Regressor>– one of the names under Regressors below (M_KRR,M_BLR…).<Kernel>– required for kernel methods (choose from the Kernels subsection).<BasisF>– required for linear / basis-function methods (choose from the Basis Functions subsection).Follow-up keys such as
MPARAMS,SBASISconfigure the model and are listed in each class’s table.
Examples
Kernel ridge regression with an RBF kernel:
MODEL M_KRR Kern_RBF
MPARAMS 0.5 # γ for RBF
Bayesian linear regression with the second order polynomial basis function:
MODEL M_BLR BF_Polynomial2
Reading the autogenerated tables
Each class entry provides:
A concise description & mathematical form.
The expected template parameter (kernel or basis).
Required context keys (bold in the “Required key” lines).
Select the class name you need, supply exactly the keys it expects (see Value Limits), and Tadah!MLIP will construct the corresponding regressor at run-time.
The remainder of this page lists every available regressor, followed by supported kernels and basis functions.
Regressors
M_KRR
-
template<class K = DM_Function_Base&>
class M_KRR : public tadah::mlip::M_Tadah_Base, public tadah::models::M_KRR_Train<DM_Function_Base&> Kernel Ridge Regression (KRR) with Empirical Kernel Map (EKM).
This class performs Kernel Ridge Regression using an Empirical Kernel Map to efficiently handle high-dimensional data. EKM is used to map objects into a kernel feature space, where linear methods can be applied.
Empirical Kernel Map (EKM):
Maps sample objects into finite-dimensional vectors in the kernel feature space.
Requires a kernel and basis samples to project new samples into the space defined by these bases.
Facilitates the kernelization of algorithms traditionally operating on vectors.
Supports basis sample selection through methods like random sampling or finding linearly independent subsets.
Usage:
Kernels: Use kernel functions (e.g., linear, RBF) to transform data for effective modeling in higher-dimensional spaces.
Contexturation Options:
LAMBDA: Controls regularization. Use
0for ordinary least squares, positive values for manual setting, or-1for automatic tuning.SBASIS: Defines the number of basis functions for nonlinear kernels.
- Template Parameters:
K – DM_Kern_Base child, Kernel function
Kernels
Kern_Linear
Kern_LQ
-
class Kern_LQ : public virtual tadah::models::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 tadah::mlip::DM_Kern_LQ
Kern_Polynomial
-
class Kern_Polynomial : public virtual tadah::models::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 tadah::core::Context key: MPARAMS <int> d <double> \( \gamma \) c
See also
Subclassed by tadah::mlip::DM_Kern_Polynomial
Kern_Quadratic
-
class Kern_Quadratic : public virtual tadah::models::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 tadah::mlip::DM_Kern_Quadratic
Kern_RBF
-
class Kern_RBF : public virtual tadah::models::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 tadah::core::Context key: MPARAMS <double> \( \sigma \)
See also
Subclassed by tadah::mlip::DM_Kern_RBF
Kern_Sigmoid
-
class Kern_Sigmoid : public virtual tadah::models::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 tadah::core::Context key: MPARAMS <double> \( \gamma \) c
See also
Subclassed by tadah::mlip::DM_Kern_Sigmoid
M_BLR
-
template<class BF = DM_Function_Base&>
class M_BLR : public tadah::mlip::M_Tadah_Base, public tadah::models::M_BLR_Train<DM_Function_Base&> Bayesian Linear Regression (BLR).
This class implements Bayesian Linear Regression, a statistical method to make predictions using linear models with both linear and nonlinear features.
Model Supported Training Modes:
LINEAR: Uses Ordinary Least Squares or Ridge Regression for linear relationships.
NONLINEAR: Utilizes basis functions to handle nonlinear input spaces, transforming input descriptors into higher-dimensional feature spaces. For example, polynomial transformations.
Prediction:
Computes predictions as a weighted sum of basis functions applied to input vectors.
Training:
Employs regularized least squares, allowing for optional regularization through the \(\lambda\) parameter.
Ordinary Least Squares (OLS) is a special case when \(\lambda = 0\).
Contexturation Options:
LAMBDA: Set to
0for OLS, a positive value for specified regularization, or-1for automatic tuning using evidence approximation.
- Template Parameters:
BF – DM_BF_Base child, Basis function