org.dllearner.utilities.examples
Class AutomaticNegativeExampleFinderSPARQL

java.lang.Object
  extended by org.dllearner.utilities.examples.AutomaticNegativeExampleFinderSPARQL

public class AutomaticNegativeExampleFinderSPARQL
extends Object


Constructor Summary
AutomaticNegativeExampleFinderSPARQL(SortedSet<String> fullPositiveSet, SPARQLTasks st, SortedSet<String> filterClasses)
          takes as input a full positive set to make sure no negatives are added as positives
 
Method Summary
 SortedSet<String> getNegativeExamples(int neglimit)
          see getNegativeExamples(int neglimit, boolean stable )
 SortedSet<String> getNegativeExamples(int neglimit, boolean stable)
          aggregates all collected neg examples CAVE: it is necessary to call one of the make functions before calling this OTHERWISE it will choose random examples
 void makeNegativeExamplesFromNearbyClasses(SortedSet<String> positiveSet, int sparqlResultLimit)
           
 void makeNegativeExamplesFromParallelClasses(SortedSet<String> positiveSet, int sparqlResultLimit)
          makes negEx from classes, the posEx belong to.
 void makeNegativeExamplesFromRandomInstances()
           
 void makeNegativeExamplesFromRelatedInstances(SortedSet<String> instances, String objectNamespace)
          makes neg ex from related instances, that take part in a role R(pos,neg) filters all objects, that don't use the given namespace
 void makeNegativeExamplesFromSuperClasses(String concept, int sparqlResultSetLimit)
           
 void makeNegativeExamplesFromSuperClasses(String concept, int sparqlResultSetLimit, int depth)
          if pos ex derive from one class, then neg ex are taken from a superclass
 void makeNegativeExamplesFromSuperClassesOfInstances(SortedSet<String> positiveSet, int sparqlResultSetLimit)
          it gets the first class of an arbitrary instance and queries the superclasses of it, could be more elaborate.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutomaticNegativeExampleFinderSPARQL

public AutomaticNegativeExampleFinderSPARQL(SortedSet<String> fullPositiveSet,
                                            SPARQLTasks st,
                                            SortedSet<String> filterClasses)
takes as input a full positive set to make sure no negatives are added as positives

Parameters:
fullPositiveSet -
st -
Method Detail

getNegativeExamples

public SortedSet<String> getNegativeExamples(int neglimit)
see getNegativeExamples(int neglimit, boolean stable )

Parameters:
neglimit -

getNegativeExamples

public SortedSet<String> getNegativeExamples(int neglimit,
                                             boolean stable)
aggregates all collected neg examples CAVE: it is necessary to call one of the make functions before calling this OTHERWISE it will choose random examples

Parameters:
neglimit - size of negative Example set, 0 means all, which can be quite large several thousands
stable - decides whether neg Examples are randomly picked, default false, faster for developing, since the cache can be used

makeNegativeExamplesFromRandomInstances

public void makeNegativeExamplesFromRandomInstances()

makeNegativeExamplesFromRelatedInstances

public void makeNegativeExamplesFromRelatedInstances(SortedSet<String> instances,
                                                     String objectNamespace)
makes neg ex from related instances, that take part in a role R(pos,neg) filters all objects, that don't use the given namespace

Parameters:
instances -
objectNamespace -

makeNegativeExamplesFromNearbyClasses

public void makeNegativeExamplesFromNearbyClasses(SortedSet<String> positiveSet,
                                                  int sparqlResultLimit)

makeNegativeExamplesFromParallelClasses

public void makeNegativeExamplesFromParallelClasses(SortedSet<String> positiveSet,
                                                    int sparqlResultLimit)
makes negEx from classes, the posEx belong to. Gets all Classes from PosEx, gets Instances from these Classes, returns all

Parameters:
positiveSet -
sparqlResultLimit -

makeNegativeExamplesFromSuperClassesOfInstances

public void makeNegativeExamplesFromSuperClassesOfInstances(SortedSet<String> positiveSet,
                                                            int sparqlResultSetLimit)
it gets the first class of an arbitrary instance and queries the superclasses of it, could be more elaborate. It is better to use makeNegativeExamplesFromSuperClasses

Parameters:
positiveSet -
sparqlResultSetLimit -

makeNegativeExamplesFromSuperClasses

public void makeNegativeExamplesFromSuperClasses(String concept,
                                                 int sparqlResultSetLimit)

makeNegativeExamplesFromSuperClasses

public void makeNegativeExamplesFromSuperClasses(String concept,
                                                 int sparqlResultSetLimit,
                                                 int depth)
if pos ex derive from one class, then neg ex are taken from a superclass

Parameters:
concept -
sparqlResultSetLimit -


SourceForge.net Logo DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2011 Jens Lehmann