static float[] buildTemporaryUserVector(ALSServingModel model,
                                          List<Pair<String,Double>> parsedPathSegments,
                                          float[] Xu) throws OryxServingException {
    boolean implicit = model.isImplicit();
    Solver solver = model.getYTYSolver();
    check(solver != null, Response.Status.SERVICE_UNAVAILABLE, "No solver available for model yet");
    for (Pair<String,Double> itemValue : parsedPathSegments) {
      float[] Yi = model.getItemVector(itemValue.getFirst());
      // Given value is taken to be the fictitious current value of Qui = Xu * Yi^T
      float[] newXu = ALSUtils.computeUpdatedXu(solver, itemValue.getSecond(), Xu, Yi, implicit);
      if (newXu != null) {
        Xu = newXu;
      }
    }
    return Xu;
  }
static float[] buildTemporaryUserVector(ALSServingModel model,
                                          List<Pair<String,Double>> parsedPathSegments,
                                          float[] Xu) throws OryxServingException {
    boolean implicit = model.isImplicit();
    Solver solver = model.getYTYSolver();
    check(solver != null, Response.Status.SERVICE_UNAVAILABLE, "No solver available for model yet");
    for (Pair<String,Double> itemValue : parsedPathSegments) {
      float[] Yi = model.getItemVector(itemValue.getFirst());
      
      float[] newXu = ALSUtils.computeUpdatedXu(solver, itemValue.getSecond(), Xu, Yi, implicit);
      if (newXu != null) {
        Xu = newXu;
      }
    }
    return Xu;
  }
static float [ ] buildTemporaryUserVector ( ALSServingModel model , List < Pair < String , Double > > parsedPathSegments , float [ ] Xu ) throws OryxServingException { boolean implicit = model . isImplicit ( ) ; Solver solver = model . getYTYSolver ( ) ; check ( solver != null , Response . Status . SERVICE_UNAVAILABLE , "No solver available for model yet" ) ; for ( Pair < String , Double > itemValue : parsedPathSegments ) { float [ ] Yi = model . getItemVector ( itemValue . getFirst ( ) ) ; // Given value is taken to be the fictitious current value of Qui = Xu * Yi^T float [ ] newXu = ALSUtils . computeUpdatedXu ( solver , itemValue . getSecond ( ) , Xu , Yi , implicit ) ; if ( newXu != null ) { Xu = newXu ; } } return Xu ; }
Builds a temporary user feature vector given an (optional) existing user vector and a context
of items.

@param model current ALS model
@param parsedPathSegments request path segments containing item-value pairs
@param Xu existing feature vector for the user (may be {@code null})
@return user feature vector
Builds a temporary user feature vector given an ( optional ) existing user vector and a context of items .