diff --git a/inst/include/wrmf_implicit.hpp b/inst/include/wrmf_implicit.hpp index 7bd5850..d8fe1c7 100644 --- a/inst/include/wrmf_implicit.hpp +++ b/inst/include/wrmf_implicit.hpp @@ -182,17 +182,17 @@ T als_implicit(const dMappedCSC& Conf, arma::Mat& X, arma::Mat& Y, arma::Col confidence = arma::conv_to >::from(arma::vec(&Conf.values[p1], p2 - p1)); X_nnz = X.cols(idx); + init = Y.col(i); // if is_x_bias_last_row == true // X_nnz = [1, ...] // if is_x_bias_last_row == false // X_nnz = [..., 1] if (with_biases) { X_nnz = drop_row(X_nnz, is_x_bias_last_row); - // init = drop_row(init, !is_x_bias_last_row); + init = drop_row(init, !is_x_bias_last_row); } if (solver == CONJUGATE_GRADIENT) { - init = Y.col(i); if (!with_biases && !global_bias) Y_new = cg_solver_implicit(X_nnz, confidence, init, cg_steps, XtX); else if (with_biases) {