Exemplo n.º 1
0
//dump output to file
void output_sgd_result(std::string filename) {
    MMOutputter_mat<vertex_data> user_mat(filename + "_U.mm", 0, M, "This file contains SGD output matrix U. In each row D factors of a single user node.", latent_factors_inmem);
    MMOutputter_mat<vertex_data> item_mat(filename + "_V.mm", M, M+N,  "This file contains SGD  output matrix V. In each row D factors of a single item node.", latent_factors_inmem);

    Rcpp::Rcout << "CLiMF output files (in matrix market format): " << filename << "_U.mm" <<
                ", " << filename + "_V.mm " << std::endl;
}
Exemplo n.º 2
0
void output_als_result(std::string filename) {
	MMOutputter_mat<vertex_data> user_mat(filename + "_U.mm", 0, M,
			"This file contains ALS output matrix U. In each row D factors of a single user node.",
			latent_factors_inmem);
	MMOutputter_mat<vertex_data> item_mat(filename + "_V.mm", M, M + N,
			"This file contains ALS  output matrix V. In each row D factors of a single item node.",
			latent_factors_inmem);
	logstream(LOG_INFO) << "ALS output files (in matrix market format): "
			<< filename << "_U.mm" << ", " << filename + "_V.mm " << std::endl;
}
Exemplo n.º 3
0
void output_timesvdpp_result(std::string filename) {
  MMOutputter_mat<vertex_data> user_mat(filename + "_U.mm", 0, M, "This file contains TIMESVDPP output matrix U. In each row 4xD factors of a single user node. The vectors are [p pu x ptemp]", latent_factors_inmem);
  MMOutputter_mat<vertex_data> item_mat(filename + "_V.mm", M ,M+N, "This file contains -TIMESVDPP  output matrix V. In each row 2xD factors of a single item node. The vectors are [q y]", latent_factors_inmem);
  MMOutputter_mat<vertex_data> time_mat(filename + "_T.mm", M+N ,M+N+K, "This file contains -TIMESVDPP  output matrix T. In each row 2xD factors of a single time node. The vectors are [z pt]", latent_factors_inmem);
  MMOutputter_vec<vertex_data> mmoutput_bias_left(filename + "_U_bias.mm", 0, M, BIAS_POS, "This file contains time-svd++ output bias vector. In each row a single user bias.", latent_factors_inmem);
  MMOutputter_vec<vertex_data> mmoutput_bias_right(filename + "_V_bias.mm",M ,M+N , BIAS_POS, "This file contains time-svd++ output bias vector. In each row a single item bias.", latent_factors_inmem);
  MMOutputter_scalar gmean(filename + "_global_mean.mm", "This file contains time-svd++ global mean which is required for computing predictions.", globalMean);

  logstream(LOG_INFO) << " time-svd++ output files (in matrix market format): " << filename << "_U.mm" << ", " << filename + "_V.mm " << filename + "_T.mm, " << filename << " _global_mean.mm, " << filename << "_U_bias.mm " << filename << "_V_bias.mm " << std::endl;
}