jildt.tilde
Class stopCriteria
java.lang.Object
jason.asSemantics.DefaultInternalAction
jildt.tilde.stopCriteria
- All Implemented Interfaces:
- jason.asSemantics.InternalAction, java.io.Serializable
public class stopCriteria
- extends jason.asSemantics.DefaultInternalAction
Internal action for checking if a set of examples fulfills a criteria to stop the tree building. The
chosen mechanism is verify that the examples (or a percentage of them) belong to one class. A Literal
like percentage(P) must be used to define the percentage of examples needed to satisfy the stop criteria.
Use:
jildt.tilde.stopCriteria(Exs, percentage(P), Class)
Parameters:
- + training examples (list): the examples to be evaluated.
- + criteria (literal): the stop criteria literal to use for evaluating. It must be an arity-one
literal, where the argument is the percentage of examples needed to satisfy the stop criteria.
- +/- class (atom): the class label which the examples belong.
Examples: Given the training examples below.
-
jildt_example(put_label, [intend(put(b,c)), on(a,table),on(z,c),on(b,a),on(c,table),clear(table)], fail)).
-
jildt_example(put_label, [intend(put(b,a)), on(a,c),on(z,table),on(b,table),on(c,table),clear(table)], success)).
-
jildt_example(put_label, [intend(put(c,b)), on(a,table),on(z,b),on(b,a),on(c,table),clear(table)], fail)).
-
jildt.tilde.stopCriteria([1,3], percentage(100), Class)
: Class unifies with fail.
-
jildt.tilde.stopCriteria([1,3], percentage(100), fail)
: returns true.
-
jildt.tilde.stopCriteria([1,3], percentage(100), success)
: returns false.
-
jildt.tilde.stopCriteria([1,3], percentage(100))
: Throws an exception because three arguments
are needed for executing the internal action.
-
jildt.tilde.stopCriteria(1, percentage(100), success)
: Throws an exception because the first
argument must be a list.
-
jildt.tilde.stopCriteria([1,3], 100, success)
: Throws an exception because the
second argument must be an atom.
-
jildt.tilde.stopCriteria([1,3], percentage(100), "success")
: Throws an exception because the
third argument must be either an atom or an unbounded variable.
- Author:
- Carlos Alberto González-Alarcón, Alejandro Guerra-Hernández, Francisco Grimaldo-Moreno
- See Also:
- Serialized Form
Method Summary |
java.lang.Object |
execute(jason.asSemantics.TransitionSystem ts,
jason.asSemantics.Unifier un,
jason.asSyntax.Term[] args)
|
int |
getMaxArgs()
|
int |
getMinArgs()
|
Methods inherited from class jason.asSemantics.DefaultInternalAction |
canBeUsedInContext, prepareArguments, suspendIntention |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
stopCriteria
public stopCriteria()
execute
public java.lang.Object execute(jason.asSemantics.TransitionSystem ts,
jason.asSemantics.Unifier un,
jason.asSyntax.Term[] args)
throws java.lang.Exception
- Specified by:
execute
in interface jason.asSemantics.InternalAction
- Overrides:
execute
in class jason.asSemantics.DefaultInternalAction
- Throws:
java.lang.Exception
getMinArgs
public int getMinArgs()
- Overrides:
getMinArgs
in class jason.asSemantics.DefaultInternalAction
getMaxArgs
public int getMaxArgs()
- Overrides:
getMaxArgs
in class jason.asSemantics.DefaultInternalAction