edu.uci.jforests.eval.ranking
Class PrecisionEval
- java.lang.Object
-
- edu.uci.jforests.eval.EvaluationMetric
-
- edu.uci.jforests.eval.ranking.RankingEvaluationMetric
-
- edu.uci.jforests.eval.ranking.PrecisionEval
-
public class PrecisionEval 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 PrecisionEval(int maxDocsPerQuery, int maxLevels, double relevancyThreshold)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]getPrecisions(double[] predictions, Sample sample, ScoreBasedComparator.TieBreaker tieBreaker)RankingEvaluationMetric.SwapScorergetSwapScorer(double[] targets, int[] boundaries, int trunc, int[][] labelCounts)doublemeasure(double[] predictions, Sample sample)double[]measureByQuery(double[] predictions, Sample sample)-
Methods inherited from class edu.uci.jforests.eval.ranking.RankingEvaluationMetric
computeNaturalOrderScores, getParentMetric
-
Methods inherited from class edu.uci.jforests.eval.EvaluationMetric
isFirstBetter, largerIsBetter
-
-
-
-
Constructor Detail
-
PrecisionEval
public PrecisionEval(int maxDocsPerQuery, int maxLevels, double relevancyThreshold) throws java.lang.Exception- Throws:
java.lang.Exception
-
-
Method Detail
-
getPrecisions
public double[] getPrecisions(double[] predictions, Sample sample, ScoreBasedComparator.TieBreaker tieBreaker) throws java.lang.Exception- Throws:
java.lang.Exception
-
measure
public double measure(double[] predictions, Sample sample) throws java.lang.Exception- Overrides:
measurein 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
-
measureByQuery
public double[] measureByQuery(double[] predictions, Sample sample) throws java.lang.Exception- Specified by:
measureByQueryin classRankingEvaluationMetric- Throws:
java.lang.Exception
-
-
DMelt 3.0 © DataMelt by jWork.ORG