org.dllearner.algorithms
Class DisjointClassesLearner
java.lang.Object
org.dllearner.core.AbstractComponent
org.dllearner.core.AbstractAxiomLearningAlgorithm
org.dllearner.algorithms.DisjointClassesLearner
- All Implemented Interfaces:
- AxiomLearningAlgorithm, ClassExpressionLearningAlgorithm, Component, LearningAlgorithm
public class DisjointClassesLearner
- extends AbstractAxiomLearningAlgorithm
- implements ClassExpressionLearningAlgorithm
Learns disjoint classes using SPARQL queries.
- Author:
- Lorenz Bühmann, Jens Lehmann
DisjointClassesLearner
public DisjointClassesLearner(SparqlEndpointKS ks)
getMaxExecutionTimeInSeconds
public int getMaxExecutionTimeInSeconds()
setMaxExecutionTimeInSeconds
public void setMaxExecutionTimeInSeconds(int maxExecutionTimeInSeconds)
getClassToDescribe
public NamedClass getClassToDescribe()
setClassToDescribe
public void setClassToDescribe(NamedClass classToDescribe)
getMaxFetchedRows
public int getMaxFetchedRows()
setMaxFetchedRows
public void setMaxFetchedRows(int maxFetchedRows)
start
public void start()
- Description copied from interface:
LearningAlgorithm
- Starts the algorithm. It runs until paused, stopped, or
a termination criterion has been reached.
- Specified by:
start in interface LearningAlgorithm- Overrides:
start in class AbstractAxiomLearningAlgorithm
init
public void init()
throws ComponentInitException
- Description copied from interface:
Component
- Method to be called after the component has been configured.
Implementation of components can overwrite this method to
perform setup and initialisation tasks for this component.
- Specified by:
init in interface Component- Overrides:
init in class AbstractAxiomLearningAlgorithm
- Throws:
ComponentInitException - This exception is thrown if any
exceptions occur within the initialisation process of this
component. As component developer, you are encouraged to
rethrow occuring exception as ComponentInitException and
giving an error message as well as the actualy exception by
using the constructor ComponentInitException.ComponentInitException(String, Throwable).
getCurrentlyBestDescriptions
public List<Description> getCurrentlyBestDescriptions(int nrOfDescriptions)
- Specified by:
getCurrentlyBestDescriptions in interface ClassExpressionLearningAlgorithm
- Parameters:
nrOfDescriptions - Limit for the number or returned descriptions.
- Returns:
- The best class descriptions found by the learning algorithm so far.
- See Also:
ClassExpressionLearningAlgorithm.getCurrentlyBestEvaluatedDescriptions(int)
getCurrentlyBestEvaluatedDescriptions
public List<? extends EvaluatedDescription> getCurrentlyBestEvaluatedDescriptions(int nrOfDescriptions)
- Description copied from interface:
ClassExpressionLearningAlgorithm
- Return the best currently found concepts up to some maximum
count (no minimality filter used).
- Specified by:
getCurrentlyBestEvaluatedDescriptions in interface ClassExpressionLearningAlgorithm
- Parameters:
nrOfDescriptions - Maximum number of descriptions returned.
- Returns:
- Return value is getCurrentlyBestDescriptions(nrOfDescriptions, 0.0, false).
getCurrentlyBestAxioms
public List<Axiom> getCurrentlyBestAxioms(int nrOfAxioms)
- Specified by:
getCurrentlyBestAxioms in interface AxiomLearningAlgorithm- Overrides:
getCurrentlyBestAxioms in class AbstractAxiomLearningAlgorithm
- Parameters:
nrOfAxioms - Limit for the number or returned axioms.
- Returns:
- The best axioms found by the learning algorithm so far.
getCurrentlyBestEvaluatedAxioms
public List<EvaluatedAxiom> getCurrentlyBestEvaluatedAxioms(int nrOfAxioms)
- Specified by:
getCurrentlyBestEvaluatedAxioms in interface AxiomLearningAlgorithm- Overrides:
getCurrentlyBestEvaluatedAxioms in class AbstractAxiomLearningAlgorithm
- Parameters:
nrOfAxioms - Limit for the number or returned evaluated axioms.
- Returns:
- The best evaluated axioms found by the learning algorithm so far.
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2011 Jens Lehmann