Class LMDirichletSimilarity
Bayesian smoothing using Dirichlet priors. From Chengxiang Zhai and John
Lafferty. 2001. A study of smoothing methods for language models applied to
Ad Hoc information retrieval. In Proceedings of the 24th annual international
ACM SIGIR conference on Research and development in information retrieval
(SIGIR '01). ACM, New York, NY, USA, 334-342.
The formula as defined the paper assigns a negative score to documents that
contain the term, but with fewer occurrences than predicted by the collection
language model. The Lucene implementation returns 0
for such
documents.
This is a Lucene.NET EXPERIMENTAL API, use at your own risk
Inheritance
System.Object
LMDirichletSimilarity
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Lucene.Net.dll
Syntax
public class LMDirichletSimilarity : LMSimilarity
Constructors
|
Improve this Doc
View Source
LMDirichletSimilarity()
Instantiates the similarity with the default μ value of 2000.
Declaration
public LMDirichletSimilarity()
|
Improve this Doc
View Source
LMDirichletSimilarity(LMSimilarity.ICollectionModel)
Instantiates the similarity with the default μ value of 2000.
Declaration
public LMDirichletSimilarity(LMSimilarity.ICollectionModel collectionModel)
Parameters
|
Improve this Doc
View Source
LMDirichletSimilarity(LMSimilarity.ICollectionModel, Single)
Instantiates the similarity with the provided μ parameter.
Declaration
public LMDirichletSimilarity(LMSimilarity.ICollectionModel collectionModel, float mu)
Parameters
|
Improve this Doc
View Source
LMDirichletSimilarity(Single)
Instantiates the similarity with the provided μ parameter.
Declaration
public LMDirichletSimilarity(float mu)
Parameters
Type |
Name |
Description |
System.Single |
mu |
|
Properties
|
Improve this Doc
View Source
Mu
Declaration
public virtual float Mu { get; }
Property Value
Type |
Description |
System.Single |
|
Methods
|
Improve this Doc
View Source
Explain(Explanation, BasicStats, Int32, Single, Single)
Declaration
protected override void Explain(Explanation expl, BasicStats stats, int doc, float freq, float docLen)
Parameters
Type |
Name |
Description |
Explanation |
expl |
|
BasicStats |
stats |
|
System.Int32 |
doc |
|
System.Single |
freq |
|
System.Single |
docLen |
|
Overrides
|
Improve this Doc
View Source
GetName()
Declaration
public override string GetName()
Returns
Type |
Description |
System.String |
|
Overrides
|
Improve this Doc
View Source
Score(BasicStats, Single, Single)
Declaration
public override float Score(BasicStats stats, float freq, float docLen)
Parameters
Type |
Name |
Description |
BasicStats |
stats |
|
System.Single |
freq |
|
System.Single |
docLen |
|
Returns
Type |
Description |
System.Single |
|
Overrides