revise the script
This commit is contained in:
parent
ceabf5755f
commit
525c1594e5
@ -11,19 +11,15 @@ hadoop fs -mkdir $2/data
|
|||||||
hadoop fs -put ../../demo/data/agaricus.txt.train $2/data
|
hadoop fs -put ../../demo/data/agaricus.txt.train $2/data
|
||||||
|
|
||||||
# training and output the final model file
|
# training and output the final model file
|
||||||
../../rabit/tracker/rabit_hadoop.py -n $1 -i $2/data/agaricus.txt.train \
|
../../rabit/tracker/rabit_hadoop.py -n $1 -i $2/data/agaricus.txt.train -o $2/mushroom.final.model ../../xgboost mushroom.hadoop.conf
|
||||||
-o $2/model -f ../../demo/data/agaricus.txt.test \
|
|
||||||
../../xgboost mushroom.hadoop.conf dsplit=row
|
|
||||||
|
|
||||||
# get the final model file
|
# get the final model file
|
||||||
hadoop fs -get $2/model/part-00000 ./final.model
|
hadoop fs -get $2/mushroom.final.model/part-00000 ./mushroom.final.model
|
||||||
|
|
||||||
# output prediction task=pred
|
# output prediction task=pred of test:data
|
||||||
../../xgboost mushroom.hadoop.conf task=pred model_in=final.model \
|
../../xgboost mushroom.hadoop.conf task=pred model_in=mushroom.final.model test:data=../../demo/data/agaricus.txt.test
|
||||||
test:data=../../demo/data/agaricus.txt.test
|
|
||||||
# print the boosters of final.model in dump.raw.txt
|
# print the boosters of final.model in dump.raw.txt
|
||||||
../../xgboost mushroom.hadoop.conf task=dump model_in=final.model name_dump=dump.raw.txt
|
../../xgboost mushroom.hadoop.conf task=dump model_in=mushroom.final.model name_dump=dump.raw.txt
|
||||||
# use the feature map in printing for better visualization
|
# use the feature map in printing for better visualization
|
||||||
../../xgboost mushroom.hadoop.conf task=dump model_in=final.model \
|
../../xgboost mushroom.hadoop.conf task=dump model_in=mushroom.final.model fmap=../../demo/data/featmap.txt name_dump=dump.nice.txt
|
||||||
fmap=../../demo/data/featmap.txt name_dump=dump.nice.txt
|
|
||||||
cat dump.nice.txt
|
cat dump.nice.txt
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user