Package net.sf.tweety.arg.prob.syntax
Class ProbabilisticArgumentationFramework
- java.lang.Object
-
- net.sf.tweety.commons.BeliefSet<Argument,DungSignature>
-
- net.sf.tweety.arg.dung.syntax.DungTheory
-
- net.sf.tweety.arg.prob.syntax.ProbabilisticArgumentationFramework
-
- All Implemented Interfaces:
java.lang.Comparable<DungTheory>,java.lang.Iterable<Argument>,java.util.Collection<Argument>,BeliefBase,Graph<Argument>
public class ProbabilisticArgumentationFramework extends DungTheory
This class implements the probabilistic argumentation framework approach of [Li, Oren, Norman. Probabilistic Argumentation Frameworks. TAFA'2011].- Author:
- Matthias Thimm
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<Argument,Probability>argumentProbabilityAssignmentProbability assignments to arguments (with independence assumption).private java.util.Map<Attack,Probability>attackProbabilityAssignmentProbability assignments to attacks (with independence assumption).-
Fields inherited from class net.sf.tweety.commons.BeliefSet
EQUALS_USES_SIGNATURE, signature
-
Fields inherited from interface net.sf.tweety.graphs.Graph
IGNORE_SELFLOOPS, INVERT_SELFLOOPS, REMOVE_SELFLOOPS
-
-
Constructor Summary
Constructors Constructor Description ProbabilisticArgumentationFramework()Default constructor; initializes empty sets of arguments and attacksProbabilisticArgumentationFramework(Graph<Argument> graph)Creates a new PAF from the given graph, all arguments and attacks have probability 1.
-
Method Summary
Modifier and Type Method Description booleanadd(Argument a)Adds the given node to this graph.booleanadd(Argument a, Probability p)Adds the given argument with the given probabilitybooleanadd(Attack att)Adds the given attack to this dung theory.booleanadd(Attack att, Probability p)Adds the given attack with the given probabilityProbabilitygetProbability(Argument a)Returns the probability of the given argument.ProbabilitygetProbability(Attack a)Returns the probability of the given attack.ProbabilitygetProbability(DungTheory aaf)Computes the probability of the given AAF wrt.SubgraphProbabilityFunctiongetSubgraphProbabilityFunction()Returns the complete subgraph probability function on the subgraphs of this PAF, assuming independence between probabilities of all arguments and attacks.booleanisWeightedGraph()Checks whether this graph only contains weighted edges.booleanremove(Argument a)Removes the argument and all its attacksbooleanremove(Attack attack)Removes the given attack from this Dung theory.DungTheorysample()Samples a random DungTheory from this framework wrt.java.lang.StringtoString()-
Methods inherited from class net.sf.tweety.arg.dung.syntax.DungTheory
add, add, addAllAttacks, addAttack, areAdjacent, compareTo, contains, containsAll, containsAttack, containsCycle, equals, existsDirectedPath, faf, getAdjacencyMatrix, getAttacked, getAttackers, getAttacks, getChildren, getComplementGraph, getComponents, getEdge, getEdges, getMinimalSignature, getNeighbors, getNodes, getNumberOfNodes, getParents, getRestriction, getStronglyConnectedComponents, getSubgraphs, hasAttackBranch, hasDefenseBranch, hashCode, hasSelfLoops, instantiateSignature, isAttackBranch, isAttacked, isAttacked, isAttackedBy, isAttackedBy, isAttackingAllOtherArguments, isCoherent, isDefenseBranch, isIndirectAttack, isRelativelyCoherent, isStable, isSupport, isWellFounded, prettyPrint, removeAll
-
Methods inherited from class net.sf.tweety.commons.BeliefSet
addAll, clear, getSignature, instantiateSet, isEmpty, iterator, remove, retainAll, setSignature, size, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
argumentProbabilityAssignment
private java.util.Map<Argument,Probability> argumentProbabilityAssignment
Probability assignments to arguments (with independence assumption).
-
attackProbabilityAssignment
private java.util.Map<Attack,Probability> attackProbabilityAssignment
Probability assignments to attacks (with independence assumption).
-
-
Method Detail
-
add
public boolean add(Attack att)
Description copied from class:DungTheoryAdds the given attack to this dung theory.- Overrides:
addin classDungTheory- Parameters:
att- an attack- Returns:
- "true" if the set of attacks has been modified.
-
add
public boolean add(Attack att, Probability p)
Adds the given attack with the given probability- Parameters:
att- some attackp- some probability- Returns:
- "true" iff this object was actually changed
-
add
public boolean add(Argument a)
Description copied from interface:GraphAdds the given node to this graph.
-
add
public boolean add(Argument a, Probability p)
Adds the given argument with the given probability- Parameters:
a- some argumentp- some probability- Returns:
- "true" iff this object was actually changed
-
remove
public boolean remove(Attack attack)
Description copied from class:DungTheoryRemoves the given attack from this Dung theory.- Overrides:
removein classDungTheory- Parameters:
attack- an attack- Returns:
- "true" if the set of attacks has been modified.
-
remove
public boolean remove(Argument a)
Description copied from class:DungTheoryRemoves the argument and all its attacks- Overrides:
removein classDungTheory- Parameters:
a- some argument- Returns:
- true if this structure has been changed
-
getProbability
public Probability getProbability(Argument a)
Returns the probability of the given argument. If this framework does not contain the given argument, an IllegalArgumentException is thrown.- Parameters:
a- some argument- Returns:
- the probability of the argument.
-
getProbability
public Probability getProbability(Attack a)
Returns the probability of the given attack. If this framework does not contain the given attack, an IllegalArgumentException is thrown.- Parameters:
a- some attack- Returns:
- the probability of the attack.
-
getProbability
public Probability getProbability(DungTheory aaf)
Computes the probability of the given AAF wrt. this framework (if the given AAF is not a subgraph of this framework, it has probability zero).- Parameters:
aaf- some AAF (supposedly a subgraph of this framework)- Returns:
- the probability of the given AAF.
-
getSubgraphProbabilityFunction
public SubgraphProbabilityFunction getSubgraphProbabilityFunction()
Returns the complete subgraph probability function on the subgraphs of this PAF, assuming independence between probabilities of all arguments and attacks.- Returns:
- the subgraph probability function of this framework.
-
sample
public DungTheory sample()
Samples a random DungTheory from this framework wrt. the probabilities of its elements and assuming independence.- Returns:
- a sampled DungTheory.
-
isWeightedGraph
public boolean isWeightedGraph()
Description copied from interface:GraphChecks whether this graph only contains weighted edges.- Specified by:
isWeightedGraphin interfaceGraph<Argument>- Overrides:
isWeightedGraphin classDungTheory- Returns:
- "true" if all edges are weighted in this graph.
-
toString
public java.lang.String toString()
- Specified by:
toStringin interfaceBeliefBase- Specified by:
toStringin interfaceGraph<Argument>- Overrides:
toStringin classDungTheory
-
-