#include <BALL/QSAR/kernel.h>
|
void | calculateKernelMatrix (Matrix< double > &input, Matrix< double > &output) |
|
void | calculateKernelMatrix (Matrix< double > &K, Matrix< double > &m1, Matrix< double > &m2, Matrix< double > &output) |
|
void | calculateKernelVector (Matrix< double > &K, Vector< double > &m1, Matrix< double > &m2, Vector< double > &output) |
|
void | gridSearch (double step_width, int steps, int recursions, int k, bool opt=0) |
|
void | gridSearch (double step_width, int steps, bool first_rec, int k, double par1_start, double par2_start, bool opt) |
|
void | calculateWeightedKernelMatrix (Matrix< double > &input, Matrix< double > &output) |
|
void | calculateWeightedKernelMatrix (Matrix< double > &m1, Matrix< double > &m2, Matrix< double > &output) |
|
void | calculateKernelMatrix1 (Matrix< double > &input, Matrix< double > &output) |
|
void | calculateKernelMatrix2 (Matrix< double > &input, Matrix< double > &output) |
|
void | calculateKernelMatrix3 (Matrix< double > &input, Matrix< double > &output) |
|
void | calculateKernelMatrix4 (Matrix< double > &input, Matrix< double > &output) |
|
void | calculateKernelMatrix1 (Matrix< double > &m1, Matrix< double > &m2, Matrix< double > &output) |
|
void | calculateKernelMatrix2 (Matrix< double > &m1, Matrix< double > &m2, Matrix< double > &output) |
|
void | calculateKernelMatrix3 (Matrix< double > &m1, Matrix< double > &m2, Matrix< double > &output) |
|
void | calculateKernelMatrix4 (Matrix< double > &m1, Matrix< double > &m2, Matrix< double > &output) |
|
Definition at line 53 of file QSAR/kernel.h.
constructor for weighted distance kernel.
- Parameters
-
column | no of column of LinearModel.training_result that is to be used as weights vector |
BALL::QSAR::Kernel::~Kernel |
( |
| ) |
|
calculates pairwise distances between all substances in Matrix<double> input and saves them to Matrix<double> output.\n
If Kernel.weights is not empty, function Kernel.calculateWeightedDistanceMatrix() is used
Else if: Kernel.f=="" and Kernel.g="", the distance between two substances a and b is calculated as , with m=#descriptors
Else: distance is calculated as
calculates pairwise distance between all substances of m1 and m2 and saves them to Matrix<double> output. \n
If Kernel.weights is not empty, function Kernel.calculateWeightedDistanceMatrix() is used
Esle if: Kernel.f=="" and Kernel.g="", the distance between two substances a and b is calculated as , with m=#descriptors
Else: distance is calculated as
transforms test data 'input' into the kernel-saves and saves it to matrix 'output'
calculates pairwise distances between all substances in Matrix<double> input, weighted by the contribution of every descriptor (as encoded in Kernel.weights), and saves them to Matrix<double> output.\n
Distance between two substances a and b is calculated as , with m=#descriptors
calculates pairwise distances between all substances of m1 and m2, weighted by the contribution of every descriptor (as encoded in Kernel.weights), and saves them to Matrix<double> output.\n
Distance between two substances a and b is calculated as , with m=#descriptors
void BALL::QSAR::Kernel::gridSearch |
( |
double |
step_width, |
|
|
int |
steps, |
|
|
int |
recursions, |
|
|
int |
k, |
|
|
bool |
opt = 0 |
|
) |
| |
grid search for the best kernel parameters.\n
Grid search is done locally around the current kernel parameter value(s).
- Parameters
-
opt | if ==1, Model.optitimizeParameters() is used in each step of grid search, optimizing the parameter of the Model in addition to those of the kernel. |
step_width | the size of each step to be made |
steps | the number of steps for grid search |
recursions | number of recursions of grid search; in each recursion the step width is decreased by factor of 10 and searching is done in 20 steps around the values of the best kernel parameters determined in last recursion |
void BALL::QSAR::Kernel::gridSearch |
( |
double |
step_width, |
|
|
int |
steps, |
|
|
bool |
first_rec, |
|
|
int |
k, |
|
|
double |
par1_start, |
|
|
double |
par2_start, |
|
|
bool |
opt |
|
) |
| |
|
protected |
String BALL::QSAR::Kernel::equation1 |
Equation for distance function for calculation of kernel matrix.\n
Distance of two substances a and b is calculated as , with m=#descriptors
Use "x1" and "x2" in the String, e.g. "x1*x2"
Definition at line 121 of file QSAR/kernel.h.
String BALL::QSAR::Kernel::equation2 |
Equation for distance function for calculation of kernel matrix.\n
Distance of two substances a and b is calculated as , with m=#descriptors
g determines what is to be done with the calculated "sum" over all elements (use "sum" in String); e.g. "sum^0.5" => euclidean distance if f=="x1*x2"
Definition at line 126 of file QSAR/kernel.h.
Model* BALL::QSAR::Kernel::model_ |
|
protected |
pointer to the model which uses this kernel
Definition at line 170 of file QSAR/kernel.h.
double BALL::QSAR::Kernel::par1 |
parameters for kernel functions set by the user
Definition at line 116 of file QSAR/kernel.h.
double BALL::QSAR::Kernel::par2 |
int BALL::QSAR::Kernel::type |
specifies which kind of kernel is chosen:\n
1 = polynomial kernel
2 = radial basis function kernel
3 = sigmoid kernel
4 = individual kernel-function
5 = weighted distance kernel
Definition at line 113 of file QSAR/kernel.h.