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

📄 iistree.h

📁 Amis - A maximum entropy estimator 一个最大熵模型统计工具
💻 H
字号:
////////////////////////////////////////////////////////////////////////////  Copyright (c) 2000, Yusuke Miyao///  You may distribute under the terms of the Artistic License.//////  <id>$Id: IISTree.h,v 1.2 2003/05/11 18:12:09 yusuke Exp $</id>///  <collection>Maximum Entropy Estimator</collection>///  <name>IISTree.h</name>///  <overview>Optimized implementation of Improved Iterative Scaling///            for feature forests</overview>/////////////////////////////////////////////////////////////////////////#ifndef Amis_IISTree_h_#define Amis_IISTree_h_#include <amis/configure.h>#include <amis/IIS.h>#include <amis/EventTreeSpaceBase.h>#include <amis/ModelExpectTree.h>#include <amis/AlphaSet.h>AMIS_NAMESPACE_BEGIN///////////////////////////////////////////////////////////////////////// <classdef>/// <name>IISTree</name>/// <overview>Improved Iterative Scaling for feature forests</overview>/// <desc>/// A maximum entropy estimator based on the Improved Iterative Scaling/// algorithm for feature forest model./// </desc>/// <body>template < class Feature, class FeatureFreqArray, class AlphaSet >class IISTree : public IISBase< ModelBase,				EventTreeSpaceBase< Feature >,				FeatureFreqArray,                                ModelExpectTree< Feature, FeatureFreqArray, AlphaSet > > {public:  IISTree( int max = DEFAULT_MAX_NEWTON_ITERATIONS )    : IISBase< ModelBase,	       EventTreeSpaceBase< Feature >,	       FeatureFreqArray,	       ModelExpectTree< Feature, FeatureFreqArray, AlphaSet > >( max ) {}  IISTree( ModelBase& init_model, EventTreeSpaceBase< Feature >& init_event, int max = DEFAULT_MAX_NEWTON_ITERATIONS )    : IISBase< ModelBase,	       EventTreeSpaceBase< Feature >,	       FeatureFreqArray,	       ModelExpectTree< Feature, FeatureFreqArray, AlphaSet > >( init_model, init_event, max ) {}  virtual ~IISTree() {}  const std::string estimatorName( void ) const {    return "IISTree<" + Feature::featureTypeName() + "," + FeatureFreqArray::featureFreqArrayName() + ">";  }  /// Get the name of this class};/// </body>/// </classdef>template < class Feature >class IISTreeHash : public IISTree< Feature, FeatureFreqMap< Feature >, AlphaMap< Feature > > {public:  IISTreeHash( int max = DEFAULT_MAX_NEWTON_ITERATIONS )    : IISTree< Feature, FeatureFreqMap< Feature >, AlphaMap< Feature > >( max ) {}  IISTreeHash( ModelBase& m, EventTreeSpaceBase< Feature >& e, int max = DEFAULT_MAX_NEWTON_ITERATIONS )    : IISTree< Feature, FeatureFreqMap< Feature >, AlphaMap< Feature > >( m, e, max ) {}  virtual ~IISTreeHash() {}};template < class Feature >class IISTreeVector : public IISTree< Feature, FeatureFreqVector< Feature >, AlphaQueue< Feature > > {public:  IISTreeVector( int max = DEFAULT_MAX_NEWTON_ITERATIONS )    : IISTree< Feature, FeatureFreqVector< Feature >, AlphaQueue< Feature > >( max ) {}  IISTreeVector( ModelBase& m, EventTreeSpaceBase< Feature >& e, int max = DEFAULT_MAX_NEWTON_ITERATIONS )    : IISTree< Feature, FeatureFreqVector< Feature >, AlphaQueue< Feature > >( m, e, max ) {}  virtual ~IISTreeVector() {}};template <>class IISTreeVector< RealFeature > : public IISTree< RealFeature, FeatureFreqMap< RealFeature >, AlphaMap< RealFeature > > {public:  IISTreeVector( int max = DEFAULT_MAX_NEWTON_ITERATIONS )    : IISTree< RealFeature, FeatureFreqMap< RealFeature >, AlphaMap< RealFeature > >( max ) {}  IISTreeVector( ModelBase& m, EventTreeSpaceBase< RealFeature >& e, int max = DEFAULT_MAX_NEWTON_ITERATIONS )    : IISTree< RealFeature, FeatureFreqMap< RealFeature >, AlphaMap< RealFeature > >( m, e, max ) {}  virtual ~IISTreeVector() {}};AMIS_NAMESPACE_END#endif // Amis_IISTree_h_// end of IISTree.h

⌨️ 快捷键说明

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