Class SimpleAFLearner

java.lang.Object
org.tweetyproject.arg.dung.learning.SimpleAFLearner
All Implemented Interfaces:
AFLearner

public class SimpleAFLearner extends Object implements AFLearner
Naive implementation of the iterative algorithm for learning argumentation frameworks from labelings
Author:
Lars Bengel
  • Constructor Details

    • SimpleAFLearner

      public SimpleAFLearner(Collection<Argument> args)
      initialize the Learner with a set of arguments
      Parameters:
      args - a set of arguments
  • Method Details

    • learnLabeling

      public boolean learnLabeling(Input labeling)
      learn a single labeling i.e. compute the acceptance condition for each argument a wrt to the given labeling and combine it with the previous acceptance condition of a
      Specified by:
      learnLabeling in interface AFLearner
      Parameters:
      labeling - some labeling of the set of arguments
      Returns:
      true if the labeling was learned successfully
    • getNumberOfFrameworks

      public long getNumberOfFrameworks()
      Description copied from interface: AFLearner
      compute the number of argumentation frameworks that satisfy the internal acceptance conditions
      Specified by:
      getNumberOfFrameworks in interface AFLearner
      Returns:
      number of afs that produce all processed input labelings
    • getNumberOfFrameworks

      public long getNumberOfFrameworks(boolean shortcut)
      computes whether there is more than one argumentation framework that satisfies the internal conditions helpful for break conditions when learning
      Specified by:
      getNumberOfFrameworks in interface AFLearner
      Parameters:
      shortcut - if true, then only return 1 or -1
      Returns:
      1 if there is only one AF, -1 if there is more than one
    • computePartialAttackRelations

      public Map<Argument,Collection<Collection<Attack>>> computePartialAttackRelations()
      TODO is this still necessary?
      Returns:
      the partial attack relations
    • getModels

      public Collection<DungTheory> getModels()
      compute the set of argumentation frameworks that satisfy all acceptance conditions 1. for each acceptance condition (argument) compute all models 2. for each model compute a corresponding attack relation 3. compute all possible combinations of the attack relations and we have all argumentation frame works satisfying the conditions
      Specified by:
      getModels in interface AFLearner
      Returns:
      the set of argumentation frameworks obtained from learning
    • getModel

      public DungTheory getModel()
      Description copied from interface: AFLearner
      compute an argumentation framework that satisfy the internal acceptance conditions
      Specified by:
      getModel in interface AFLearner
      Returns:
      some argumentation framework that satisfies the internal conditions
    • printStatus

      public void printStatus()
      Description copied from interface: AFLearner
      print the internal acceptance conditions
      Specified by:
      printStatus in interface AFLearner
    • printStatus

      public void printStatus(boolean dnf)
      Parameters:
      dnf - if true, the acceptance conditions are transformed to DNF before printing print the current status of the acceptance conditions