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

📄 model.h

📁 机器学习工具:非常流行的一种分类器
💻 H
字号:
/* TinySVM -- Yet Another Tiny SVM Package $Id: model.h,v 1.25 2002/08/20 06:31:17 taku-ku Exp $; Copyright (C) 2001-2002  Taku Kudo <taku-ku@is.aist-nara.ac.jp> All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later verjsion. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.*/#ifndef _MODEL_H#define _MODEL_H#include "base_example.h"#include "param.h"#include "kernel.h"#include "classifier.h"// $Id: model.h,v 1.25 2002/08/20 06:31:17 taku-ku Exp $;namespace TinySVM {class Model: public BaseExample{ private:  double margin;  double vc;  Param  param;  Classifier *kernel; public:  double b;  double sphere;  double loss;  int    bsv;     int read         (const char *,  const char *mode = "r", const int offset = 0);  int write        (const char *,  const char *mode = "w", const int offset = 0);  int clear();  // classify  double classify (const char *);  double classify (const feature_node *);  // model information  double estimateMargin ();  double estimateSphere ();  double estimateVC ();  double estimateXA (const double rho = 2.0);  int compress (); // compress liner model  int    getSVnum ()            { return this->l; };  int    getBSVnum ()           { return this->bsv; };  int    getTrainingDataSize () { return this->svindex_size; };  double getLoss ()             { return this->loss; };  Model();  Model(const Param &);  ~Model();  Model& operator=(Model &m);};};#endif

⌨️ 快捷键说明

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