public static float [ ] computeUpdatedXu ( Solver solver , double value , float [ ] Xu , float [ ] Yi , boolean implicit ) { if ( Yi == null ) { return null ; } boolean noXu = Xu == null ; double Qui = noXu ? 0.0 : VectorMath . dot ( Xu , Yi ) ; // Qui' is the target, new value of Qui // 0.5 reflects a "don't know" state double targetQui = computeTargetQui ( implicit , value , noXu ? 0.5 : Qui ) ; if ( Double . isNaN ( targetQui ) ) { return null ; } double dQui = targetQui - Qui ; double [ ] dQuiYi = new double [ Yi . length ] ; for ( int i = 0 ; i < dQuiYi . length ; i ++ ) { dQuiYi [ i ] = Yi [ i ] * dQui ; } double [ ] dXu = solver . solveDToD ( dQuiYi ) ; float [ ] newXu = noXu ? new float [ dXu . length ] : Xu . clone ( ) ; for ( int i = 0 ; i < newXu . length ; i ++ ) { newXu [ i ] += dXu [ i ] ; } return newXu ; }
Computes how a user vector Xu changes in response to interaction with an item vector Yi . This can also be used to compute how an item vector changes in response to a user interaction even though the code naming follows the former convention .