|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.mine.bfn.BasisFunctionLearnerTable
public final class BasisFunctionLearnerTable
This class implements the DDA-algorithm published by Berthold&Huber which iteratively introduces new basisfunctions and/or shrinks already existing ones of conflicting classes during the training algorithm.
The learning algorithm itself is based on two distinct phases. During the training phase, miss-classified pattern either prompt the spontaneous creation of new basisfunctions units (commitment) or the adjustment of conflicting basisfunction radii (shrinking of Basisfunctions belonging to incorrect classes). To commit a new prototype, none of existing Basisfunctions of the correct class has an activation above a certain threshold and, after shrinking, no Basisfunction of a conflicting class is allowed to have an activation above.
This underlying DataTable
contains just one column derived from
BasisFunctionLearnerRow
.
Nested Class Summary | |
---|---|
static interface |
BasisFunctionLearnerTable.MissingValueReplacementFunction
General missing values replacement interface. |
Field Summary | |
---|---|
static String |
MISSING
NodeSettings key for the missing replacement value. |
static BasisFunctionLearnerTable.MissingValueReplacementFunction[] |
MISSINGS
A list of possible missing value replacements. |
Constructor Summary | |
---|---|
BasisFunctionLearnerTable(BufferedDataTable data,
String[] dataColumns,
String[] targetColumns,
BasisFunctionFactory factory,
BasisFunctionLearnerTable.MissingValueReplacementFunction missing,
boolean shrinkAfterCommit,
boolean maxClassCoverage,
int maxEpochs,
ExecutionMonitor exec)
Creates a new basis function learner and starts the training algorithm. |
|
BasisFunctionLearnerTable(BufferedDataTable data,
String[] dataColumns,
String[] targetColumns,
BasisFunctionFactory factory,
BasisFunctionLearnerTable.MissingValueReplacementFunction missing,
boolean shrinkAfterCommit,
boolean maxClassCoverage,
int maxEpochs,
int[] startRuleCount,
ExecutionMonitor exec)
Creates a new basisfunction learner and starts the training algorithm. |
Method Summary | |
---|---|
void |
addBasisFunction(BasisFunctionLearnerRow bf)
Adds the given basis function to the list using its nominal value for class assignment. |
void |
explain(BufferedDataTable data,
String[] dataColumns,
String[] targetColumns)
Assigns all explained examples to to basis functions. |
BasisFunctionIterator |
getBasisFunctionIterator()
|
Map<DataCell,List<BasisFunctionLearnerRow>> |
getBasisFunctions()
Returns the map of basis functions list for each class. |
(package private) int[] |
getClassDistribution()
|
DataTableSpec |
getDataTableSpec()
Returns the DataTableSpec object of this table which gives
information about the structure of this data table. |
(package private) BasisFunctionFactory |
getFactory()
|
DefaultHiLiteMapper |
getHiLiteMapper()
|
int |
getNumBasisFunctions()
Returns the overall number of Basisfunction in this model. |
(package private) int |
getNumBasisFunctions(DataCell classInfo)
Returns the number of basis functions for the given class. |
protected int |
getNumClasses()
|
BasisFunctionIterator |
iterator()
Returns a row iterator which returns each row one-by-one from the table. |
void |
print(PrintStream out)
Adds info about this object to the given stream. |
void |
removeBasisFunction(BasisFunctionLearnerRow bf)
Removes the given basisfunction from the model and updates all internal members. |
void |
saveInfos(ModelContentWO pp)
Saves the results of the training to the given object as string key-value pairs. |
void |
write(StringBuffer buf,
boolean full)
Write this model into the given string buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MISSING
public static final BasisFunctionLearnerTable.MissingValueReplacementFunction[] MISSINGS
Constructor Detail |
---|
public BasisFunctionLearnerTable(BufferedDataTable data, String[] dataColumns, String[] targetColumns, BasisFunctionFactory factory, BasisFunctionLearnerTable.MissingValueReplacementFunction missing, boolean shrinkAfterCommit, boolean maxClassCoverage, int maxEpochs, ExecutionMonitor exec) throws CanceledExecutionException
data
- the training data from which are all DoubleCell
columns are used for training and the last the specified
target
column for classificationdataColumns
- used for trainingtargetColumns
- name of the classification columnfactory
- the factory used to generate
BasisFunctionLearnerRow
smissing
- the missing values replacement functionshrinkAfterCommit
- if true
do itmaxClassCoverage
- use only maximum class coverage to checkmaxEpochs
- maximum number of epochs to trainexec
- the execution monitor
CanceledExecutionException
- always tested when a new run over data
is started.public BasisFunctionLearnerTable(BufferedDataTable data, String[] dataColumns, String[] targetColumns, BasisFunctionFactory factory, BasisFunctionLearnerTable.MissingValueReplacementFunction missing, boolean shrinkAfterCommit, boolean maxClassCoverage, int maxEpochs, int[] startRuleCount, ExecutionMonitor exec) throws CanceledExecutionException
data
- The training data from which are all DoubleCell
columns are used for training and the last the specified
target
column for classificationdataColumns
- used for trainingtargetColumns
- name of the classification columnfactory
- the factory used to generate
BasisFunctionLearnerRow
smissing
- the missing values replacement functionshrinkAfterCommit
- if true
do itmaxClassCoverage
- use only maximum class coverage to checkmaxEpochs
- maximum number of epochs to trainstartRuleCount
- at this pointexec
- the execution monitor
CanceledExecutionException
- always tested when a new run over data
is startedMethod Detail |
---|
public void explain(BufferedDataTable data, String[] dataColumns, String[] targetColumns)
data
- the data to explaindataColumns
- used for training onlytargetColumns
- names of target columnsBasisFunctionFactory getFactory()
public void addBasisFunction(BasisFunctionLearnerRow bf)
bf
- the basis function to addremoveBasisFunction(BasisFunctionLearnerRow)
public void removeBasisFunction(BasisFunctionLearnerRow bf)
bf
- the basis function to remove.addBasisFunction(BasisFunctionLearnerRow)
public int getNumBasisFunctions()
protected int getNumClasses()
int getNumBasisFunctions(DataCell classInfo)
classInfo
- the class to get the number of basisfunctions for
NullPointerException
- if the class label is null
getNumBasisFunctions()
public BasisFunctionIterator iterator()
iterator
in interface Iterable<DataRow>
iterator
in interface DataTable
DataRow
public DataTableSpec getDataTableSpec()
DataTableSpec
object of this table which gives
information about the structure of this data table.
getDataTableSpec
in interface DataTable
public Map<DataCell,List<BasisFunctionLearnerRow>> getBasisFunctions()
DataCell
info and the value a list of basisfunctions.
int[] getClassDistribution()
public BasisFunctionIterator getBasisFunctionIterator()
public void print(PrintStream out)
out
- the stream to add info to
NullPointerException
- if the given stream is null
public void saveInfos(ModelContentWO pp)
pp
- the object to write result strings topublic void write(StringBuffer buf, boolean full)
buf
- the buffer to write intofull
- write full description including the entire modelpublic DefaultHiLiteMapper getHiLiteMapper()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |