xgboost
model.h
Go to the documentation of this file.
1 
6 #ifndef XGBOOST_MODEL_H_
7 #define XGBOOST_MODEL_H_
8 
9 namespace dmlc {
10 class Stream;
11 } // namespace dmlc
12 
13 namespace xgboost {
14 
15 class Json;
16 
17 struct Model {
18  virtual ~Model() = default;
23  virtual void LoadModel(Json const& in) = 0;
28  virtual void SaveModel(Json* out) const = 0;
29 };
30 
31 struct Configurable {
32  virtual ~Configurable() = default;
37  virtual void LoadConfig(Json const& in) = 0;
42  virtual void SaveConfig(Json* out) const = 0;
43 };
44 } // namespace xgboost
45 
46 #endif // XGBOOST_MODEL_H_
Data structure representing JSON format.
Definition: json.h:368
Definition: data.h:705
Core data structure for multi-target trees.
Definition: base.h:87
Definition: model.h:31
virtual void SaveConfig(Json *out) const =0
Save configuration to JSON object.
virtual ~Configurable()=default
virtual void LoadConfig(Json const &in)=0
Load configuration from JSON object.
Definition: model.h:17
virtual ~Model()=default
virtual void SaveModel(Json *out) const =0
saves the model config to a JSON object
virtual void LoadModel(Json const &in)=0
load the model from a JSON object