Class QualityStats
Results of quality benchmark run for a single query or for a set of queries.
Inherited Members
Namespace: Lucene.Net.Benchmarks.Quality
Assembly: Lucene.Net.Benchmark.dll
Syntax
public class QualityStats
Constructors
QualityStats(double, long)
Construct a QualityStats object with anticipated maximal number of relevant hits.
Declaration
public QualityStats(double maxGoodPoints, long searchTime)
Parameters
Type | Name | Description |
---|---|---|
double | maxGoodPoints | maximal possible relevant hits. |
long | searchTime |
Fields
MAX_POINTS
Number of points for which precision is computed.
Declaration
public static readonly int MAX_POINTS
Field Value
Type | Description |
---|---|
int |
Properties
DocNamesExtractTime
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 |
---|---|
long |
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 |
---|---|
double |
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.
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 |
---|---|
double |
NumGoodPoints
Returns the number of good points (only relevant points).
Declaration
public virtual double NumGoodPoints { get; }
Property Value
Type | Description |
---|---|
double |
NumPoints
Returns the number of points (both relevant and irrelevant points).
Declaration
public virtual double NumPoints { get; }
Property Value
Type | Description |
---|---|
double |
Recall
Return the recall: |{relevant hits found}| / |{relevant hits existing}|.
Declaration
public virtual double Recall { get; }
Property Value
Type | Description |
---|---|
double |
SearchTime
Returns the search time in milliseconds for the measured query.
Declaration
public virtual long SearchTime { get; }
Property Value
Type | Description |
---|---|
long |
Methods
AddResult(int, bool, long)
Add a (possibly relevant) doc.
Declaration
public virtual void AddResult(int n, bool isRelevant, long docNameExtractTime)
Parameters
Type | Name | Description |
---|---|---|
int | n | rank of the added doc (its ordinal position within the query results). |
bool | isRelevant |
|
long | docNameExtractTime |
Average(QualityStats[])
Create a QualityStats object that is the average of the input QualityStats objects.
Declaration
public static QualityStats Average(QualityStats[] stats)
Parameters
Type | Name | Description |
---|---|---|
QualityStats[] | stats | array of input stats to be averaged. |
Returns
Type | Description |
---|---|
QualityStats | an average over the input stats. |
GetAvp()
Return the average precision at recall points.
Declaration
public virtual double GetAvp()
Returns
Type | Description |
---|---|
double |
GetPrecisionAt(int)
Return the precision at rank n:
|{relevant hits within first n
hits}| / n
.
Declaration
public virtual double GetPrecisionAt(int n)
Parameters
Type | Name | Description |
---|---|---|
int | n | requested precision point, must be at least 1 and at most MAX_POINTS. |
Returns
Type | Description |
---|---|
double |
GetRecallPoints()
Returns the recallPoints.
Declaration
public virtual QualityStats.RecallPoint[] GetRecallPoints()
Returns
Type | Description |
---|---|
RecallPoint[] |
Log(string, int, TextWriter, string)
Log information on this QualityStats object.
Declaration
public virtual void Log(string title, int paddLines, TextWriter logger, string prefix)
Parameters
Type | Name | Description |
---|---|---|
string | title | |
int | paddLines | |
TextWriter | logger | Logger. |
string | prefix | prefix before each log line. |