case class NdcgAtK[T](k: Int) extends Aggregator[RankingPrediction[T], (Double, Long), Double] with Product with Serializable
Compute the average NDCG value of all the predictions, truncated at ranking position k. The discounted cumulative gain at position k is computed as: sumi=1k (2{relevance of ith item} - 1) / log(i + 1), and the NDCG is obtained by dividing the DCG value on the ground truth set. In the current implementation, the relevance value is binary. If a query has an empty ground truth set, zero will be used as ndcg
See the following paper for detail:
IR evaluation methods for retrieving highly relevant documents. K. Jarvelin and J. Kekalainen
- k
the position to compute the truncated ndcg, must be positive
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- NdcgAtK
- Serializable
- Product
- Equals
- Aggregator
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
andThenPresent[D](present2: (Double) ⇒ D): Aggregator[RankingPrediction[T], (Double, Long), D]
- Definition Classes
- Aggregator
-
def
append(l: (Double, Long), r: RankingPrediction[T]): (Double, Long)
- Definition Classes
- Aggregator
-
def
appendAll(old: (Double, Long), items: TraversableOnce[RankingPrediction[T]]): (Double, Long)
- Definition Classes
- Aggregator
-
def
apply(inputs: TraversableOnce[RankingPrediction[T]]): Double
- Definition Classes
- Aggregator
-
def
applyCumulatively[In <: TraversableOnce[RankingPrediction[T]], Out](inputs: In)(implicit bf: CanBuildFrom[In, Double, Out]): Out
- Definition Classes
- Aggregator
-
def
applyOption(inputs: TraversableOnce[RankingPrediction[T]]): Option[Double]
- Definition Classes
- Aggregator
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
composePrepare[A1](prepare2: (A1) ⇒ RankingPrediction[T]): Aggregator[A1, (Double, Long), Double]
- Definition Classes
- Aggregator
-
def
cumulativeIterator(inputs: Iterator[RankingPrediction[T]]): Iterator[Double]
- Definition Classes
- Aggregator
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
join[A2 <: RankingPrediction[T], B2, C2](that: Aggregator[A2, B2, C2]): Aggregator[A2, ((Double, Long), B2), (Double, C2)]
- Definition Classes
- Aggregator
- val k: Int
-
def
lift: MonoidAggregator[RankingPrediction[T], Option[(Double, Long)], Option[Double]]
- Definition Classes
- Aggregator
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
prepare(input: RankingPrediction[T]): (Double, Long)
- Definition Classes
- NdcgAtK → Aggregator
-
def
present(score: (Double, Long)): Double
- Definition Classes
- NdcgAtK → Aggregator
-
def
reduce(items: TraversableOnce[(Double, Long)]): (Double, Long)
- Definition Classes
- Aggregator
-
def
reduce(l: (Double, Long), r: (Double, Long)): (Double, Long)
- Definition Classes
- Aggregator
-
def
reduceOption(items: TraversableOnce[(Double, Long)]): Option[(Double, Long)]
- Definition Classes
- Aggregator
-
def
semigroup: Semigroup[(Double, Long)]
- Definition Classes
- NdcgAtK → Aggregator
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toFold: Fold[RankingPrediction[T], Option[Double]]
- Definition Classes
- Aggregator
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
zip[A2, B2, C2](ag2: Aggregator[A2, B2, C2]): Aggregator[(RankingPrediction[T], A2), ((Double, Long), B2), (Double, C2)]
- Definition Classes
- Aggregator