Class DypsisCandidateRanker


  • public class DypsisCandidateRanker
    extends Object

    Uses machine learning methods to create features for the mapping candidates of a gene mention.

    Only prediction is handled directly in this class. Training is done by HpoRoute.train(InstanceList, Parameters, String, int).

    This class requires the tax2originalCandidates map and populates the tax2lexicallyRerankedCandidates field of a gene's MentionMappingResult.

    • Field Detail

      • avgDiffCorrect

        public static double avgDiffCorrect
      • avgRatioCorrect

        public static double avgRatioCorrect
      • correct

        public static int correct
      • avgDiffWrong

        public static double avgDiffWrong
      • avgRatioWrong

        public static double avgRatioWrong
      • wrong

        public static double wrong
    • Constructor Detail

      • DypsisCandidateRanker

        @Inject
        public DypsisCandidateRanker​(de.julielab.geneexpbase.configuration.Configuration configuration,
                                     CandidateRetrieval candidateRetrieval,
                                     de.julielab.geneexpbase.services.CacheService cacheService)
    • Method Detail

      • setGoldRelevanceScores

        public static void setGoldRelevanceScores​(de.julielab.geneexpbase.genemodel.GeneMention gm,
                                                  de.julielab.geneexpbase.genemodel.MentionMappingResult mmr)
      • saveModel

        public void saveModel​(File modelDestination,
                              de.julielab.geneexpbase.configuration.Parameters parameters)
      • mergeParameters

        @NotNull
        public @NotNull de.julielab.geneexpbase.configuration.Parameters mergeParameters​(de.julielab.geneexpbase.configuration.Parameters parameterMap)
        Merges the stored model parameters with the externally passed parameters. This is especially important to set settings required by the DypsisContextRanker but have been set differently in the training of this ranker because they just weren't needed.
        Parameters:
        parameterMap -
        Returns:
      • rankCandidates

        public void rankCandidates​(de.julielab.geneexpbase.genemodel.GeneMention gm,
                                   AtomicInteger gmidCounter,
                                   de.julielab.geneexpbase.configuration.Parameters parameterMap)
      • getOriginalExactMatches

        public List<de.julielab.geneexpbase.candidateretrieval.SynHit> getOriginalExactMatches​(de.julielab.geneexpbase.genemodel.GeneMention gm,
                                                                                               de.julielab.geneexpbase.configuration.Parameters parameters,
                                                                                               List<de.julielab.geneexpbase.candidateretrieval.SynHit> candidates4tax)
      • clear

        public void clear()
        Sets the internal state to null. No trained classifiers or parameters will be available any more.
      • getModelParameters

        public de.julielab.geneexpbase.configuration.Parameters getModelParameters()