Refactor linear modelling and add new coordinate descent updater (#3103)

* Refactor linear modelling and add new coordinate descent updater

* Allow unsorted column iterator

* Add prediction cacheing to gblinear
This commit is contained in:
Rory Mitchell
2018-02-17 09:17:01 +13:00
committed by GitHub
parent 9ffe8596f2
commit 10eb05a63a
23 changed files with 1252 additions and 271 deletions

View File

@@ -2,6 +2,7 @@
* Copyright by Contributors 2017
*/
#pragma once
#include <xgboost/logging.h>
#include <chrono>
#include <iostream>
#include <map>
@@ -28,7 +29,8 @@ struct Timer {
double ElapsedSeconds() const { return SecondsT(elapsed).count(); }
void PrintElapsed(std::string label) {
char buffer[255];
snprintf(buffer, sizeof(buffer), "%s:\t %fs", label.c_str(), SecondsT(elapsed).count());
snprintf(buffer, sizeof(buffer), "%s:\t %fs", label.c_str(),
SecondsT(elapsed).count());
LOG(CONSOLE) << buffer;
Reset();
}