Skip to content

Commit

Permalink
ADD:win_predict.bat for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
scharoun committed May 19, 2017
1 parent fbe2bcc commit e06affe
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
28 changes: 28 additions & 0 deletions bin/win_predict.bat
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion docs/data_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
| ---------------------------------------- | ---------------------------------------- | --------------------------- | ---------------------------------------- | ---------------------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion docs/evaluation_metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e06affe

Please sign in to comment.