Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
aksnzhy committed Dec 4, 2017
1 parent 1462513 commit b5585f8
Show file tree
Hide file tree
Showing 34 changed files with 1,055 additions and 793 deletions.
Binary file added _build/doctrees/command_line.doctree
Binary file not shown.
Binary file added _build/doctrees/demo.doctree
Binary file not shown.
Binary file modified _build/doctrees/environment.pickle
Binary file not shown.
Binary file removed _build/doctrees/getstarted.doctree
Binary file not shown.
Binary file modified _build/doctrees/index.doctree
Binary file not shown.
Binary file modified _build/doctrees/install.doctree
Binary file not shown.
Binary file added _build/doctrees/python_api.doctree
Binary file not shown.
Binary file added _build/doctrees/tutorial.doctree
Binary file not shown.
5 changes: 5 additions & 0 deletions _build/html/_sources/command_line.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
xLearn Command Line Guide
^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 1
5 changes: 5 additions & 0 deletions _build/html/_sources/demo.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
xLearn Demo
^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 1
1 change: 0 additions & 1 deletion _build/html/_sources/getstarted.rst.txt

This file was deleted.

70 changes: 48 additions & 22 deletions _build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ your another better choice.
This is a quick start tutorial showing snippets for you to quickly try out xLearn on the demo
dataset on a binary classfication task.

Link to Helpful Other Resources
----------------------------------
Link to the Other Helpful Resources
----------------------------------------

* See `Installation Guide`__ on how to install xLearn.
* See `Command Line Guide`__ on how to use xLearn command line.
* See `Python API Guide`__ on how to use xLearn Python API.
* See `Demo Page`__ Learning to use xLearn by Examples
* See `Tutorials`__ on tutorial on specific tasks.
* See `Tutorial`__ on tutorials on specific tasks.

Quick Install
----------------------------------

We can install xLearn by using pip. The follow command will download the xLearn
We can install xLearn by using pip. The following command will download the xLearn
source code and build it locally. We will update the xLearn source code on pip weekly. ::

sudo pip install --index-url https://test.pypi.org/simple/ xlearnn
Expand All @@ -38,26 +38,52 @@ you can see how to build xLearn from source code from `Installation Guide`__.
Python Demo
----------------------------------

Here is a simple python demo no how to use xLearn. Now type **python** and get started!
Here is a simple python demo no how to use xLearn. Now type **python** and get started !

.. code-block:: python
import xlearn as xl
>>> import xlearn as xl
>>> ffm_model = xl.create_ffm() # create ffm model
>>> ffm_model.setTrain("./small_train.txt") # set training data
>>> ffm_model.setValidate("./small_test.txt") # Validation data
>>> param = { 'task':'binary', 'lr':0.2, 'lambda':0.002, 'metric':'auc'} # set parameters
>>> ffm_model.fit(param, "./model.out") # train model
>>> ffm_model.setTest("./small_test.txt") # set test data
>>> ffm_model.predict("./model.out", "./output.txt") # predict
# create ffm model
ffm_model = xl.create_ffm()
# Set training data
ffm_model.setTrain("./small_train.txt")
# Set validation data
ffm_model.setValidate("./small_test.txt")
# set some hyper-parameters
param = { 'task':'binary',
'lr':0.2,
'lambda':0.002,
'metric':'auc'}
# Train model
ffm_model.fit(param, "./model.out")
# Set test data
ffm_model.setTest("./small_test.txt")
# Convert output result to 0~1
ffm_model.setSigmoid()
# Predict
ffm_model.predict("./model.out", "./output.txt")
This example shows how to use xlearn to solve a simple binary classification task.
You can find the demo data **small_train.txt** and **small_test.txt** from the **demo/classification/criteo_ctr/**
You can find the demo data **small_train.txt** and **small_test.txt** from
the **demo/classification/criteo_ctr/** directory.

Other Helpful Resources
--------------------------------------------

.. __: install.html
.. __: install.html
.. __: command_line.html
.. __: python_api.html
.. __: demo.html
.. __: tutorial.html

.. __: install
.. __: commandline
.. __: pythonapi
.. __: demo
.. __: tutorial
.. __: install
.. toctree::
:maxdepth: 0

.. toctree::
:maxdepth: 2
install.rst
command_line.rst
python_api.rst
demo.rst
tutorial.rst
19 changes: 18 additions & 1 deletion _build/html/_sources/install.rst.txt
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
install!
Installation Guide
^^^^^^^^^^^^^^^^^^^^^^^^^^^

For now, xLearn can support Linux and Mac OSX. We will support Windows in the future.
This page gives instructions on how to build and install the xLearn package from
source code or using pip. Whatever way you choose, make sure that your OS has already
installed GCC (or Clang) and CMake.

Install GCC or Clang
---------------------------

If you have already installed your compiler before, you can skip this step.




.. toctree::
:maxdepth: 1
5 changes: 5 additions & 0 deletions _build/html/_sources/python_api.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
xLearn Python API Guide
^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 1
5 changes: 5 additions & 0 deletions _build/html/_sources/tutorial.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
xLearn Tutorials
^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 1

0 comments on commit b5585f8

Please sign in to comment.