Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes
LightGBM::Config Struct Reference

Public Member Functions

std::string ToString () const
 
LIGHTGBM_EXPORT void Set (const std::unordered_map< std::string, std::string > &params)
 

Static Public Member Functions

static bool GetString (const std::unordered_map< std::string, std::string > &params, const std::string &name, std::string *out)
 Get string value by specific name of key.
 
static bool GetInt (const std::unordered_map< std::string, std::string > &params, const std::string &name, int *out)
 Get int value by specific name of key.
 
static bool GetDouble (const std::unordered_map< std::string, std::string > &params, const std::string &name, double *out)
 Get double value by specific name of key.
 
static bool GetBool (const std::unordered_map< std::string, std::string > &params, const std::string &name, bool *out)
 Get bool value by specific name of key.
 
static void KV2Map (std::unordered_map< std::string, std::string > &params, const char *kv)
 
static std::unordered_map< std::string, std::string > Str2Map (const char *parameters)
 

Data Fields

std::string config = ""
 
TaskType task = TaskType::kTrain
 
std::string objective = "regression"
 
std::string boosting = "gbdt"
 
std::string data = ""
 
std::vector< std::string > valid
 
int num_iterations = 100
 
double learning_rate = 0.1
 
int num_leaves = kDefaultNumLeaves
 
std::string tree_learner = "serial"
 
int num_threads = 0
 
std::string device_type = "cpu"
 
int seed = 0
 
int max_depth = -1
 
int min_data_in_leaf = 20
 
double min_sum_hessian_in_leaf = 1e-3
 
double bagging_fraction = 1.0
 
int bagging_freq = 0
 
int bagging_seed = 3
 
double feature_fraction = 1.0
 
int feature_fraction_seed = 2
 
int early_stopping_round = 0
 
double max_delta_step = 0.0
 
double lambda_l1 = 0.0
 
double lambda_l2 = 0.0
 
double min_gain_to_split = 0.0
 
double drop_rate = 0.1
 
int max_drop = 50
 
double skip_drop = 0.5
 
bool xgboost_dart_mode = false
 
bool uniform_drop = false
 
int drop_seed = 4
 
double top_rate = 0.2
 
double other_rate = 0.1
 
int min_data_per_group = 100
 
int max_cat_threshold = 32
 
double cat_l2 = 10.0
 
double cat_smooth = 10.0
 
int max_cat_to_onehot = 4
 
int top_k = 20
 
std::vector< int8_t > monotone_constraints
 
std::vector< double > feature_contri
 
std::string forcedsplits_filename = ""
 
double refit_decay_rate = 0.9
 
int verbosity = 1
 
int max_bin = 255
 
int min_data_in_bin = 3
 
int bin_construct_sample_cnt = 200000
 
double histogram_pool_size = -1.0
 
int data_random_seed = 1
 
std::string output_model = "LightGBM_model.txt"
 
int snapshot_freq = -1
 
std::string input_model = ""
 
std::string output_result = "LightGBM_predict_result.txt"
 
std::string initscore_filename = ""
 
std::vector< std::string > valid_data_initscores
 
bool pre_partition = false
 
bool enable_bundle = true
 
double max_conflict_rate = 0.0
 
bool is_enable_sparse = true
 
double sparse_threshold = 0.8
 
bool use_missing = true
 
bool zero_as_missing = false
 
bool two_round = false
 
bool save_binary = false
 
bool enable_load_from_binary_file = true
 
bool header = false
 
std::string label_column = ""
 
std::string weight_column = ""
 
std::string group_column = ""
 
std::string ignore_column = ""
 
std::string categorical_feature = ""
 
bool predict_raw_score = false
 
bool predict_leaf_index = false
 
bool predict_contrib = false
 
int num_iteration_predict = -1
 
bool pred_early_stop = false
 
int pred_early_stop_freq = 10
 
double pred_early_stop_margin = 10.0
 
std::string convert_model_language = ""
 
std::string convert_model = "gbdt_prediction.cpp"
 
int num_class = 1
 
bool is_unbalance = false
 
double scale_pos_weight = 1.0
 
double sigmoid = 1.0
 
bool boost_from_average = true
 
bool reg_sqrt = false
 
double alpha = 0.9
 
double fair_c = 1.0
 
double poisson_max_delta_step = 0.7
 
double tweedie_variance_power = 1.5
 
int max_position = 20
 
std::vector< double > label_gain
 
std::vector< std::string > metric
 
int metric_freq = 1
 
bool is_provide_training_metric = false
 
std::vector< int > eval_at
 
int num_machines = 1
 
int local_listen_port = 12400
 
int time_out = 120
 
std::string machine_list_filename = ""
 
std::string machines = ""
 
int gpu_platform_id = -1
 
int gpu_device_id = -1
 
bool gpu_use_dp = false
 
bool is_parallel = false
 
bool is_parallel_find_bin = false
 

Static Public Attributes

static std::unordered_map< std::string, std::string > alias_table
 
static std::unordered_set< std::string > parameter_set
 

Member Function Documentation

◆ GetBool()

bool LightGBM::Config::GetBool ( const std::unordered_map< std::string, std::string > &  params,
const std::string &  name,
bool *  out 
)
inlinestatic

Get bool value by specific name of key.

Parameters
paramsStore the key and value for params
nameName of key
outValue will assign to out if key exists
Returns
True if key exists

◆ GetDouble()

bool LightGBM::Config::GetDouble ( const std::unordered_map< std::string, std::string > &  params,
const std::string &  name,
double *  out 
)
inlinestatic

Get double value by specific name of key.

Parameters
paramsStore the key and value for params
nameName of key
outValue will assign to out if key exists
Returns
True if key exists

◆ GetInt()

bool LightGBM::Config::GetInt ( const std::unordered_map< std::string, std::string > &  params,
const std::string &  name,
int *  out 
)
inlinestatic

Get int value by specific name of key.

Parameters
paramsStore the key and value for params
nameName of key
outValue will assign to out if key exists
Returns
True if key exists

◆ GetString()

bool LightGBM::Config::GetString ( const std::unordered_map< std::string, std::string > &  params,
const std::string &  name,
std::string *  out 
)
inlinestatic

Get string value by specific name of key.

Parameters
paramsStore the key and value for params
nameName of key
outValue will assign to out if key exists
Returns
True if key exists

The documentation for this struct was generated from the following files: