Commit eade219e authored by Qiwei Ye's avatar Qiwei Ye
Browse files

merge conflict

parents f23e6083 060bd316
This diff is collapsed.
This diff is collapsed.
......@@ -12,7 +12,7 @@
#include "predictor.hpp"
#include <omp.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <cstdio>
#include <ctime>
......@@ -226,10 +226,10 @@ void Application::Train() {
int total_iter = config_.boosting_config.num_iterations;
bool is_finished = false;
bool need_eval = true;
auto start_time = std::chrono::high_resolution_clock::now();
auto start_time = std::chrono::steady_clock::now();
for (int iter = 0; iter < total_iter && !is_finished; ++iter) {
is_finished = boosting_->TrainOneIter(nullptr, nullptr, need_eval);
auto end_time = std::chrono::high_resolution_clock::now();
auto end_time = std::chrono::steady_clock::now();
// output used time per iteration
Log::Info("%f seconds elapsed, finished iteration %d", std::chrono::duration<double,
std::milli>(end_time - start_time) * 1e-3, iter + 1);
......
......@@ -6,7 +6,7 @@
#include <LightGBM/utils/text_reader.h>
#include <LightGBM/dataset.h>
#include <omp.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <cstring>
#include <cstdio>
......@@ -19,7 +19,7 @@
namespace LightGBM {
/*!
* \brief Used to prediction data with input model
* \brief Used to predict data with input model
*/
class Predictor {
public:
......@@ -27,7 +27,7 @@ public:
* \brief Constructor
* \param boosting Input boosting model
* \param is_raw_score True if need to predict result with raw score
* \param predict_leaf_index True if output leaf index instead of prediction score
* \param is_predict_leaf_index True if output leaf index instead of prediction score
*/
Predictor(const Boosting* boosting, bool is_raw_score, bool is_predict_leaf_index) {
boosting_ = boosting;
......@@ -69,14 +69,13 @@ public:
~Predictor() {
}
inline const PredictFunction& GetPredictFunction() {
inline const PredictFunction& GetPredictFunction() const {
return predict_fun_;
}
/*!
* \brief predicting on data, then saving result to disk
* \param data_filename Filename of data
* \param has_label True if this data contains label
* \param result_filename Filename of output result
*/
void Predict(const char* data_filename, const char* result_filename, bool has_header) {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#ifndef LIGHTGBM_BOOSTING_SCORE_UPDATER_HPP_
#define LIGHTGBM_BOOSTING_SCORE_UPDATER_HPP_
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/meta.h>
#include <LightGBM/dataset.h>
#include <LightGBM/tree.h>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment