Package weka.core.pmml
Class VectorInstance
java.lang.Object
weka.core.pmml.VectorInstance
- All Implemented Interfaces:
Serializable
Class encapsulating a PMML VectorInstance construct
- Version:
- $Revision: 8034 $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
-
Constructor Summary
ConstructorDescriptionVectorInstance
(Element vecElement, List<FieldRef> vectorFields) ConstructorVectorInstance
(Array values, List<FieldRef> vectorFields) Constructor -
Method Summary
Modifier and TypeMethodDescriptiondouble
dotProduct
(double[] other) Computes the dot product between this vector instance and the supplied array of valuesdouble
dotProduct
(VectorInstance other) Computes the dot product between this vector instance and the argumentgetID()
Get the ID of this vector instanceGet the Array of values encapsulated in this vector instanceGet the mining fields that are indexed by this vector instancesubtract
(double[] other) Subtract the values in the supplied array from this vector instancesubtract
(VectorInstance other) Subtract the supplied VectorInstance from this one and return the result as a new VectorInstance
-
Constructor Details
-
VectorInstance
Constructor- Parameters:
values
- the Array of values for this vector instancevectorFields
- the mining fields indexed by this vector instance
-
VectorInstance
Constructor- Parameters:
vecElement
- PMML element containing this vector instancevectorFields
- the mining fields indexed by this vector instance- Throws:
Exception
- if something goes wrong
-
-
Method Details
-
getID
Get the ID of this vector instance- Returns:
- the ID of this vector instance
-
getValues
Get the Array of values encapsulated in this vector instance- Returns:
- the Array of values encapsulated in this vector instance
-
getVectorFields
Get the mining fields that are indexed by this vector instance- Returns:
- the mining fields that are indexed by this vector instance
-
subtract
Subtract the values in the supplied array from this vector instance- Parameters:
other
- an array of values- Returns:
- a new VectorInstance containing the result of the subtraction
- Throws:
Exception
- if something goes wrong
-
subtract
Subtract the supplied VectorInstance from this one and return the result as a new VectorInstance- Parameters:
other
- the vector instance to subtract- Returns:
- a new VectorInstance containing the result of the subtraction
- Throws:
Exception
- if something goes wrong
-
dotProduct
Computes the dot product between this vector instance and the argument- Parameters:
other
- the vector instance to perform the dot product with- Returns:
- the dot product of this and the supplied vector instance
- Throws:
Exception
- if something goes wrong
-
dotProduct
Computes the dot product between this vector instance and the supplied array of values- Parameters:
other
- an array of values to perform the dot product with- Returns:
- the dot product of this vector instance with the argument
- Throws:
Exception
- if something goes wrong
-