Class QualityStats
Results of quality benchmark run for a single query or for a set of queries.
Inheritance
Namespace: Lucene.Net.Benchmarks.Quality
Assembly: Lucene.Net.Benchmark.dll
Syntax
public class QualityStats : object
Constructors
| Improve this Doc View SourceQualityStats(Double, Int64)
Construct a QualityStats object with anticipated maximal number of relevant hits.
Declaration
public QualityStats(double maxGoodPoints, long searchTime)
Parameters
Type | Name | Description |
---|---|---|
System. |
maxGoodPoints | maximal possible relevant hits. |
System. |
searchTime |
Fields
| Improve this Doc View SourceMAX_POINTS
Number of points for which precision is computed.
Declaration
public static readonly int MAX_POINTS
Field Value
Type | Description |
---|---|
System. |
Properties
| Improve this Doc View SourceDocNamesExtractTime
Returns the time it took to extract doc names for judging the measured query, in milliseconds.
Declaration
public virtual long DocNamesExtractTime { get; }
Property Value
Type | Description |
---|---|
System. |
MaxGoodPoints
Returns the maximal number of good points. This is the number of relevant docs known by the judge for the measured query.
Declaration
public virtual double MaxGoodPoints { get; }
Property Value
Type | Description |
---|---|
System. |
MRR
Returns the Mean reciprocal rank over the queries or RR for a single query.
Declaration
public virtual double MRR { get; }
Property Value
Type | Description |
---|---|
System. |
Remarks
Reciprocal rank is defined as 1/r
where r
is the
rank of the first correct result, or 0
if there are no correct
results within the top 5 results.
This follows the definition in Question Answering - CNLP at the TREC-10 Question Answering Track.
NumGoodPoints
Returns the number of good points (only relevant points).
Declaration
public virtual double NumGoodPoints { get; }
Property Value
Type | Description |
---|---|
System. |
NumPoints
Returns the number of points (both relevant and irrelevant points).
Declaration
public virtual double NumPoints { get; }
Property Value
Type | Description |
---|---|
System. |
Recall
Return the recall: |{relevant hits found}| / |{relevant hits existing}|.
Declaration
public virtual double Recall { get; }
Property Value
Type | Description |
---|---|
System. |
SearchTime
Returns the search time in milliseconds for the measured query.
Declaration
public virtual long SearchTime { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
| Improve this Doc View SourceAddResult(Int32, Boolean, Int64)
Add a (possibly relevant) doc.
Declaration
public virtual void AddResult(int n, bool isRelevant, long docNameExtractTime)
Parameters
Type | Name | Description |
---|---|---|
System. |
n | rank of the added doc (its ordinal position within the query results). |
System. |
isRelevant |
|
System. |
docNameExtractTime |
Average(QualityStats[])
Create a Quality
Declaration
public static QualityStats Average(QualityStats[] stats)
Parameters
Type | Name | Description |
---|---|---|
Quality |
stats | array of input stats to be averaged. |
Returns
Type | Description |
---|---|
Quality |
an average over the input stats. |
GetAvp()
Return the average precision at recall points.
Declaration
public virtual double GetAvp()
Returns
Type | Description |
---|---|
System. |
GetPrecisionAt(Int32)
Return the precision at rank n:
|{relevant hits within first n
hits}| / n
.
Declaration
public virtual double GetPrecisionAt(int n)
Parameters
Type | Name | Description |
---|---|---|
System. |
n | requested precision point, must be at least 1 and at most MAX_POINTS. |
Returns
Type | Description |
---|---|
System. |
GetRecallPoints()
Returns the recallPoints.
Declaration
public virtual QualityStats.RecallPoint[] GetRecallPoints()
Returns
Type | Description |
---|---|
Quality |
Log(String, Int32, TextWriter, String)
Log information on this Quality
Declaration
public virtual void Log(string title, int paddLines, TextWriter logger, string prefix)
Parameters
Type | Name | Description |
---|---|---|
System. |
title | |
System. |
paddLines | |
Text |
logger | Logger. |
System. |
prefix | prefix before each log line. |