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

📄 iisfix.h

📁 Amis - A maximum entropy estimator 一个最大熵模型统计工具
💻 H
字号:
////////////////////////////////////////////////////////////////////////////  Copyright (c) 2000, Yusuke Miyao///  You may distribute under the terms of the Artistic License.//////  <id>$Id: IISFix.h,v 1.2 2003/05/11 18:12:09 yusuke Exp $</id>///  <collection>Maximum Entropy Estimator</collection>///  <name>IISFix.h</name>///  <overview>Optimized implementation of Improved Iterative Scaling///            for fixed targets</overview>/////////////////////////////////////////////////////////////////////////#ifndef Amis_IISFix_h_#define Amis_IISFix_h_#include <amis/configure.h>#include <amis/IIS.h>#include <amis/EventFixSpace.h>//#include <amis/EventSpaceKernel.h>//#include <amis/ModelExpectFix.h>//#include <amis/ModelExpectFixKernel.h>AMIS_NAMESPACE_BEGIN//////////////////////////////////////////////////////////////////////template < class Feature, class FeatureFreqArray >class IISFix : public IISBase< ModelFixBase,		  EventFixSpaceBase< Feature >,		  FeatureFreqArray > {public:  IISFix( int m = DEFAULT_MAX_NEWTON_ITERATIONS )    : IISBase< ModelFixBase, EventFixSpaceBase< Feature >, FeatureFreqArray >( m ) {}  IISFix( ModelFixBase& init_model,           EventFixSpaceBase< Feature >& init_event, 	  int max = DEFAULT_MAX_NEWTON_ITERATIONS )    : IISBase< ModelFixBase, EventFixSpaceBase< Feature >, FeatureFreqArray >( init_model, init_event, max ) {}  virtual ~IISFix() {}  const std::string estimatorName( void ) const {    return "IISFix<" + Feature::featureTypeName() + "," + FeatureFreqArray::featureFreqArrayName() + ">";  }  /// Get the name of this class};template < class Feature >class IISFixHash : public IISFix< Feature, FeatureFreqMap< Feature > > {public:  IISFixHash( int max = DEFAULT_MAX_NEWTON_ITERATIONS )    : IISFix< Feature, FeatureFreqMap< Feature > >( max ) {}  IISFixHash( ModelFixBase& m, EventFixSpaceBase< Feature >& e, int max = DEFAULT_MAX_NEWTON_ITERATIONS )    : IISFix< Feature, FeatureFreqMap< Feature > >( m, e, max ) {}  virtual ~IISFixHash() {}};template < class Feature >class IISFixVector : public IISFix< Feature, FeatureFreqVector< Feature > > {public:  IISFixVector( int max = DEFAULT_MAX_NEWTON_ITERATIONS )    : IISFix< Feature, FeatureFreqVector< Feature > >( max ) {}  IISFixVector( ModelFixBase& m, EventFixSpaceBase< Feature >& e, int max = DEFAULT_MAX_NEWTON_ITERATIONS )    : IISFix< Feature, FeatureFreqVector< Feature > >( m, e, max ) {}  virtual ~IISFixVector() {}};template <>class IISFixVector< RealFeature > : public IISFix< RealFeature, FeatureFreqMap< RealFeature > > {public:  IISFixVector( int max = DEFAULT_MAX_NEWTON_ITERATIONS )    : IISFix< RealFeature, FeatureFreqMap< RealFeature > >( max ) {}  IISFixVector( ModelFixBase& m, EventFixSpaceBase< RealFeature >& e, int max = DEFAULT_MAX_NEWTON_ITERATIONS )    : IISFix< RealFeature, FeatureFreqMap< RealFeature > >( m, e, max ) {}  virtual ~IISFixVector() {}};AMIS_NAMESPACE_END#endif // Amis_IISFix_h_// end of IISFix.h

⌨️ 快捷键说明

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