public class VectorDictionary extends Object implements Serializable
Constructor and Description |
---|
VectorDictionary(Element vectNode,
MiningSchema ms)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
VectorInstance |
getVector(String ID)
Gets a vector from the dictionary corresponding to the supplied ID
|
static VectorDictionary |
getVectorDictionary(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(Element vectNode, MiningSchema ms) throws Exception
vectNode
- the XML containing the VectorDictionaryms
- the mining schemaException
- if something goes wrongpublic static VectorDictionary getVectorDictionary(Element container, MiningSchema ms) throws Exception
container
- the containing XMLms
- the mining schemaException
- if the VectorDictionary can't be read from the XML containerpublic double[] incomingInstanceToVectorFieldVals(double[] incoming) throws Exception
incoming
- an incoming instanceException
- if this array cant be constructed for some reasonpublic VectorInstance getVector(String ID)
ID
- the ID of the vector to retrieveCopyright © 2020 University of Waikato, Hamilton, NZ. All rights reserved.