@Shareable @Immutable public class DotProductKernel extends Object implements BiasedMFKernel, Serializable
Kernel function that uses the dot product of the user and item vectors.
Constructor and Description |
---|
DotProductKernel() |
Modifier and Type | Method and Description |
---|---|
double |
apply(double bias,
org.apache.commons.math3.linear.RealVector user,
org.apache.commons.math3.linear.RealVector item)
Apply the kernel function.
|
boolean |
equals(Object o) |
int |
hashCode() |
String |
toString() |
public double apply(double bias, @Nonnull org.apache.commons.math3.linear.RealVector user, @Nonnull org.apache.commons.math3.linear.RealVector item)
BiasedMFKernel
Apply the kernel function.
apply
in interface BiasedMFKernel
bias
- The combined user-item bias term (the baseline score, usually).user
- The user-factor vector.item
- The item-factor vector.