public final class ALSUtils extends Object
Modifier and Type | Method and Description |
---|---|
static double |
computeTargetQui(boolean implicit,
double value,
double currentValue)
Computes how the estimated strength of interaction in the model should change -- to what target
value -- in response to a new interaction.
|
static float[] |
computeUpdatedXu(Solver solver,
double value,
float[] Xu,
float[] Yi,
boolean implicit)
Computes how a user vector Xu changes in response to interaction with an item vector Yi.
|
public static double computeTargetQui(boolean implicit, double value, double currentValue)
implicit
- whether the model is implicit feedbackvalue
- new interaction's strengthcurrentValue
- existing estimated of strength of interactionpublic static float[] computeUpdatedXu(Solver solver, double value, float[] Xu, float[] Yi, boolean implicit)
solver
- solver helping solve for Xu in Qu*Y = Xu * (Yt * Y)value
- strength of interactionXu
- current user vector (null if no existing user vector)Yi
- current item vectorimplicit
- whether the model is implicit feedbacknull
if no update should be made (i.e. there was no
item vector; the update would push the new Qui farther out of range)Copyright © 2014–2018. All rights reserved.