Skip to content

Commit 1440dc9

Browse files
committed
update regression
1 parent 27bd549 commit 1440dc9

File tree

8 files changed

+60
-182
lines changed

8 files changed

+60
-182
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ xgboost: eXtreme Gradient Boosting
22
=======
33
A General purpose gradient boosting (tree) library.
44

5-
Creater: Tianqi Chen
5+
Authors:
6+
* Tianqi Chen, project creater
7+
* Kailong Chen, contributes regression module
68

79
Turorial and Documentation: https://github.com/tqchen/xgboost/wiki
810

9-
1011
Features
1112
=======
1213
* Sparse feature format:
@@ -37,4 +38,3 @@ File extension convention
3738
* .h are interface, utils and data structures, with detailed comment;
3839
* .cpp are implementations that will be compiled, with less comment;
3940
* .hpp are implementations that will be included by .cpp, with less comment
40-

demo/binary_classification/dump2json.py

-80
This file was deleted.
+24-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
1-
# General Parameters
2-
booster_type = 0
3-
loss_type = 2
1+
# General Parameters, see comment for each definition
2+
# choose the tree booster, 0: tree, 1: linear
3+
booster_type = 0
4+
# choose logistic regression loss function for binary classification
5+
loss_type = 2
46

57
# Tree Booster Parameters
6-
bst:tree_maker=2
7-
bst:eta=1.0
8-
bst:gamma=1.0
9-
bst:min_child_weight=1
10-
bst:max_depth=3
8+
# step size shrinkage
9+
bst:eta = 1.0
10+
# minimum loss reduction required to make a further partition
11+
bst:gamma = 1.0
12+
# minimum sum of instance weight(hessian) needed in a child
13+
bst:min_child_weight = 1
14+
# maximum depth of a tree
15+
bst:max_depth = 3
1116

12-
# Binary Classification Parameters
13-
num_round=2
14-
save_period=0
15-
data = "agaricus.txt.train"
16-
eval[test] = "agaricus.txt.test"
17-
test:data = "agaricus.txt.test"
17+
# Task Parameters
18+
# the number of round to do boosting
19+
num_round = 2
20+
# 0 means do not save any model except the final round model
21+
save_period = 0
22+
# The path of training data
23+
data = "agaricus.txt.train"
24+
# The path of validation data, used to monitor training process, here [test] sets name of the validation set
25+
eval[test] = "agaricus.txt.test"
26+
# The path of test data
27+
test:data = "agaricus.txt.test"

demo/regression/dump2json.py

-80
This file was deleted.

demo/regression/machine.conf

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# General Parameters, see comment for each definition
2+
# choose the tree booster, 0: tree, 1: linear
3+
booster_type = 0
4+
# this is the only difference with classification, use 0: linear regression
5+
# when labels are in [0,1] we can also use 1: logistic regression
6+
loss_type = 0
7+
8+
# Tree Booster Parameters
9+
# step size shrinkage
10+
bst:eta = 1.0
11+
# minimum loss reduction required to make a further partition
12+
bst:gamma = 1.0
13+
# minimum sum of instance weight(hessian) needed in a child
14+
bst:min_child_weight = 1
15+
# maximum depth of a tree
16+
bst:max_depth = 3
17+
18+
# Task parameters
19+
# the number of round to do boosting
20+
num_round = 2
21+
# 0 means do not save any model except the final round model
22+
save_period = 0
23+
# The path of training data
24+
data = "machine.txt.train"
25+
# The path of validation data, used to monitor training process, here [test] sets name of the validation set
26+
eval[test] = "machine.txt.test"
27+
# The path of test data
28+
test:data = "machine.txt.test"
29+
30+

demo/regression/mapfeat.py

100644100755
-2
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,3 @@
1919
fo.write('\n')
2020

2121
fo.close()
22-
23-

demo/regression/mknfold.py

100644100755
File mode changed.

demo/regression/runexp.sh

100644100755
+3-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ python mknfold.py machine.txt 1
66
# training and output the models
77
../../xgboost machine.conf
88
# output predictions of test data
9-
../../xgboost machine.conf task=pred model_in=0003.model
10-
# print the boosters of 00003.model in dump.raw.txt
11-
../../xgboost machine.conf task=dump model_in=0003.model name_dump=dump.raw.txt
9+
../../xgboost machine.conf task=pred model_in=0002.model
10+
# print the boosters of 00002.model in dump.raw.txt
11+
../../xgboost machine.conf task=dump model_in=0002.model name_dump=dump.raw.txt

0 commit comments

Comments
 (0)