Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
aksnzhy committed Oct 21, 2018
1 parent 81c3864 commit 6ac5065
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cli_api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,20 @@ For LR and FM, the input data format can be ``CSV`` or ``libsvm``. For FFM, the

label field_1:index_1:value_1 field_2:index_2:value_2 ...

xLearn can also use ``,`` as the splitor in file. For example: ::

libsvm format:

label,index_1:value_1,index_2:value_2 ... index_n:value_n

CSV format:

label,value_1,value_2 .. value_n

libffm format:

label,field_1:index_1:value_1,field_2:index_2:value_2 ...

Note that, if the csv file doesn't contain the label ``y``, the user should add a
``placeholder`` to the dataset by themselves (Also in test data). Otherwise, xLearn
will treat the first element as the label ``y``.
Expand Down
14 changes: 14 additions & 0 deletions python_api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,20 @@ be the ``libffm`` format: ::

label field_1:index_1:value_1 field_2:index_2:value_2 ...

xLearn can also use ``,`` as the splitor in file. For example: ::

libsvm format:

label,index_1:value_1,index_2:value_2 ... index_n:value_n

CSV format:

label,value_1,value_2 .. value_n

libffm format:

label,field_1:index_1:value_1,field_2:index_2:value_2 ...

Note that, if the csv file doesn’t contain the label ``y``, user should add a ``placeholder`` to the dataset
by themselves (Also in test data). Otherwise, xLearn will treat the first element as the label ``y``.

Expand Down

0 comments on commit 6ac5065

Please sign in to comment.