From e06affea44d754e462faef60e04018d8567a5098 Mon Sep 17 00:00:00 2001 From: xialong Date: Fri, 19 May 2017 16:32:23 +0800 Subject: [PATCH] ADD:win_predict.bat for windows --- bin/win_predict.bat | 28 ++++++++++++++++++++++++++++ docs/data_format.md | 2 +- docs/evaluation_metrics.md | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 bin/win_predict.bat diff --git a/bin/win_predict.bat b/bin/win_predict.bat new file mode 100644 index 0000000..b41634c --- /dev/null +++ b/bin/win_predict.bat @@ -0,0 +1,28 @@ +echo on +@Rem model name(linear, fm, ffm, gbdt, gbmlr, gbsdt, gbhmlr, gbhsdt, multiclass_linear) +set model_name=??? + +set config_path=config/model/%model_name%.conf + +@Rem data file for predicting +set file_name=??? + +@Rem train/test line python transform switch & script +set transform="false" +set transform_script_path=bin/transform.py + +@Rem result save mode: PREDICT_RESULT_ONLY, LABEL_AND_PREDICT, PREDICT_AS_FEATURE +set resultSaveMode=PREDICT_RESULT_ONLY +set resultFileSuffix=_%model_name%_%resultSaveMode% + +@Rem max error data format tolerate number +set max_error_tol=100 + +set eval_metric="auc,mae" + +@Rem value or leafid +set predict_type=value + +@start /b cmd /c java -Xmx1000m -XX:-OmitStackTraceInFastThrow -cp lib/* -Dlog4j.configuration=file:config/log4j.properties com.fenbi.ytklearn.predictor.Predicts %config_path% %model_name% %file_name% %transform% %transform_script_path% %resultSaveMode% %resultFileSuffix% %max_error_tol% %eval_metric% %predict_type% + +pause \ No newline at end of file diff --git a/docs/data_format.md b/docs/data_format.md index 921806d..7c93aed 100644 --- a/docs/data_format.md +++ b/docs/data_format.md @@ -144,7 +144,7 @@ In default, ```bin/transform.py``` is not used, and you can set ```transform="tr ### **Data Format Transform Tool** ### -Ytklearn provides the script[libsvm_convert_2_ytklearn.sh](../bin/libsvm_convert_2_ytklearn.sh) to transform data format from libsvm to ytklearn. It will **generate a new dataset file** of ytklearn format and the weight of each sample is one. +Ytklearn provides the script[libsvm_convert_2_ytklearn.sh](../bin/libsvm_convert_2_ytklearn.sh) ([win_libsvm_convert_2_ytklearn.sh](../bin/win_libsvm_convert_2_ytklearn.sh) for windows) to transform data format from libsvm to ytklearn. It will **generate a new dataset file** of ytklearn format and the weight of each sample is one. | Task | Desc | Example | Original Format | Converted Format | | ---------------------------------------- | ---------------------------------------- | --------------------------- | ---------------------------------------- | ---------------------------------------- | diff --git a/docs/evaluation_metrics.md b/docs/evaluation_metrics.md index f6edd78..7004ee5 100644 --- a/docs/evaluation_metrics.md +++ b/docs/evaluation_metrics.md @@ -66,7 +66,7 @@ If you provide labels, you can set ``eval_metric`` to perform evaluations. Ytk- You can see the details in ``log/info.log``, including evaluations and a file path of prediction results. -The following script is [predict.sh](../bin/predict.sh). +The following script is [predict.sh](../bin/predict.sh) ([win_predict.sh](../bin/win_predict.sh) for windows). ```shell #!/usr/bin/env bash