diff --git a/doc/api_list.rst b/doc/api_list.rst index 97db5241..8ad597eb 100644 --- a/doc/api_list.rst +++ b/doc/api_list.rst @@ -35,6 +35,8 @@ Options: :: -m : Path of the model dump file. On default, the model file name is 'train_file' + '.model'. If we set this value to 'none', the xLearn will not dump the model checkpoint. + -pre : Path of the pre-trained model. This can be used for online learning. + -t : Path of the TEXT model checkpoint file. On default, we do not set this option and xLearn will not dump the TEXT model. diff --git a/doc/command_line.rst b/doc/command_line.rst index d3572b9b..fcb85c8b 100644 --- a/doc/command_line.rst +++ b/doc/command_line.rst @@ -132,6 +132,14 @@ FFM: :: v_3_2: 0.109711 0.102996 0.227222 0.248076 v_3_3: 0.144264 0.0409806 0.17463 0.083712 +Online Learning +---------------------------------------- +xLearn can supoort online learning, which can train new data based on the pre-trained model. User can use the ``-pre`` option to specify the file path of pre-trained model. For example: :: + + ./xlearn_train ./small_train.txt -s 0 -pre ./pre_model + +Note that, xLearn can only uses the binary model, not the TXT model. + Prediction Output ---------------------------------------- diff --git a/doc/news.md b/doc/news.md index 310a048a..78f6a175 100644 --- a/doc/news.md +++ b/doc/news.md @@ -1,9 +1,14 @@ ## What's New + - 2018-11-22 xLearn 0.4.0 version release. Main update: + + * Fix bugs in previous version + * Add online learning for xLearn + - 2018-11-10 xLearn 0.3.8 version release. Main update: - * Fix bugs in previous version. - * Update early-stop mechanism. + * Fix bugs in previous version. + * Update early-stop mechanism. - 2018-11-08. xLearn gets 2000 star! Congs! @@ -50,4 +55,4 @@ * New Documents * Faster FTRL algorithm - - 2017-11-24 The first version (0.1.0) of xLearn release ! + - 2017-11-24 The first version (0.1.0) of xLearn release ! \ No newline at end of file diff --git a/doc/python_package.rst b/doc/python_package.rst index eac6e33f..73029c8e 100644 --- a/doc/python_package.rst +++ b/doc/python_package.rst @@ -18,7 +18,7 @@ If you install xLearn Python package successfully, you will see: :: > <| |___| __/ (_| | | | | | | /_/\_\_____/\___|\__,_|_| |_| |_| - xLearn -- 0.38 Version -- + xLearn -- 0.40 Version -- ------------------------------------------------------------------------- Quick Start @@ -186,6 +186,22 @@ FFM: :: v_3_2: 0.109711 0.102996 0.227222 0.248076 v_3_3: 0.144264 0.0409806 0.17463 0.083712 +Online Learning +---------------------------------------- +xLearn can supoort online learning, which can train new data based on the pre-trained model. User can use the ``setPreModel`` API to specify the file path of pre-trained model. For example: :: + + import xlearn as xl + + ffm_model = xl.create_ffm() + ffm_model.setTrain("./small_train.txt") + ffm_model.setValidate("./small_test.txt") + ffm_model.setPreModel("./pre_model") + param = {'task':'binary', 'lr':0.2, 'lambda':0.002} + + ffm_model.fit(param, "./model.out") + +Note that, xLearn can only uses the binary model, not the TXT model. + Choose Machine Learning Algorithm ---------------------------------------- diff --git a/src/solver/checker.cc b/src/solver/checker.cc index 178e8443..034b8025 100644 --- a/src/solver/checker.cc +++ b/src/solver/checker.cc @@ -67,7 +67,6 @@ std::string Checker::option_help() const { not dump the model checkpoint after training. -pre : Path of the pre-trained model. This can be used for online learning. - (Under developing) -t : Path of the txt model checkpoint file. On default, this option is empty and xLearn will not dump the txt model.