treelite
Classes | Functions
frontend.h File Reference

Collection of front-end methods to load or construct ensemble model. More...

#include <treelite/base.h>
#include <memory>
#include <vector>
#include <cstdint>
Include dependency graph for frontend.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TreeBuilder
 tree builder class More...
 
class  ModelBuilder
 model builder class More...
 

Functions

Model LoadLightGBMModel (const char *filename)
 load a model file generated by LightGBM (Microsoft/LightGBM). The model file must contain a decision tree ensemble. More...
 
Model LoadXGBoostModel (const char *filename)
 load a model file generated by XGBoost (dmlc/xgboost). The model file must contain a decision tree ensemble. More...
 
Model LoadXGBoostModel (const void *buf, size_t len)
 load an XGBoost model from a memory buffer. More...
 
Model LoadProtobufModel (const char *filename)
 load a model in Protocol Buffers format. Protocol Buffers (google/protobuf) is a language- and platform-neutral mechanism for serializing structured data. See tree.proto for format spec. More...
 
void ExportProtobufModel (const char *filename, const Model &model)
 export a model in Protocol Buffers format. Protocol Buffers (google/protobuf) is a language- and platform-neutral mechanism for serializing structured data. See src/tree.proto for format spec. More...
 

Detailed Description

Collection of front-end methods to load or construct ensemble model.

Copyright 2017 by Contributors

Author
Philip Cho

Definition in file frontend.h.

Function Documentation

void ExportProtobufModel ( const char *  filename,
const Model model 
)

export a model in Protocol Buffers format. Protocol Buffers (google/protobuf) is a language- and platform-neutral mechanism for serializing structured data. See src/tree.proto for format spec.

Parameters
filenamename of model file
modelmodel to export

Definition at line 336 of file protobuf.cc.

Model LoadLightGBMModel ( const char *  filename)

load a model file generated by LightGBM (Microsoft/LightGBM). The model file must contain a decision tree ensemble.

Parameters
filenamename of model file
Returns
loaded model

Definition at line 25 of file lightgbm.cc.

Model LoadProtobufModel ( const char *  filename)

load a model in Protocol Buffers format. Protocol Buffers (google/protobuf) is a language- and platform-neutral mechanism for serializing structured data. See tree.proto for format spec.

Parameters
filenamename of model file
Returns
loaded model

Definition at line 331 of file protobuf.cc.

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 27 of file xgboost.cc.

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 32 of file xgboost.cc.