Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
92840c5c
Commit
92840c5c
authored
May 08, 2018
by
Guolin Ke
Browse files
use double type for parameters.
parent
21487d8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
include/LightGBM/config.h
include/LightGBM/config.h
+23
-23
No files found.
include/LightGBM/config.h
View file @
92840c5c
...
...
@@ -124,7 +124,7 @@ public:
bool
is_predict_raw_score
=
false
;
int
min_data_in_leaf
=
20
;
int
min_data_in_bin
=
3
;
double
max_conflict_rate
=
0.0
f
;
double
max_conflict_rate
=
0.0
;
bool
enable_bundle
=
true
;
bool
has_header
=
false
;
std
::
vector
<
int8_t
>
monotone_constraints
;
...
...
@@ -154,7 +154,7 @@ public:
/*! \brief Frequency of checking the pred_early_stop */
int
pred_early_stop_freq
=
10
;
/*! \brief Threshold of margin of pred_early_stop */
double
pred_early_stop_margin
=
10.0
f
;
double
pred_early_stop_margin
=
10.0
;
bool
zero_as_missing
=
false
;
bool
use_missing
=
true
;
LIGHTGBM_EXPORT
void
Set
(
const
std
::
unordered_map
<
std
::
string
,
std
::
string
>&
params
)
override
;
...
...
@@ -164,9 +164,9 @@ public:
struct
ObjectiveConfig
:
public
ConfigBase
{
public:
virtual
~
ObjectiveConfig
()
{}
double
sigmoid
=
1.0
f
;
double
fair_c
=
1.0
f
;
double
poisson_max_delta_step
=
0.7
f
;
double
sigmoid
=
1.0
;
double
fair_c
=
1.0
;
double
poisson_max_delta_step
=
0.7
;
// for lambdarank
std
::
vector
<
double
>
label_gain
;
// for lambdarank
...
...
@@ -176,11 +176,11 @@ public:
// for multiclass
int
num_class
=
1
;
// Balancing of positive and negative weights
double
scale_pos_weight
=
1.0
f
;
double
scale_pos_weight
=
1.0
;
// True will sqrt fit the sqrt(label)
bool
reg_sqrt
=
false
;
double
alpha
=
0.9
f
;
double
tweedie_variance_power
=
1.5
f
;
double
alpha
=
0.9
;
double
tweedie_variance_power
=
1.5
;
LIGHTGBM_EXPORT
void
Set
(
const
std
::
unordered_map
<
std
::
string
,
std
::
string
>&
params
)
override
;
};
...
...
@@ -189,10 +189,10 @@ struct MetricConfig: public ConfigBase {
public:
virtual
~
MetricConfig
()
{}
int
num_class
=
1
;
double
sigmoid
=
1.0
f
;
double
fair_c
=
1.0
f
;
double
alpha
=
0.9
f
;
double
tweedie_variance_power
=
1.5
f
;
double
sigmoid
=
1.0
;
double
fair_c
=
1.0
;
double
alpha
=
0.9
;
double
tweedie_variance_power
=
1.5
;
std
::
vector
<
double
>
label_gain
;
std
::
vector
<
int
>
eval_at
;
LIGHTGBM_EXPORT
void
Set
(
const
std
::
unordered_map
<
std
::
string
,
std
::
string
>&
params
)
override
;
...
...
@@ -203,17 +203,17 @@ public:
struct
TreeConfig
:
public
ConfigBase
{
public:
int
min_data_in_leaf
=
20
;
double
min_sum_hessian_in_leaf
=
1e-3
f
;
double
max_delta_step
=
0.0
f
;
double
lambda_l1
=
0.0
f
;
double
lambda_l2
=
0.0
f
;
double
min_gain_to_split
=
0.0
f
;
double
min_sum_hessian_in_leaf
=
1e-3
;
double
max_delta_step
=
0.0
;
double
lambda_l1
=
0.0
;
double
lambda_l2
=
0.0
;
double
min_gain_to_split
=
0.0
;
// should > 1
int
num_leaves
=
kDefaultNumLeaves
;
int
feature_fraction_seed
=
2
;
double
feature_fraction
=
1.0
f
;
double
feature_fraction
=
1.0
;
// max cache size(unit:MB) for historical histogram. < 0 means no limit
double
histogram_pool_size
=
-
1.0
f
;
double
histogram_pool_size
=
-
1.0
;
// max depth of tree model.
// Still grow tree by leaf-wise, but limit the max depth to avoid over-fitting
// And the max leaves will be min(num_leaves, pow(2, max_depth))
...
...
@@ -245,8 +245,8 @@ public:
int
output_freq
=
1
;
bool
is_provide_training_metric
=
false
;
int
num_iterations
=
100
;
double
learning_rate
=
0.1
f
;
double
bagging_fraction
=
1.0
f
;
double
learning_rate
=
0.1
;
double
bagging_fraction
=
1.0
;
int
bagging_seed
=
3
;
int
bagging_freq
=
0
;
int
early_stopping_round
=
0
;
...
...
@@ -257,8 +257,8 @@ public:
bool
xgboost_dart_mode
=
false
;
bool
uniform_drop
=
false
;
int
drop_seed
=
4
;
double
top_rate
=
0.2
f
;
double
other_rate
=
0.1
f
;
double
top_rate
=
0.2
;
double
other_rate
=
0.1
;
// only used for the regression. Will boost from the average labels.
bool
boost_from_average
=
true
;
std
::
string
tree_learner_type
=
kDefaultTreeLearnerType
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment