Class DiscountedCumulativeGain.Detail

java.lang.Object
org.elasticsearch.index.rankeval.DiscountedCumulativeGain.Detail
All Implemented Interfaces:
NamedWriteable, Writeable, MetricDetail, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject
Enclosing class:
DiscountedCumulativeGain

public static final class DiscountedCumulativeGain.Detail extends Object implements MetricDetail
  • Method Details

    • getMetricName

      public String getMetricName()
      Specified by:
      getMetricName in interface MetricDetail
    • innerToXContent

      public org.elasticsearch.xcontent.XContentBuilder innerToXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Description copied from interface: MetricDetail
      Implementations should write their own fields to the XContentBuilder passed in.
      Specified by:
      innerToXContent in interface MetricDetail
      Throws:
      IOException
    • fromXContent

      public static DiscountedCumulativeGain.Detail fromXContent(org.elasticsearch.xcontent.XContentParser parser)
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • getWriteableName

      public String getWriteableName()
      Specified by:
      getWriteableName in interface NamedWriteable
    • getDCG

      public double getDCG()
      Returns:
      the discounted cumulative gain
    • getIDCG

      public double getIDCG()
      Returns:
      the ideal discounted cumulative gain, can be 0 if nothing was computed, e.g. because no normalization was required
    • getNDCG

      public double getNDCG()
      Returns:
      the normalized discounted cumulative gain, can be 0 if nothing was computed, e.g. because no normalization was required
    • getUnratedDocs

      public Object getUnratedDocs()
      Returns:
      the number of unrated documents in the search results
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object