Treelite
Enumerations | Functions
lightgbm.cc File Reference

Frontend for LightGBM model. More...

#include <treelite/logging.h>
#include <treelite/frontend.h>
#include <treelite/tree.h>
#include <unordered_map>
#include <limits>
#include <queue>
#include <string>
#include <fstream>
#include <sstream>
Include dependency graph for lightgbm.cc:

Go to the source code of this file.

Enumerations

enum  Masks : uint8_t
 
enum  MissingType : uint8_t
 

Functions

std::unique_ptr< treelite::ModelLoadLightGBMModel (const char *filename)
 load a model file generated by LightGBM (Microsoft/LightGBM). The model file must contain a decision tree ensemble. More...
 
std::unique_ptr< treelite::ModelLoadLightGBMModelFromString (const char *model_str)
 Load a LightGBM model from a string. The string should be created with the model_to_string() method in LightGBM. More...
 

Detailed Description

Frontend for LightGBM model.

Copyright (c) 2017-2021 by Contributors

Author
Hyunsu Cho

Definition in file lightgbm.cc.

Function Documentation

◆ LoadLightGBMModel()

std::unique_ptr< treelite::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 28 of file lightgbm.cc.

◆ LoadLightGBMModelFromString()

std::unique_ptr< treelite::Model > LoadLightGBMModelFromString ( const char *  model_str)

Load a LightGBM model from a string. The string should be created with the model_to_string() method in LightGBM.

Parameters
model_strthe model string
Returns
loaded model

Definition at line 33 of file lightgbm.cc.