Perform an element by element addition between two instances
Perform an element by element addition between two instances
an Instance which is added up
a SparseInstance representing the added Instances
Get the value present at position index
Get the value present at position index
the index of the features
a Double representing the feature value, or 0 if the index is not present in the underlying data structure
Compute the Euclidean distance to another Instance
Compute the Euclidean distance to another Instance
the Instance to which the distance is computed
a Double representing the distance value
Perform a dot product between two instances
Perform a dot product between two instances
an Instance with which the dot product is performed
a Double representing the dot product
Return an array of features and indexes
Return an array of features and indexes
an array of turple2(value,index)
Perform an element by element multiplication between two instances
Perform an element by element multiplication between two instances
an Instance which is multiplied
a SparseInstance representing the Hadamard product
Apply an operation to every feature of the Instance (essentially a map)
Apply an operation to every feature of the Instance (essentially a map)
the function for the transformation
a new SparseInstance with the transformed features
Aggregate the values of an instance
Aggregate the values of an instance
the function for the transformation
the aggregated value
Append a feature to the instance
Append a feature to the instance
the index at which the value is added
the value which is added up
a SparseInstance representing the new feature vector
A SparseInstance is an Instance in which the features are sparse, i.e., most features will not have any value. The SparseInstance will keep two Arrays: one with the values and one with the corresponding indexes. The implementation will be based on these two data structures.