Loading...
Searching...
No Matches
kernelModel.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
//
#ifndef KMODEL
#define KMODEL
#ifndef NLMODEL
#include <BALL/QSAR/nonlinearModel.h>
#endif
#ifndef LMODEL
#include <BALL/QSAR/linearModel.h>
#endif
#ifndef KERNEL
#include <BALL/QSAR/kernel.h>
#endif
namespace BALL
{
namespace QSAR
{
class BALL_EXPORT KernelModel : public NonLinearModel
{
public:
KernelModel(const QSARData& q, int k_type, double p1, double p2);
KernelModel(const QSARData& q, String f, String g);
KernelModel(const QSARData& q, Eigen::VectorXd& w);
KernelModel(const QSARData& q, const LinearModel& lm, int column);
~KernelModel();
virtual void saveToFile(string filename);
virtual void readFromFile(string filename);
virtual Eigen::VectorXd predict(const vector<double>& substance, bool transform);
void operator=(const Model& m);
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Kernel* kernel;
protected:
Eigen::MatrixXd K_;
//Matrix B;
void calculateOffsets();
void readKernelParametersFromFile(std::ifstream& in);
void saveKernelParametersToFile(std::ofstream& out);
void saveTrainingResult(std::ofstream& out);
void readTrainingResult(std::ifstream& input, int no_substances, int no_y);
friend class RegressionValidation;
//}@
};
}
}
#endif // NLMODEL
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
kernel.h
BALL::QSAR::KernelModel::~KernelModel
~KernelModel()
BALL::QSAR::KernelModel::KernelModel
KernelModel(const QSARData &q, Eigen::VectorXd &w)
BALL::QSAR::KernelModel::operator=
void operator=(const Model &m)
BALL::QSAR::KernelModel::saveToFile
virtual void saveToFile(string filename)
BALL::QSAR::KernelModel::KernelModel
KernelModel(const QSARData &q, int k_type, double p1, double p2)
BALL::QSAR::KernelModel::KernelModel
KernelModel(const QSARData &q, const LinearModel &lm, int column)
BALL::QSAR::KernelModel::kernel
Kernel * kernel
Definition kernelModel.h:57
BALL::QSAR::KernelModel::predict
virtual Eigen::VectorXd predict(const vector< double > &substance, bool transform)
BALL::QSAR::KernelModel::calculateOffsets
void calculateOffsets()
BALL::QSAR::KernelModel::saveTrainingResult
void saveTrainingResult(std::ofstream &out)
BALL::QSAR::KernelModel::readFromFile
virtual void readFromFile(string filename)
BALL::QSAR::KernelModel::saveKernelParametersToFile
void saveKernelParametersToFile(std::ofstream &out)
BALL::QSAR::KernelModel::RegressionValidation
friend class RegressionValidation
Definition kernelModel.h:84
BALL::QSAR::KernelModel::readTrainingResult
void readTrainingResult(std::ifstream &input, int no_substances, int no_y)
BALL::QSAR::KernelModel::K_
Eigen::MatrixXd K_
Definition kernelModel.h:67
BALL::QSAR::KernelModel::KernelModel
KernelModel(const QSARData &q, String f, String g)
BALL::QSAR::KernelModel::readKernelParametersFromFile
void readKernelParametersFromFile(std::ifstream &in)
BALL::QSAR::Kernel
Definition QSAR/kernel.h:33
BALL::QSAR::LinearModel
Definition linearModel.h:18
BALL::QSAR::Model
Definition Model.h:35
BALL::QSAR::NonLinearModel::NonLinearModel
NonLinearModel(const QSARData &q)
BALL::QSAR::QSARData
Definition QSARData.h:56
BALL::String
Definition string.h:57
linearModel.h
BALL::QSAR
Definition allModel.h:17
BALL
Definition constants.h:13
nonlinearModel.h