@Shareable @Immutable public class DomainClampingKernel extends Object implements BiasedMFKernel, Serializable
Kernel that clamps each feature’s contribution to the preference domain.
Constructor and Description |
---|
DomainClampingKernel(PreferenceDomain dom) |
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() |
@Inject public DomainClampingKernel(PreferenceDomain dom)
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.