@Deprecated public class BitVectorAttributeModel extends AttributeModel
AttributeModel
implementation that can handle BitVectorValue
s.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 |
---|
BitVectorAttributeModel(String attributeName,
boolean skipMissingVals)
Deprecated.
Constructor for class BitVectorAttributeModel.
|
BitVectorAttributeModel(String attributeName,
boolean skipMissingVals,
int noOfMissingVals,
Config config)
Deprecated.
Constructor for class BitVectorAttributeModel.
|
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<BitVectorValue> |
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) int |
getVectorLength()
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
BitVectorAttributeModel(String attributeName, boolean skipMissingVals)
attributeName
- the name of the attributeskipMissingVals
- set to true
if the missing values
should be skipped during learning and predictionpublic BitVectorAttributeModel(String attributeName, boolean skipMissingVals, int noOfMissingVals, Config config) throws InvalidSettingsException
attributeName
- the name of the attributeskipMissingVals
- set to true
if the missing values
should be skipped during learning and predictionnoOfMissingVals
- the number of missing valuesconfig
- 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 validate() throws InvalidSettingsException
validate
in class AttributeModel
InvalidSettingsException
- if the model isn't validString getType()
getType
in class AttributeModel
Class<BitVectorValue> getCompatibleType()
getCompatibleType
in class AttributeModel
DataValue
class to check if the rows
are compatiblevoid 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
Collection<String> getClassValues()
getClassValues
in class AttributeModel
int getVectorLength()
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 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.