public class AutomaticNegativeExampleFinderSPARQL extends Object
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
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.
|
public AutomaticNegativeExampleFinderSPARQL(SortedSet<String> fullPositiveSet, SPARQLTasks st, SortedSet<String> filterClasses)
fullPositiveSet
- st
- public SortedSet<String> getNegativeExamples(int neglimit)
getNegativeExamples(int neglimit, boolean stable )
neglimit
- public SortedSet<String> getNegativeExamples(int neglimit, boolean stable)
neglimit
- size of negative Example set, 0 means all, which can be quite large several thousandsstable
- decides whether neg Examples are randomly picked, default false, faster for developing, since the cache can be usedpublic void makeNegativeExamplesFromRandomInstances()
public void makeNegativeExamplesFromRelatedInstances(SortedSet<String> instances, String objectNamespace)
instances
- objectNamespace
- public void makeNegativeExamplesFromNearbyClasses(SortedSet<String> positiveSet, int sparqlResultLimit)
public void makeNegativeExamplesFromParallelClasses(SortedSet<String> positiveSet, int sparqlResultLimit)
positiveSet
- sparqlResultLimit
- public void makeNegativeExamplesFromSuperClassesOfInstances(SortedSet<String> positiveSet, int sparqlResultSetLimit)
positiveSet
- sparqlResultSetLimit
- public void makeNegativeExamplesFromSuperClasses(String concept, int sparqlResultSetLimit)
public void makeNegativeExamplesFromSuperClasses(String concept, int sparqlResultSetLimit, int depth)
concept
- sparqlResultSetLimit
- DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2019 Jens Lehmann