Class Sigmoid

java.lang.Object
org.tribuo.math.kernel.Sigmoid
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>, Serializable, Kernel

public class Sigmoid extends Object implements Kernel
A sigmoid kernel, tanh(gamma*u.dot(v) + intercept).
See Also:
  • Constructor Details

    • Sigmoid

      public Sigmoid(double gamma, double intercept)
      A sigmoid kernel, tanh(gamma*u.dot(v) + intercept).
      Parameters:
      gamma - A scalar coefficient.
      intercept - An additive coefficient.
  • Method Details

    • similarity

      public double similarity(SparseVector a, SparseVector b)
      Description copied from interface: Kernel
      Calculates the similarity between two SparseVectors.
      Specified by:
      similarity in interface Kernel
      Parameters:
      a - The first SparseVector.
      b - The second SparseVector.
      Returns:
      A value between 0 and 1, where 1 is most similar and 0 is least similar.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getProvenance

      public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()
      Specified by:
      getProvenance in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>