public class VectorDictionary
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected int |
m_numberOfVectors
The number of support vectors in the dictionary
|
protected java.util.List<FieldRef> |
m_vectorFields
The fields accessed by the support vectors
|
protected java.util.Map<java.lang.String,VectorInstance> |
m_vectorInstances
The vectors in the dictionary
|
| Constructor and Description |
|---|
VectorDictionary(org.w3c.dom.Element vectNode,
MiningSchema ms)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
VectorInstance |
getVector(java.lang.String ID)
Gets a vector from the dictionary corresponding to the supplied ID
|
static VectorDictionary |
getVectorDictionary(org.w3c.dom.Element container,
MiningSchema ms)
Returns a new VectorDictionary constructed from the supplied XML container
|
double[] |
incomingInstanceToVectorFieldVals(double[] incoming)
Convert an incoming instance to an array of values that corresponds
to the fields referenced by the support vectors in the vector dictionary
|
protected int m_numberOfVectors
protected java.util.List<FieldRef> m_vectorFields
protected java.util.Map<java.lang.String,VectorInstance> m_vectorInstances
public VectorDictionary(org.w3c.dom.Element vectNode,
MiningSchema ms)
throws java.lang.Exception
vectNode - the XML containing the VectorDictionaryms - the mining schemajava.lang.Exception - if something goes wrongpublic static VectorDictionary getVectorDictionary(org.w3c.dom.Element container, MiningSchema ms) throws java.lang.Exception
container - the containing XMLms - the mining schemajava.lang.Exception - if the VectorDictionary can't be read from the XML containerpublic double[] incomingInstanceToVectorFieldVals(double[] incoming)
throws java.lang.Exception
incoming - an incoming instancejava.lang.Exception - if this array cant be constructed for some reasonpublic VectorInstance getVector(java.lang.String ID)
ID - the ID of the vector to retrieve