Class LambdaMART

  • Direct Known Subclasses:
    MART

    public class LambdaMART
    extends Ranker
    Author:
    vdang This class implements LambdaMART. Q. Wu, C.J.C. Burges, K. Svore and J. Gao. Adapting Boosting for Information Retrieval Measures. Journal of Information Retrieval, 2007.
    • Field Detail

      • nTrees

        public static int nTrees
      • learningRate

        public static float learningRate
      • nThreshold

        public static int nThreshold
      • nRoundToStopEarly

        public static int nRoundToStopEarly
      • nTreeLeaves

        public static int nTreeLeaves
      • minLeafSupport

        public static int minLeafSupport
      • gcCycle

        public static int gcCycle
      • thresholds

        protected float[][] thresholds
      • modelScores

        protected double[] modelScores
      • modelScoresOnValidation

        protected double[][] modelScoresOnValidation
      • bestModelOnValidation

        protected int bestModelOnValidation
      • martSamples

        protected DataPoint[] martSamples
      • sortedIdx

        protected int[][] sortedIdx
      • pseudoResponses

        protected double[] pseudoResponses
      • weights

        protected double[] weights
    • Constructor Detail

      • LambdaMART

        public LambdaMART()
      • LambdaMART

        public LambdaMART​(java.util.List<RankList> samples,
                          int[] features,
                          MetricScorer scorer)
    • Method Detail

      • init

        public void init()
        Description copied from class: Ranker
        HAVE TO BE OVER-RIDDEN IN SUB-CLASSES
        Specified by:
        init in class Ranker
      • learn

        public void learn()
        Specified by:
        learn in class Ranker
      • toString

        public java.lang.String toString()
        Specified by:
        toString in class Ranker
      • model

        public java.lang.String model()
        Specified by:
        model in class Ranker
      • loadFromString

        public void loadFromString​(java.lang.String fullText)
        Specified by:
        loadFromString in class Ranker
      • name

        public java.lang.String name()
        Specified by:
        name in class Ranker
      • getEnsemble

        public Ensemble getEnsemble()
      • computePseudoResponses

        protected void computePseudoResponses()
      • computePseudoResponses

        protected void computePseudoResponses​(int start,
                                              int end,
                                              int current)
      • updateTreeOutput

        protected void updateTreeOutput​(RegressionTree rt)
      • sortSamplesByFeature

        protected int[] sortSamplesByFeature​(DataPoint[] samples,
                                             int fid)
      • rank

        protected RankList rank​(int rankListIndex,
                                int current)
        This function is equivalent to the inherited function rank(...), but it uses the cached model's outputs instead of computing them from scratch.
        Parameters:
        rankListIndex -
        current -
        Returns:
      • computeModelScoreOnTraining

        protected float computeModelScoreOnTraining()
      • computeModelScoreOnTraining

        protected float computeModelScoreOnTraining​(int start,
                                                    int end,
                                                    int current)
      • computeModelScoreOnValidation

        protected float computeModelScoreOnValidation()
      • computeModelScoreOnValidation

        protected float computeModelScoreOnValidation​(int start,
                                                      int end)
      • sortSamplesByFeature

        protected void sortSamplesByFeature​(int fStart,
                                            int fEnd)