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

📄 learningalgorithm.h

📁 基于稀疏网络的精选机器学习模型
💻 H
字号:
// -*-c++-*-//===========================================================//=     University of Illinois at Urbana-Champaign          =//=     Department of Computer Science                      =//=     Dr. Dan Roth - Cognitive Computation Group          =//=                                                         =//=  Project: SNoW                                          =//=                                                         =//=   Module: LearningAlgorithm.h                           =//=  Version: 3.2.0                                         =//=  Authors: Jeff Rosen, Andrew Carlson, Nick Rizzolo      =//=     Date: xx/xx/99                                      = //=                                                         =//= Comments:                                               =//===========================================================#ifndef LEARNINGALGORITHM_H__#define LEARNINGALGORITHM_H__#include "Example.h"#include "TargetIdSet.h"class Target;class LearningAlgorithm{  public:    LearningAlgorithm( double t = 1, double d = 0.1 )      : threshold(t), defaultWeight(d) { }    virtual bool PresentExample( Target& tar, Example& ex );    virtual void PerformPercentageEligibility( Target& tar );    virtual void TrainingComplete( Target& tar );    virtual void Discard( Target& tar );    virtual void Update( Target& tar, Example& ex, bool promote );    virtual void PrepareToRank();    virtual void SetTargetActivation( Target& tar, Example& ex );    virtual double ReturnNormalizedActivation( Target& tar );    virtual void Show( ostream* out ) = 0;    virtual void Read( ifstream& in ) = 0;    virtual void Write( ofstream& out ) = 0;    int     index;    TargetIdSet targetIds;    double  threshold;    double  defaultWeight;};inline bool LearningAlgorithm::PresentExample( Target& tar, Example& ex ){  cout << "LearningAlgorithm::PresentExample()...\n";  return false;}inline void LearningAlgorithm::PerformPercentageEligibility( Target& tar ){  cout << "LearningAlgorithm::PerformPercentageEligibility()...\n";}inline void LearningAlgorithm::TrainingComplete( Target& tar ){  cout << "LearningAlgorithm::TrainingComplete()...\n";}inline void LearningAlgorithm::Discard( Target& tar ){  cout << "LearningAlgorithm::Discard()...\n";}inline void LearningAlgorithm::Update( Target& tar, Example& ex,                                       bool promote ){  cout << "LearningAlgorithm::Update()...\n";}inline void LearningAlgorithm::PrepareToRank(){  cout << "LearningAlgorithm::PrepareToRank()...\n";}inline void LearningAlgorithm::SetTargetActivation( Target& tar, Example& ex ){  cout << "LearningAlgorithm::SetTargetActivation()...\n";}inline double LearningAlgorithm::ReturnNormalizedActivation( Target& tar ){  cout << "LearningAlgorithm::ReturnNormalizedActivation()...\n";  return 0;}#endif

⌨️ 快捷键说明

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