BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Private Member Functions | Private Attributes | List of all members
BALL::QSAR::LibsvmModel Class Reference

#include <BALL/QSAR/libsvmModel.h>

Inheritance diagram for BALL::QSAR::LibsvmModel:
BALL::QSAR::SVRModel BALL::QSAR::KernelModel BALL::QSAR::NonLinearModel BALL::QSAR::RegressionModel BALL::QSAR::Model

Classes

struct  svm_model
 

Public Member Functions

Constructors and Destructors
 LibsvmModel (const QSARData &q, int k_type, double p1, double p2=-1)
 
virtual ~LibsvmModel ()
 
Accessors
void train ()
 
void setParameters (vector< double > &v)
 
virtual vector< doublegetParameters () const
 
- Public Member Functions inherited from BALL::QSAR::SVRModel
 SVRModel (const QSARData &q, int k_type, double p1, double p2)
 
 ~SVRModel ()
 
- Public Member Functions inherited from BALL::QSAR::KernelModel
 KernelModel (const QSARData &q, int k_type, double p1, double p2)
 
 KernelModel (const QSARData &q, String f, String g)
 
 KernelModel (const QSARData &q, Vector< double > &w)
 
 KernelModel (const QSARData &q, const LinearModel &lm, int column)
 
 ~KernelModel ()
 
virtual void saveToFile (string filename)
 
virtual void readFromFile (string filename)
 
virtual Vector< doublepredict (const vector< double > &substance, bool transform)
 
void operator= (const Model &m)
 
- Public Member Functions inherited from BALL::QSAR::NonLinearModel
 NonLinearModel (const QSARData &q)
 
 ~NonLinearModel ()
 

Private Member Functions

struct svm_problem * createProblem (int response_id)
 
void createParameters ()
 

Private Attributes

struct svm_modelsvm_train_result_
 
struct svm_parameter parameters_
 
struct svm_node * x_space_
 
bool use_nu_
 
bool use_shrinking_
 
double nu_
 
double p_
 
double eps_
 
double C_
 

Additional Inherited Members

- Public Attributes inherited from BALL::QSAR::KernelModel
Kernelkernel
 
- Public Attributes inherited from BALL::QSAR::RegressionModel
RegressionValidationvalidation
 
- Public Attributes inherited from BALL::QSAR::Model
const QSARDatadata
 
Validationmodel_val
 
- Protected Member Functions inherited from BALL::QSAR::KernelModel
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)
 
- Protected Member Functions inherited from BALL::QSAR::NonLinearModel
- Protected Member Functions inherited from BALL::QSAR::RegressionModel
void readDescriptorInformationFromFile (std::ifstream &in, int no_descriptors, bool transformation, int no_coefficients)
 
void saveDescriptorInformationToFile (std::ofstream &out)
 
- Protected Attributes inherited from BALL::QSAR::KernelModel
Matrix< doubleK_
 
- Protected Attributes inherited from BALL::QSAR::RegressionModel
BALL::Matrix< doubletraining_result_
 
Vector< doubleoffsets_
 
- Friends inherited from BALL::QSAR::KernelModel

Detailed Description

Definition at line 41 of file libsvmModel.h.

Constructor & Destructor Documentation

BALL::QSAR::LibsvmModel::LibsvmModel ( const QSARData q,
int  k_type,
double  p1,
double  p2 = -1 
)
virtual BALL::QSAR::LibsvmModel::~LibsvmModel ( )
virtual

Member Function Documentation

void BALL::QSAR::LibsvmModel::createParameters ( )
private
struct svm_problem* BALL::QSAR::LibsvmModel::createProblem ( int  response_id)
readprivate
virtual vector<double> BALL::QSAR::LibsvmModel::getParameters ( ) const
virtual

Reimplemented from BALL::QSAR::Model.

void BALL::QSAR::LibsvmModel::setParameters ( vector< double > &  )
virtual

sets the model parameters according to the given values.

Reimplemented from BALL::QSAR::Model.

void BALL::QSAR::LibsvmModel::train ( )
virtual

Starts training the model.

Implements BALL::QSAR::Model.

Member Data Documentation

double BALL::QSAR::LibsvmModel::C_
private

Definition at line 108 of file libsvmModel.h.

double BALL::QSAR::LibsvmModel::eps_
private

Definition at line 107 of file libsvmModel.h.

double BALL::QSAR::LibsvmModel::nu_
private

Definition at line 105 of file libsvmModel.h.

double BALL::QSAR::LibsvmModel::p_
private

Definition at line 106 of file libsvmModel.h.

struct svm_parameter BALL::QSAR::LibsvmModel::parameters_
private

Definition at line 95 of file libsvmModel.h.

struct svm_model* BALL::QSAR::LibsvmModel::svm_train_result_
private

Definition at line 93 of file libsvmModel.h.

bool BALL::QSAR::LibsvmModel::use_nu_
private

determines whether nu-SVR is to be used; else eps-SVR is applied

Definition at line 100 of file libsvmModel.h.

bool BALL::QSAR::LibsvmModel::use_shrinking_
private

determines whether the libsvm shrinking heuristics is to be used

Definition at line 103 of file libsvmModel.h.

struct svm_node* BALL::QSAR::LibsvmModel::x_space_
private

Definition at line 97 of file libsvmModel.h.