edu.uci.jforests.eval.ranking
Class MAPEval
- java.lang.Object
-
- edu.uci.jforests.eval.EvaluationMetric
-
- edu.uci.jforests.eval.ranking.RankingEvaluationMetric
-
- edu.uci.jforests.eval.ranking.MAPEval
-
public class MAPEval extends RankingEvaluationMetric
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.uci.jforests.eval.ranking.RankingEvaluationMetric
RankingEvaluationMetric.SwapScorer
-
-
Constructor Summary
Constructors Constructor and Description MAPEval(int maxDocsPerQuery)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]getMAP(double[] predictions, Sample sample, ScoreBasedComparator.TieBreaker tieBreaker)RankingEvaluationMetric.SwapScorergetSwapScorer(double[] targets, int[] boundaries, int trunc, int[][] labelCounts)double[]measureByQuery(double[] predictions, Sample sample)-
Methods inherited from class edu.uci.jforests.eval.ranking.RankingEvaluationMetric
computeNaturalOrderScores, getParentMetric, measure
-
Methods inherited from class edu.uci.jforests.eval.EvaluationMetric
isFirstBetter, largerIsBetter
-
-
-
-
Constructor Detail
-
MAPEval
public MAPEval(int maxDocsPerQuery) throws java.lang.Exception- Throws:
java.lang.Exception
-
-
Method Detail
-
getMAP
public double[] getMAP(double[] predictions, Sample sample, ScoreBasedComparator.TieBreaker tieBreaker) throws java.lang.Exception- Throws:
java.lang.Exception
-
measureByQuery
public double[] measureByQuery(double[] predictions, Sample sample) throws java.lang.Exception- Specified by:
measureByQueryin classRankingEvaluationMetric- Throws:
java.lang.Exception
-
getSwapScorer
public RankingEvaluationMetric.SwapScorer getSwapScorer(double[] targets, int[] boundaries, int trunc, int[][] labelCounts) throws java.lang.Exception
- Specified by:
getSwapScorerin classRankingEvaluationMetric- Parameters:
targets- Targets of all documents in dataset. Equals Dataset.*.lengthboundaries- Start and end indices of each query within the dataset.trunc- Truncation level for evaluation measurelabelCounts- How many of each label value- Throws:
java.lang.Exception- if things go pear shaped
-
-
DMelt 3.0 © DataMelt by jWork.ORG