Package ciir.umass.edu.learning.tree
Class LambdaMART
- java.lang.Object
-
- ciir.umass.edu.learning.Ranker
-
- ciir.umass.edu.learning.tree.LambdaMART
-
-
Field Summary
Fields Modifier and Type Field Description protected intbestModelOnValidationprotected Ensembleensemblestatic intgcCycleprotected FeatureHistogramhiststatic floatlearningRateprotected DataPoint[]martSamplesstatic intminLeafSupportprotected double[]modelScoresprotected double[][]modelScoresOnValidationstatic intnRoundToStopEarlystatic intnThresholdstatic intnTreeLeavesstatic intnTreesprotected double[]pseudoResponsesprotected int[][]sortedIdxprotected float[][]thresholdsprotected double[]weights-
Fields inherited from class ciir.umass.edu.learning.Ranker
bestScoreOnValidationData, features, samples, scoreOnTrainingData, scorer, validationSamples, verbose
-
-
Constructor Summary
Constructors Constructor Description LambdaMART()LambdaMART(java.util.List<RankList> samples, int[] features, MetricScorer scorer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected floatcomputeModelScoreOnTraining()protected floatcomputeModelScoreOnTraining(int start, int end, int current)protected floatcomputeModelScoreOnValidation()protected floatcomputeModelScoreOnValidation(int start, int end)protected voidcomputePseudoResponses()protected voidcomputePseudoResponses(int start, int end, int current)RankercreateNew()doubleeval(DataPoint dp)EnsemblegetEnsemble()voidinit()HAVE TO BE OVER-RIDDEN IN SUB-CLASSESvoidlearn()voidloadFromString(java.lang.String fullText)java.lang.Stringmodel()java.lang.Stringname()voidprintParameters()protected RankListrank(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.protected voidsortSamplesByFeature(int fStart, int fEnd)protected int[]sortSamplesByFeature(DataPoint[] samples, int fid)java.lang.StringtoString()protected voidupdateTreeOutput(RegressionTree rt)-
Methods inherited from class ciir.umass.edu.learning.Ranker
copy, getFeatures, getScoreOnTrainingData, getScoreOnValidationData, PRINT, PRINT, PRINT_MEMORY_USAGE, PRINTLN, PRINTLN, PRINTTIME, rank, rank, save, setFeatures, setMetricScorer, setTrainingSet, setValidationSet
-
-
-
-
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
-
ensemble
protected Ensemble ensemble
-
modelScores
protected double[] modelScores
-
modelScoresOnValidation
protected double[][] modelScoresOnValidation
-
bestModelOnValidation
protected int bestModelOnValidation
-
martSamples
protected DataPoint[] martSamples
-
sortedIdx
protected int[][] sortedIdx
-
hist
protected FeatureHistogram hist
-
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:RankerHAVE TO BE OVER-RIDDEN IN SUB-CLASSES
-
loadFromString
public void loadFromString(java.lang.String fullText)
- Specified by:
loadFromStringin classRanker
-
printParameters
public void printParameters()
- Specified by:
printParametersin classRanker
-
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)
-
-