de.dfki.madm.mlwizard
Class KnowledgeBase

java.lang.Object
  extended by com.rapidminer.operator.AbstractIOObject
      extended by de.dfki.madm.mlwizard.KnowledgeBase
All Implemented Interfaces:
com.rapidminer.operator.IOObject, java.io.Serializable

public class KnowledgeBase
extends com.rapidminer.operator.AbstractIOObject

Central place for all knowledge regarding meta-learning including meta-features and classifiers. Administrative functionality like adding new datasets is shifted to the Administrator class for clarity reasons.

See Also:
Serialized Form

Nested Class Summary
static class KnowledgeBase.LearningThread
           
 
Nested classes/interfaces inherited from class com.rapidminer.operator.AbstractIOObject
com.rapidminer.operator.AbstractIOObject.InputStreamProvider
 
Constructor Summary
KnowledgeBase()
          creates an empty knowledge base
 
Method Summary
 void addClassifier(Classifier classifier, boolean evaluate)
          adds a classifier to this knowledge base
 void addDataset(com.rapidminer.example.ExampleSet dataset, java.lang.String name, boolean store)
          adds a new dataset to the knowledge base by computing its meta-features, evaluating all classifiers, and updating the accuracy prediction models as well as the set of selected meta-features
 void awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)
           
 com.rapidminer.operator.Annotations getAnnotations()
           
 Classifier getClassifier(java.lang.String name)
           
 java.util.Collection<Classifier> getClassifiers()
           
 com.rapidminer.example.ExampleSet getMetaFeatures()
           
 java.util.List<java.lang.Double> getStartPoints(Classifier classifier, com.rapidminer.example.Example queryMetaFeatures, int n)
          determines the start points for the GA for a given classifier and dataset
 java.util.Collection<java.lang.String> getStoredDatasets()
           
static KnowledgeBase read()
          reads the knowledge from the resource (used within the extension)
static com.rapidminer.example.ExampleSet readDataSet(java.lang.String name)
          reads a dataset either from resource or from file
 void setMetaFeatures(com.rapidminer.example.ExampleSet metaFeatures)
          replaces the meta-features
 void write()
          writes the knowledge base to the file (used within a stand-alone application)
 
Methods inherited from class com.rapidminer.operator.AbstractIOObject
appendOperatorToHistory, copy, getLog, getProcessingHistory, getSource, initWriting, read, read, read, read, setLoggingHandler, setSource, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KnowledgeBase

public KnowledgeBase()
creates an empty knowledge base

Method Detail

getStoredDatasets

public java.util.Collection<java.lang.String> getStoredDatasets()

getClassifier

public Classifier getClassifier(java.lang.String name)
Parameters:
name - name of the desired classifier
Returns:
the classifier with the given name or null if no such classifier exists

getClassifiers

public final java.util.Collection<Classifier> getClassifiers()
Returns:
collection of all classifiers

addClassifier

public void addClassifier(Classifier classifier,
                          boolean evaluate)
                   throws java.io.IOException,
                          com.rapidminer.tools.XMLException,
                          com.rapidminer.operator.OperatorException,
                          com.rapidminer.operator.OperatorCreationException
adds a classifier to this knowledge base

Parameters:
classifier - the classifier to be added
Throws:
com.rapidminer.operator.OperatorException
com.rapidminer.tools.XMLException
java.io.IOException
com.rapidminer.operator.OperatorCreationException

getMetaFeatures

public com.rapidminer.example.ExampleSet getMetaFeatures()
Returns:
all meta-features currently stored within this knowledge base

setMetaFeatures

public void setMetaFeatures(com.rapidminer.example.ExampleSet metaFeatures)
replaces the meta-features

Parameters:
metaFeatures - the new meta-features

addDataset

public void addDataset(com.rapidminer.example.ExampleSet dataset,
                       java.lang.String name,
                       boolean store)
                throws com.rapidminer.operator.OperatorCreationException,
                       com.rapidminer.operator.OperatorException,
                       java.io.FileNotFoundException,
                       java.io.IOException,
                       com.rapidminer.tools.XMLException,
                       java.lang.InterruptedException
adds a new dataset to the knowledge base by computing its meta-features, evaluating all classifiers, and updating the accuracy prediction models as well as the set of selected meta-features

Parameters:
dataset - the dataset to be added
name - the name of the dataset used as id
knowledgeBase - the knowledge base the dataset should be added to
Throws:
com.rapidminer.operator.OperatorCreationException
com.rapidminer.operator.OperatorException
java.io.IOException
java.io.FileNotFoundException
com.rapidminer.tools.XMLException
java.lang.InterruptedException

read

public static KnowledgeBase read()
                          throws java.io.IOException
reads the knowledge from the resource (used within the extension)

Returns:
the knowledge base read
Throws:
java.io.IOException

write

public void write()
           throws java.io.FileNotFoundException,
                  java.io.IOException
writes the knowledge base to the file (used within a stand-alone application)

Throws:
java.io.FileNotFoundException
java.io.IOException

readDataSet

public static com.rapidminer.example.ExampleSet readDataSet(java.lang.String name)
                                                     throws java.io.IOException
reads a dataset either from resource or from file

Parameters:
name - the name of the dataset
Returns:
the dataset
Throws:
java.io.IOException

getStartPoints

public java.util.List<java.lang.Double> getStartPoints(Classifier classifier,
                                                       com.rapidminer.example.Example queryMetaFeatures,
                                                       int n)
determines the start points for the GA for a given classifier and dataset

Parameters:
classifier - the classifier
queryMetaFeatures - the meta-features of the dataset
n - the desired number of start points
Returns:
the n points as flat list with all dimensions of the first point, then all dimension of the second point, ...

awaitTermination

public void awaitTermination(long timeout,
                             java.util.concurrent.TimeUnit unit)
                      throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

getAnnotations

public com.rapidminer.operator.Annotations getAnnotations()


Copyright © 2001-2009 by Rapid-I