Documentation of 'edu.uci.jforests.eval.ranking.RankingEvaluationMetric' Java class
RankingEvaluationMetric
edu.uci.jforests.eval.ranking

Class RankingEvaluationMetric

    • Constructor Detail

      • RankingEvaluationMetric

        public RankingEvaluationMetric(boolean isLargerBetter)
    • Method Detail

      • computeNaturalOrderScores

        public static double[] computeNaturalOrderScores(int numTargets,
                                                         int[] boundaries)
        This gives the ordering of docuuments if they remained in their original order
        Parameters:
        numTargets - how many documents we want in the ranking
        boundaries - the query offsets
        Returns:
        an array with the ranking offsets for each query
      • getSwapScorer

        public abstract RankingEvaluationMetric.SwapScorer getSwapScorer(double[] targets,
                                                                         int[] boundaries,
                                                                         int trunc,
                                                                         int[][] labelCounts)
                                                                  throws java.lang.Exception
        Parameters:
        targets - Targets of all documents in dataset. Equals Dataset.*.length
        boundaries - Start and end indices of each query within the dataset.
        trunc - Truncation level for evaluation measure
        labelCounts - How many of each label value
        Throws:
        java.lang.Exception - if things go pear shaped
      • measureByQuery

        public abstract double[] measureByQuery(double[] predictions,
                                                Sample sample)
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • measure

        public double measure(double[] predictions,
                              Sample sample)
                       throws java.lang.Exception
        Specified by:
        measure in class EvaluationMetric
        Throws:
        java.lang.Exception

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.