Class LearnedModelMatching

    • Field Detail

      • parent

        protected final Matching parent
      • logger

        protected org.slf4j.Logger logger
      • score_is_feature

        protected final boolean score_is_feature
      • increment

        protected final int increment
    • Constructor Detail

      • LearnedModelMatching

        protected LearnedModelMatching​(Matching _parent)
      • LearnedModelMatching

        protected LearnedModelMatching​(Index _index,
                                       Matching _parent)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • applyModel

        protected abstract void applyModel​(int N,
                                           double[] in_scores,
                                           int F,
                                           double[][] features,
                                           double[] out_scores)
        Apply the loaded learned model for identifying the top N documents.
        Parameters:
        N - - number of documents
        in_scores - - sample scores
        F - number of features
        features - indexed by feature THEN document
        out_scores - - final scores
      • match

        public ResultSet match​(java.lang.String queryNumber,
                               MatchingQueryTerms queryTerms)
                        throws java.io.IOException
        Description copied from interface: Matching
        Get a ResultSet for the given query terms.
        Specified by:
        match in interface Matching
        Parameters:
        queryNumber - - some ID of the query
        queryTerms - - query terms to match
        Returns:
        ResultSet - the matched results
        Throws:
        java.io.IOException - if a problem occurs during matching
      • setCollectionStatistics

        public void setCollectionStatistics​(CollectionStatistics cs)
        Description copied from interface: Matching
        Update the collection statistics being used by this matching instance
        Specified by:
        setCollectionStatistics in interface Matching
        Parameters:
        cs - CollectionStatistics to use during matching
      • getInfo

        public java.lang.String getInfo()
        Description copied from interface: Matching
        Return a human readable description of this Matching class
        Specified by:
        getInfo in interface Matching