コード例 #1
0
 /// <summary>
 /// Creates DFRSimilarity from the three components.
 /// <para/>
 /// Note that <c>null</c> values are not allowed:
 /// if you want no normalization or after-effect, instead pass
 /// <see cref="Normalization.NoNormalization"/> or <see cref="AfterEffect.NoAfterEffect"/> respectively. </summary>
 /// <param name="basicModel"> Basic model of information content </param>
 /// <param name="afterEffect"> First normalization of information gain </param>
 /// <param name="normalization"> Second (length) normalization </param>
 public DFRSimilarity(BasicModel basicModel, AfterEffect afterEffect, Normalization normalization)
 {
     if (basicModel == null || afterEffect == null || normalization == null)
     {
         throw new NullReferenceException("null parameters not allowed.");
     }
     this.m_basicModel    = basicModel;
     this.m_afterEffect   = afterEffect;
     this.m_normalization = normalization;
 }
コード例 #2
0
ファイル: IBSimilarity.cs プロジェクト: wow64bb/YAFNET
 /// <summary>
 /// Creates IBSimilarity from the three components.
 /// <para/>
 /// Note that <c>null</c> values are not allowed:
 /// if you want no normalization, instead pass
 /// <see cref="Normalization.NoNormalization"/>. </summary>
 /// <param name="distribution"> probabilistic distribution modeling term occurrence </param>
 /// <param name="lambda"> distribution's &#955;<sub>w</sub> parameter </param>
 /// <param name="normalization"> term frequency normalization </param>
 public IBSimilarity(Distribution distribution, Lambda lambda, Normalization normalization)
 {
     this.m_distribution  = distribution;
     this.m_lambda        = lambda;
     this.m_normalization = normalization;
 }