41 #ifndef QSAR_EXCEPTION
66 virtual void operator=(
const Model& m);
74 void copyData(
const Model& m);
77 void copyDescriptorIDs(
const Model& m);
83 void readTrainingData();
92 virtual Vector<double> predict(
const vector<double>& substance,
bool transform) =0;
95 void deleteDescriptorIDs();
98 virtual void train() =0;
107 bool optimizeParameters(
int k);
109 virtual double calculateStdErr()
115 virtual vector<double> getParameters()
const;
118 std::multiset<unsigned int>* getDescriptorIDs();
120 void setDataSource(
const QSARData* q);
123 virtual void saveToFile(
string filename) = 0;
126 virtual void readFromFile(
string filename) = 0;
132 const vector<string>* getSubstanceNames();
135 const vector<string>* getDescriptorNames();
141 void setDescriptorIDs(
const std::multiset<unsigned int>& sl);
144 const string* getType();
147 void getUnnormalizedFeatureValue(
int compound,
int feature,
double& return_value);
150 void getUnnormalizedResponseValue(
int compound,
int response,
double& return_value);
177 Vector<double> getSubstanceVector(
const vector<double>& substance,
bool transform);
188 void readDescriptorInformation();
198 void readVector(
Vector<double>& vec, std::ifstream& in,
uint no_cells,
bool column_vector);
200 void readModelParametersFromFile(std::ifstream& in);
201 void saveModelParametersToFile(std::ofstream& out);
205 virtual void saveDescriptorInformationToFile(std::ofstream& out);
206 virtual void readDescriptorInformationFromFile(std::ifstream& in,
int no_descriptors,
bool transformation);
208 void readResponseTransformationFromFile(std::ifstream& in,
int no_y);
209 void saveResponseTransformationToFile(std::ofstream& out);
249 #ifdef BALL_HAS_LAPACK
253 #endif //BALL_HAS_LAPACK