snow.h

来自「基于稀疏网络的精选机器学习模型」· C头文件 代码 · 共 107 行

H
107
字号
// -*-c++-*-//===========================================================//=     University of Illinois at Urbana-Champaign          =//=     Department of Computer Science                      =//=     Dr. Dan Roth - Cognitive Computation Group          =//=                                                         =//=  Project: SNoW                                          =//=                                                         =//=   Module: Snow.cpp                                      =//=  Version: 3.1.4                                         =//=  Authors: Jeff Rosen, Andrew Carlson, Nick Rizzolo      =//=     Date: xx/xx/99                                      = //=                                                         =//= Comments:                                               =//===========================================================#ifndef SNOW_H#define SNOW_H#include "GlobalParams.h"#include "SnowParam.h"#include "Cloud.h"#include "Network.h"// #ifdef SERVER_MODE_// #include "SendReceive.h"// #endif#include <stdlib.h>#ifndef WIN32#include <unistd.h>#endif#include <errno.h>#include <stdio.h>#include <ctype.h>#include <string.h>#ifndef WIN32#include <strings.h>#endif#include <algorithm>#include <iostream>#include <fstream>//#include <strstream>#include <iomanip>#ifndef WIN32extern "C"{  extern int getopt(int, char* const*, const char*);  extern char * optarg;}#endifclass Snow {public:  Snow( GlobalParams & gp_ );  ~Snow();  void Train();  void Test();  void Interactive();  void BasicTest( Network& network );  void Output( TargetRanking &rank, ofstream* errorStream, Example &ex,	       int &correct, int &suppressed, int examples, int not_labeled );  void FinalOutput( ostream& out, int correct, int suppressed, int examples,		    int not_labeled );  bool Predict( TargetRanking& rank );  FeatureID Evaluate();  void EvaluateExample(Example & example, TargetRanking & rank);  void EvaluateExample(istream * testStream, int & correct, 		       int & suppressed, int & examples,		       int not_labeled, ofstream * errorStream );  void presentTrainExample(Example * example = 0, 			   ofstream * outputConjunctionStream = 0);  void Pause();  void WriteAlgorithms(ostream * out);  static const char * logo[];  Network * network;  GlobalParams globalParams;  TargetRanking * holdRank;  bool DEBUG_ME;private:  int mistakes;};#endif

⌨️ 快捷键说明

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