BALL
1.4.1
|
00001 /* logitModel.h 00002 * 00003 * Copyright (C) 2009 Marcel Schumann 00004 * 00005 * This file is part of QuEasy -- A Toolbox for Automated QSAR Model 00006 * Construction and Validation. 00007 * QuEasy is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 3 of the License, or (at 00010 * your option) any later version. 00011 * 00012 * QuEasy is distributed in the hope that it will be useful, but 00013 * WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 // -*- Mode: C++; tab-width: 2; -*- 00022 // vi: set ts=2: 00023 // 00024 // 00025 00026 #ifndef LOGITMODEL 00027 #define LOGITMODEL 00028 00029 #ifndef CLASSIFICATION 00030 #include <BALL/QSAR/classificationModel.h> 00031 #endif 00032 00033 00034 00035 namespace BALL{ 00036 namespace QSAR { 00037 00039 class BALL_EXPORT LogitModel : public ClassificationModel 00040 { 00041 public: 00045 LogitModel(const QSARData& q); 00046 00047 ~LogitModel(); 00049 00050 00054 void train(); 00055 00056 Vector<double> predict(const vector<double>& substance, bool transform); 00057 00058 void saveToFile(string filename); 00059 00060 void readFromFile(string filename); 00062 00063 00064 protected: 00068 Matrix<double> training_result_; 00070 00071 }; 00072 } 00073 } 00074 00075 #endif // LOGITMODEL