Package weka.classifiers.functions.explicitboundaries.gemoetry

# Class DotProductEuclidean

java.lang.Object
weka.classifiers.functions.explicitboundaries.gemoetry.DotProductEuclidean

All Implemented Interfaces:
  `Serializable`, `DotProduct`, `IInstanceNormCalc`, `weka.core.Debuggable`

public class DotProductEuclidean extends Object implements DotProduct, Serializable, weka.core.Debuggable

Since:
  0.1.0
Version:
  2.1.0
Author:
  pawel trajdos
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DotProductEuclidean()`

- ## Method Summary

  Modifier and Type
  Method
  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)`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DotProductEuclidean

    public DotProductEuclidean()

- ## Method Details

  - ### dotProduct

    public double dotProduct(weka.core.Instance inst1, weka.core.Instance inst2) throws Exception
    Description copied from interface: `DotProduct`
    Calculate dot product between instances (vecttors)
    Specified by:
      `dotProduct` in interface `DotProduct`
    Parameters:
      `inst1` - -- Instance 1
      `inst2` - -- Instance 2
    Returns:
      Dot product
    Throws:
      `Exception` - -- when instances or dataset are incompatible with each other

  - ### norm

    public double norm(weka.core.Instance vec) throws Exception
    Description copied from interface: `DotProduct`
    Calculates the dot-product-induced norm of the vector
    Specified by:
      `norm` in interface `DotProduct`
    Specified by:
      `norm` in interface `IInstanceNormCalc`
    Returns:
      vector/instance norm
    Throws:
      `Exception` - -- when instances or dataset are incompatible with each other

  - ### projection

    public weka.core.Instance projection(weka.core.Instance inst1, weka.core.Instance inst2) throws Exception
    Description copied from interface: `DotProduct`
    Calculates the projection of instance 1 (inst1) on instance 2 (inst2). The projection uses the above-defined dot product and norm.
    Specified by:
      `projection` in interface `DotProduct`
    Parameters:
      `inst1` - -- Instance 1
      `inst2` - -- Instance 2
    Returns:
      Projection of inst1 on inst2
    Throws:
      `Exception` - -- when instances or dataset are incompatible with each other

  - ### normalize

    public weka.core.Instance normalize(weka.core.Instance inst) throws Exception
    Description copied from interface: `IInstanceNormCalc`
    Returns normalized instance. Only numeric attributes are normalized. If the norm of the vector is 0, then the vector is not normalized.
    Specified by:
      `normalize` in interface `IInstanceNormCalc`
    Parameters:
      `inst` - -- instance to normalize
    Returns:
    Throws:
      `Exception`

  - ### isDebug

    public boolean isDebug()
    Specified by:
      `isDebug` in interface `weka.core.Debuggable`
    Returns:
      the debug

  - ### setDebug

    public void setDebug(boolean debug)
    Specified by:
      `setDebug` in interface `weka.core.Debuggable`
    Parameters:
      `debug` - the debug to set