public class Polynomial extends Object implements Kernel
Constructor and Description |
---|
Polynomial(double gamma,
double intercept,
double degree)
A polynomial kernel, (gamma*u.dot(v) + intercept)^degree.
|
Modifier and Type | Method and Description |
---|---|
com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance |
getProvenance() |
double |
similarity(SparseVector a,
SparseVector b)
Calculates the similarity between two
SparseVector s. |
String |
toString() |
public Polynomial(double gamma, double intercept, double degree)
gamma
- The scalar coefficient.intercept
- An additive coefficient.degree
- The degree of the polynomial.public double similarity(SparseVector a, SparseVector b)
Kernel
SparseVector
s.similarity
in interface Kernel
a
- The first SparseVector.b
- The second SparseVector.public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()
getProvenance
in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.