Class LinearModel

    • Field Detail

      • featureToWeight

        protected Float[] featureToWeight
        featureToWeight is part of the LTRScoringModel params map and therefore here it does not individually influence the class hashCode, equals, etc.
    • Method Detail

      • setWeights

        public void setWeights​(Object weights)
      • score

        public float score​(float[] modelFeatureValuesNormalized)
        Description copied from class: LTRScoringModel
        Given a list of normalized values for all features a scoring algorithm cares about, calculate and return a score.
        Specified by:
        score in class LTRScoringModel
        modelFeatureValuesNormalized - List of normalized feature values. Each feature is identified by its id, which is the index in the array
        The final score for a document
      • explain

        public explain​(org.apache.lucene.index.LeafReaderContext context,
                                                            int doc,
                                                            float finalScore,
                                                            List<> featureExplanations)
        Description copied from class: LTRScoringModel
        Similar to the score() function, except it returns an explanation of how the features were used to calculate the score.
        Specified by:
        explain in class LTRScoringModel
        context - Context the document is in
        doc - Document to explain
        finalScore - Original score
        featureExplanations - Explanations for each feature calculation
        Explanation for the scoring of a document