⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 svmfusvmtest.h

📁 This is SvmFu, a package for training and testing support vector machines (SVMs). It s written in C
💻 H
字号:
//     This is a part of the SvmFu library, a library for training//     Support Vector Machines.//     Copyright (C) 2000  rif and MIT////     Contact: rif@mit.edu//     This program is free software; you can redistribute it and/or//     modify it under the terms of the GNU General Public License as//     published by the Free Software Foundation; either version 2 of//     the License, or (at your option) any later version.//     This program is distributed in the hope that it will be useful,//     but WITHOUT ANY WARRANTY; without even the implied warranty of//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the//     GNU General Public License for more details.//     You should have received a copy of the GNU General Public//     License along with this program; if not, write to the Free//     Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,//     MA 02111-1307 USA#ifndef SVMFU_SVM_TEST_HEADER#define SVMFU_SVM_TEST_HEADER#include "SvmFuSvmConstants.h"#include "SvmFuSvmTypedefs.h"using namespace std;#include <math.h>#include <iostream>#include <fstream>#include <string>#include <stdio.h>//! This is a small, lightweight SVM class, for testing purposes.template <class DataPt, class KernVal> class SvmTest {public:    SvmTest(int svmSize,	  double *alphas,	  DataPt *trnSetPtr,	  double b,	  int *y,	  const KernVal (*kernProdFuncPtr) (const DataPt &pt1, 					    const DataPt &pt2));    virtual ~SvmTest();  int    classifyDataPt (const DataPt &pt) const;  double outputAtDataPt (const DataPt &pt) const;    double computeDataSetPerformance(int dataSetSize, DataPt *dataSet,				   int *y, bool printInfo=true) const;				     private:  int svmSize_;  double *alphas_;  DataPt *trnSetPtr_;  double b_;  IntVec y_;  const KernVal(*kernProdFuncPtr_)(const DataPt &pt1, const DataPt &pt2);};#endif // SVMFU_SVM_TEST_HEADER

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -