Class SimilarityTrainer

java.lang.Object
com.semedy.reasoner.api.induction.SimilarityTrainer

public class SimilarityTrainer extends Object
Adapts similarity built-ins to cover max positives and min negatives
Author:
angele
  • Constructor Details

  • Method Details

    • numberOfPositives

      public int numberOfPositives()
      get the number of positive covered by recently trained rules
      Returns:
    • numberOfNegatives

      public int numberOfNegatives()
      get the number of negatives covered by recently trained rules
      Returns:
    • trainRules

      public void trainRules(Collection<String> ruleNames, String query4Positives, String query4Negatives, int stepRate) throws IOException, SemReasonerException, InterruptedException
      adapt similarity built-ins in rules to cover max positives and min negatives.
      Query query4Positives queries the positive covered facts.
      Query query4Negatives queries the negative covered facts.
      Step rate defines the stepping for the similarity measure.
      The rules mentioned in ruleNames are modified
      Parameters:
      ruleNames - , the names of the rules to adapt
      query4Positives - , a query to retrieve all positives, could be null
      query4Negatives - , a query to retrieve all negativses, could be null
      stepRate - , the step rate for the similarity measure from 0 to 10
      Throws:
      InterruptedException
      SemReasonerException
      IOException