|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.mine.bfn.BasisFunctionFactory
public abstract class BasisFunctionFactory
Factory class for BasisFunctionLearnerRow
which automatically
creates new basis functions of a certain type.
BasisFunctionLearnerRow
Field Summary | |
---|---|
(package private) static String |
CFG_DISTANCE
Key for the distance function. |
(package private) static String |
CFG_MODEL_SPEC
Key for the model spec. |
static DataColumnSpec |
CLASS_COLUMN
Name of the basisfunction class column. |
Constructor Summary | |
---|---|
protected |
BasisFunctionFactory(DataTableSpec spec,
String[] targetColumns,
DataType type,
int distance)
Creates new basisfunction factory with the given spec to extract min/max value for all numeric columns. |
Method Summary | |
---|---|
abstract BasisFunctionLearnerRow |
commit(RowKey key,
DataCell classInfo,
DataRow row)
Returns a new row initialised by a DataRow as its initial center vector and a class
label. |
static DataTableSpec |
createModelSpec(DataTableSpec inSpec,
String[] dataColumns,
String[] targetColumns,
DataType type)
Creates a model spec based on the data input spec by extracting all DoubleCell columns and the specified
target column. |
static String[] |
findDataColumns(DataTableSpec spec,
List<String> targetCols)
Find all numeric columns which are not target columns. |
int |
getDistance()
Returns the choice of distance function. |
MutableDouble[] |
getMaximums()
|
MutableDouble[] |
getMinimums()
|
DataTableSpec |
getModelSpec()
|
void |
save(ModelContent pp)
Saves to model content. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final String CFG_DISTANCE
static final String CFG_MODEL_SPEC
public static final DataColumnSpec CLASS_COLUMN
Constructor Detail |
---|
protected BasisFunctionFactory(DataTableSpec spec, String[] targetColumns, DataType type, int distance)
spec
- the training's data spectargetColumns
- the class info column in the datatype
- the type for the model columnsdistance
- the choice of distance functionMethod Detail |
---|
public static final String[] findDataColumns(DataTableSpec spec, List<String> targetCols)
spec
- the input spectargetCols
- column(s) set as target
public final MutableDouble[] getMinimums()
public final MutableDouble[] getMaximums()
public static final DataTableSpec createModelSpec(DataTableSpec inSpec, String[] dataColumns, String[] targetColumns, DataType type)
DoubleCell
columns and the specified
target column.
inSpec
- the input data specdataColumns
- the data columns used for trainingtargetColumns
- the target classification columnstype
- the type for the model columns
DoubleCell
s and
the target column lastpublic final int getDistance()
public DataTableSpec getModelSpec()
public abstract BasisFunctionLearnerRow commit(RowKey key, DataCell classInfo, DataRow row)
DataRow
as its initial center vector and a class
label.
key
- this row's keyclassInfo
- data cell contains class inforow
- the initial center vector
public void save(ModelContent pp)
pp
- the model content this is saved to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |