/** * Called after an iteration has finished. */ void after_iteration(int iteration, graphchi_context &gcontext) { rbm_alpha *= rbm_mult_step_dec; training_rmse(iteration, gcontext); if (iteration >= 2) run_validation(pvalidation_engine, gcontext); else Rcpp::Rcout<<std::endl; }
/** * Called after an iteration has finished. */ void after_iteration(int iteration, graphchi_context &gcontext) { //print rmse every other iteration, since 2 iterations are considered one NMF round int now = iteration % 2; if (now == 0){ training_rmse(iteration/2, gcontext); run_validation(pvalidation_engine, gcontext); } }
/** * Called before an iteration is started. */ void before_iteration(int iteration, graphchi_context &gcontext) { Rcpp::Rcerr << "before_iteration: resetting MRR" << std::endl; reset_mrr(gcontext.execthreads); last_training_objective = training_objective; objective_vec = zeros(gcontext.execthreads); stat_vec = zeros(gcontext.execthreads); node_without_edges = 0; if (gcontext.iteration == 0) run_validation(pvalidation_engine, gcontext); }
/** * Called after an iteration has finished. */ void after_iteration(int iteration, graphchi_context &gcontext) { training_objective = sum(objective_vec); Rcpp::Rcout<<" Training objective:" << std::setw(10) << training_objective << std::endl; if (halt_on_mrr_decrease > 0 && halt_on_mrr_decrease < cur_iteration && training_objective < last_training_objective) { Rcpp::Rcout << "Stopping engine because of validation objective decrease" << std::endl; gcontext.set_last_iteration(gcontext.iteration); } Rcpp::Rcerr << "after_iteration: running validation engine" << std::endl; run_validation(pvalidation_engine, gcontext); if (verbose) Rcpp::Rcout<<"Average step size: " << sum(stat_vec)/(double)M << "Node without edges: " << node_without_edges << std::endl; sgd_gamma *= sgd_step_dec; }
/** * Called after an iteration has finished. */ void after_iteration(int iteration, graphchi_context &gcontext) { training_objective = sum(objective_vec); std::cout<<" Training objective:" << std::setw(10) << training_objective << std::endl; if (halt_on_mrr_decrease > 0 && halt_on_mrr_decrease < cur_iteration && training_objective < last_training_objective) { logstream(LOG_WARNING) << "Stopping engine because of validation objective decrease" << std::endl; gcontext.set_last_iteration(gcontext.iteration); } logstream(LOG_DEBUG) << "after_iteration: running validation engine" << std::endl; run_validation(pvalidation_engine, gcontext); sgd_gamma *= sgd_step_dec; }
/** * Called after an iteration has finished. */ void after_iteration(int iteration, graphchi_context &gcontext) { sgd_gamma *= sgd_step_dec; training_rmse(iteration, gcontext); run_validation(pvalidation_engine, gcontext); /* std::vector<double> lbo (D,0); std::vector<double> rbo (D,1); double copy[N]; for(int j = 0; j < D; j++) { for(unsigned int i = M; i < M + N; i++) copy[i - M] = latent_factors_inmem.at(i).pvec[j]; std::sort(copy, copy+N); lbo.at(j) = copy[0]; rbo.at(j) = copy[N-1]; } std::cout << "left bound: ("; for(int i = 0; i < D; i++) std::cout << lbo.at(i) << ", "; std::cout << "). right bound: ("; for(int i = 0; i < D; i++) std::cout << rbo.at(i) << ", "; std::cout << ")." << std::endl;*/ }
/** * Called after an iteration has finished. */ void after_iteration(int iteration, graphchi_context &gcontext) { sgd_gamma *= sgd_step_dec; training_rmse(iteration, gcontext); run_validation(pvalidation_engine, gcontext); }
/** * Called after an iteration has finished. */ void after_iteration(int iteration, graphchi_context &gcontext) { training_rmse(iteration, gcontext); run_validation(pvalidation_engine, gcontext); }
/** * Called after an iteration has finished. */ void after_iteration(int iteration, CE_Graph_context &gcontext) { biassgd_gamma *= biassgd_step_dec; training_rmse(iteration, gcontext); run_validation(pvalidation_engine, gcontext); }