public final class BasisFunctionLearnerTable extends Object implements DataTable
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
.
Modifier and Type | Class and Description |
---|---|
static interface |
BasisFunctionLearnerTable.MissingValueReplacementFunction
General missing values replacement interface.
|
Modifier and Type | Field and Description |
---|---|
static String |
MISSING
NodeSettings key for the missing replacement value.
|
static BasisFunctionLearnerTable.MissingValueReplacementFunction[] |
MISSINGS
A list of possible missing value replacements.
|
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static final String MISSING
public static final BasisFunctionLearnerTable.MissingValueReplacementFunction[] MISSINGS
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 monitorCanceledExecutionException
- 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 monitorCanceledExecutionException
- always tested when a new run over data
is startedpublic 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 forNullPointerException
- if the class label is null
getNumBasisFunctions()
public BasisFunctionIterator iterator()
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 toNullPointerException
- 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()
KNIME GmbH, Konstanz, Germany
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.