edu.cs.ai.kreator.models
Class ParameterLearner

java.lang.Object
  extended by edu.cs.ai.kreator.models.Learner
      extended by edu.cs.ai.kreator.models.ParameterLearner
All Implemented Interfaces:
ModelComponent

public abstract class ParameterLearner
extends Learner

This class models an abstract parameter learner i.e. an algorithm that computes the optimal parameters for a given knowledgebase for some given data.

Author:
Matthias Thimm, Tim Janus

Constructor Summary
ParameterLearner()
           
 
Method Summary
static java.util.List<ParameterLearner> getAllParameterLearners()
          This method returns a comprehensive list of all structure-learners currently available in the system.
static ParameterLearner getParameterLearnerById(java.lang.String id)
          Returns a parameter-learner with the given identification string.
static java.util.List<ParameterLearner> getParameterLearnersFor(java.lang.Class<?> kbClass)
          Returns a list of all structure-learners capable of learner the given knowledge base type.
abstract  Knowledgebase optimizeParameters(Knowledgebase kb, java.util.Collection<? extends AtomExpression> data)
          This method optimizes the parameters of the given knowledge base wrt.
 
Methods inherited from class edu.cs.ai.kreator.models.Learner
incorporateClosedWorldAssumption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.cs.ai.kreator.models.ModelComponent
getDescription, getId, getSupportedKnowledgeBaseClass
 

Constructor Detail

ParameterLearner

public ParameterLearner()
Method Detail

getParameterLearnersFor

public static java.util.List<ParameterLearner> getParameterLearnersFor(java.lang.Class<?> kbClass)
Returns a list of all structure-learners capable of learner the given knowledge base type.

Parameters:
kbClass - a knowledge base class.
Returns:
a list of learners capable of learning the given knowledge base type.

getParameterLearnerById

public static ParameterLearner getParameterLearnerById(java.lang.String id)
                                                throws UnknownLearnerIdException
Returns a parameter-learner with the given identification string.

Parameters:
a - learner id
Returns:
a parameter-learner with the given identification string
Throws:
UnknownLearnerIdException

getAllParameterLearners

public static java.util.List<ParameterLearner> getAllParameterLearners()
This method returns a comprehensive list of all structure-learners currently available in the system.

Returns:
a comprehensive list of all structure-learners currently available in the system.

optimizeParameters

public abstract Knowledgebase optimizeParameters(Knowledgebase kb,
                                                 java.util.Collection<? extends AtomExpression> data)
                                          throws AbortedLearningException,
                                                 GeneralLearningException
This method optimizes the parameters of the given knowledge base wrt. (parameter learning).

Parameters:
kb - a knowledge base.
data - a collection of atom expressions.
Returns:
a knowledge base with the same structure as the given "kb", but with parameters set to maximize the score wrt. to the given scoring function.
Throws:
AbortedLearningException - if the user aborted the learning.
GeneralLearningException - if something went wrong during learning.