@Deprecated class ClassAttributeModel extends AttributeModel
AttributeModel
implementation holds the class attribute
information like the number of rows per class value.Modifier and Type | Field and Description |
---|---|
(package private) static String |
MODEL_TYPE
Deprecated.
The unique type of this model used for saving/loading.
|
MODEL_CONTAINS_NO_CLASS_VALUES, MODEL_CONTAINS_NO_RECORDS
Constructor and Description |
---|
ClassAttributeModel(String rowCaption,
boolean skipMissingVals,
int maxNoOfClassVals)
Deprecated.
Constructor for class ClassRowValue.
|
ClassAttributeModel(String attributeName,
int noOfMissingVals,
boolean skipMissingVals,
Config config)
Deprecated.
Constructor for class ClassModel.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addValueInternal(String classValue,
DataCell attrValue)
Deprecated.
Adds the given value to the concrete implementation.
|
(package private) Collection<String> |
getClassValues()
Deprecated.
|
(package private) Class<? extends DataValue> |
getCompatibleType()
Deprecated.
|
(package private) String |
getHTMLView(int totalNoOfRecs)
Deprecated.
|
(package private) String |
getHTMLViewHeadLine()
Deprecated.
|
(package private) Integer |
getNoOfRecs4ClassValue(String classValue)
Deprecated.
|
(package private) double |
getProbabilityInternal(String classValue,
DataCell attributeValue,
double laplaceCorrector)
Deprecated.
This should also handle missing values.
|
(package private) String |
getType()
Deprecated.
|
(package private) void |
saveModelInternal(Config config)
Deprecated.
|
String |
toString()
Deprecated.
|
(package private) void |
validate()
Deprecated.
Called after all training rows where added to validate the model.
|
addValue, compareTo, createHTMLTable, createTableHeader, getAttributeName, getInvalidCause, getMissingValueHeader, getNoOfMissingVals, getProbability, loadModel, saveModel, setInvalidCause, sortCollection
static final String MODEL_TYPE
ClassAttributeModel(String rowCaption, boolean skipMissingVals, int maxNoOfClassVals)
rowCaption
- the row captionskipMissingVals
- set to true
if the missing values
should be skipped during learning and predictionmaxNoOfClassVals
- the maximum supported number of class valuesClassAttributeModel(String attributeName, int noOfMissingVals, boolean skipMissingVals, Config config) throws InvalidSettingsException
attributeName
- the name of the attributenoOfMissingVals
- the number of missing valuesskipMissingVals
- set to true
if the missing values
should be skipped during learning and predictionconfig
- the Config
object to read fromInvalidSettingsException
- if the settings are invalidvoid saveModelInternal(Config config)
saveModelInternal
in class AttributeModel
config
- the config object to save tovoid addValueInternal(String classValue, DataCell attrValue) throws TooManyValuesException
addValueInternal
in class AttributeModel
classValue
- the class valueattrValue
- the attribute value. Could be a missing value.TooManyValuesException
- if the column contains more unique
values than supported by this attribute modelTooManyValuesException
void validate() throws InvalidSettingsException
validate
in class AttributeModel
InvalidSettingsException
- if the model isn't validClass<? extends DataValue> getCompatibleType()
getCompatibleType
in class AttributeModel
DataValue
class to check if the rows
are compatibleCollection<String> getClassValues()
getClassValues
in class AttributeModel
Integer getNoOfRecs4ClassValue(String classValue)
getNoOfRecs4ClassValue
in class AttributeModel
classValue
- the class value we want the number of records fornull
if only missing values where in this row for the
given class value or the class value wasn't found at alldouble getProbabilityInternal(String classValue, DataCell attributeValue, double laplaceCorrector)
getProbabilityInternal
in class AttributeModel
classValue
- the class value to calculate the probability forattributeValue
- the attribute value to calculate the
probability for. Could be a missing value.laplaceCorrector
- the Laplace corrector to use. A value greater 0
overcomes zero counts.String getType()
getType
in class AttributeModel
String getHTMLViewHeadLine()
getHTMLViewHeadLine
in class AttributeModel
String getHTMLView(int totalNoOfRecs)
getHTMLView
in class AttributeModel
totalNoOfRecs
- the total number of records in the training data
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.