public class DotProductEuclidean extends Object implements DotProduct, Serializable, weka.core.Debuggable
Constructor and Description |
---|
DotProductEuclidean() |
Modifier and Type | Method and Description |
---|---|
double |
dotProduct(weka.core.Instance inst1,
weka.core.Instance inst2)
Calculate dot product between instances (vecttors)
|
boolean |
isDebug() |
double |
norm(weka.core.Instance vec)
Calculates the dot-product-induced norm of the vector
|
weka.core.Instance |
normalize(weka.core.Instance inst)
Returns normalized instance.
|
weka.core.Instance |
projection(weka.core.Instance inst1,
weka.core.Instance inst2)
Calculates the projection of instance 1 (inst1) on instance 2 (inst2).
|
void |
setDebug(boolean debug) |
public double dotProduct(weka.core.Instance inst1, weka.core.Instance inst2) throws Exception
DotProduct
dotProduct
in interface DotProduct
inst1
- -- Instance 1inst2
- -- Instance 2Exception
- -- when instances or dataset are incompatible with each otherpublic double norm(weka.core.Instance vec) throws Exception
DotProduct
norm
in interface DotProduct
norm
in interface IInstanceNormCalc
Exception
- -- when instances or dataset are incompatible with each otherpublic weka.core.Instance projection(weka.core.Instance inst1, weka.core.Instance inst2) throws Exception
DotProduct
projection
in interface DotProduct
inst1
- -- Instance 1inst2
- -- Instance 2Exception
- -- when instances or dataset are incompatible with each otherpublic weka.core.Instance normalize(weka.core.Instance inst) throws Exception
IInstanceNormCalc
normalize
in interface IInstanceNormCalc
inst
- -- instance to normalizeException
public boolean isDebug()
isDebug
in interface weka.core.Debuggable
public void setDebug(boolean debug)
setDebug
in interface weka.core.Debuggable
debug
- the debug to setCopyright © 2020. All rights reserved.