Treelite
Functions
xgboost.cc File Reference

Frontend for xgboost model. More...

#include "xgboost/xgboost.h"
#include <dmlc/data.h>
#include <dmlc/memory_io.h>
#include <treelite/frontend.h>
#include <treelite/tree.h>
#include <algorithm>
#include <memory>
#include <queue>
#include <cstring>
Include dependency graph for xgboost.cc:

Go to the source code of this file.

Functions

 DMLC_REGISTRY_FILE_TAG (xgboost)
 
std::unique_ptr< treelite::ModelLoadXGBoostModel (const char *filename)
 load a model file generated by XGBoost (dmlc/xgboost). The model file must contain a decision tree ensemble. More...
 
std::unique_ptr< treelite::ModelLoadXGBoostModel (const void *buf, size_t len)
 load an XGBoost model from a memory buffer. More...
 

Detailed Description

Frontend for xgboost model.

Copyright (c) 2017-2020 by Contributors

Author
Hyunsu Cho

Definition in file xgboost.cc.

Function Documentation

◆ LoadXGBoostModel() [1/2]

std::unique_ptr< treelite::Model > LoadXGBoostModel ( const char *  filename)

load a model file generated by XGBoost (dmlc/xgboost). The model file must contain a decision tree ensemble.

Parameters
filenamename of model file
Returns
loaded model

Definition at line 29 of file xgboost.cc.

◆ LoadXGBoostModel() [2/2]

std::unique_ptr< treelite::Model > LoadXGBoostModel ( const void *  buf,
size_t  len 
)

load an XGBoost model from a memory buffer.

Parameters
bufmemory buffer
lensize of memory buffer
Returns
loaded model

Definition at line 34 of file xgboost.cc.