public class VectorDictionary
extends java.lang.Object
implements java.io.Serializable
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
|
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