Class JforestsModelMatching

  • All Implemented Interfaces:
    Matching

    public class JforestsModelMatching
    extends LearnedModelMatching
    Applies a Jforests regression tree learned model to a FeaturedResultSet. Learned model files are generated by Jforests. If you use this class, you are implicitly using the jforests library, and the Jforests citation policy applies.

    Properties

    • fat.matching.learned.jforest.model - filename of the ensemble model generated by jforests
    • fat.matching.learned.jforest.statistics - filename of the feature statistics file generated by jforests
    Since:
    4.0
    Author:
    Craig Macdonald
    • Constructor Detail

      • JforestsModelMatching

        public JforestsModelMatching​(Index _index,
                                     Matching _parent)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • JforestsModelMatching

        public JforestsModelMatching​(Matching _parent)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • JforestsModelMatching

        public JforestsModelMatching​(Matching _parent,
                                     java.lang.String modelFilename)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • JforestsModelMatching

        public JforestsModelMatching​(Index _index,
                                     Matching _parent,
                                     java.lang.String modelFilename)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • JforestsModelMatching

        public JforestsModelMatching​(Index _index,
                                     Matching _parent,
                                     java.lang.String modelFilename,
                                     java.lang.Class<? extends edu.uci.jforests.learning.trees.Tree> treeClass)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • loadModel

        protected void loadModel​(java.lang.String model_filename)
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • loadModel

        protected void loadModel​(java.lang.String model_filename,
                                 java.lang.Class<? extends edu.uci.jforests.learning.trees.Tree> treeClass)
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • makeDataset

        protected edu.uci.jforests.dataset.RankingDataset makeDataset​(int N,
                                                                      int featureCount,
                                                                      double[][] doubleFeatures)
      • applyModel

        protected void applyModel​(int N,
                                  double[] in_scores,
                                  int featureCount,
                                  double[][] doubleFeatures,
                                  double[] out_scores)
        Description copied from class: LearnedModelMatching
        Apply the loaded learned model for identifying the top N documents.
        Specified by:
        applyModel in class LearnedModelMatching
        Parameters:
        N - - number of documents
        in_scores - - sample scores
        featureCount - number of features
        doubleFeatures - indexed by feature THEN document
        out_scores - - final scores