Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
aksnzhy committed Dec 6, 2017
1 parent 7523852 commit 4a51192
Show file tree
Hide file tree
Showing 28 changed files with 494 additions and 264 deletions.
Binary file modified _build/doctrees/command_line.doctree
Binary file not shown.
Binary file modified _build/doctrees/demo.doctree
Binary file not shown.
Binary file modified _build/doctrees/environment.pickle
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/install_cmake.doctree
Binary file not shown.
Binary file modified _build/doctrees/python_api.doctree
Binary file not shown.
Binary file modified _build/doctrees/tutorial.doctree
Binary file not shown.
4 changes: 2 additions & 2 deletions _build/html/_sources/demo.rst.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
xLearn Demo
^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 1
.. toctree::
:hidden:
4 changes: 2 additions & 2 deletions _build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Link to the Other Helpful Resources
Quick Install
----------------------------------

The easiest way to install xLearn is to use pip. The following command will download the xLearn
source code and build it locally. We will update the xLearn source code on pip weekly. ::
The easiest way to install xLearn is to use ``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 xlearn

Expand Down
105 changes: 29 additions & 76 deletions _build/html/_sources/install.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,113 +4,66 @@ Installation Guide
For now, xLearn can support Linux and Mac OSX. We will support it on Windows in
the near future. This page gives instructions on how to build and install the xLearn
package using pip, or from source code. Whatever way you choose, make sure that your
OS has already installed GCC (or Clang) and CMake, and your compiler need to support
C++11.
OS has already installed ``GCC`` (or ``Clang``) and ``CMake``, and your compiler need
to support ``C++11``. If you have not installed them, please see `this page`__ on how to
install GCC and CMake.

Install xLearn from pip
---------------------------

The easiest way to 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. ::
The easiest way to install xLearn is to use ``pip``. The following command will download the xLearn
source code from pip 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
sudo pip install xlearn

Now you can type the following code in python shell to check the installation:
The installation process will take a while. And then you can type the following script in python
shell to check whether the xLearn has been installed successfully:

>>> import xlearn as xl
>>> xl.hello()

If you want to build the lastest code on github, or you want to use the xLearn command line,
you can see how to build xLearn from source code as follow.
If you want to build the lastest code from github, or you want to use the xLearn command line
instead of the python API, you can see how to build xLearn from source code as follow.


Install xLearn from source code
----------------------------------

Building xLearn from source code consists tow steps:

* First, build the executable files (**xlearn_train** and **xlearn_predict**) and shared library (**libxlearn.so** for Linux and **libxlearn.dylib** for Mac OSX) from the C++ codes.
* Then, install the python package.
1. First, build the executable files (``learn_train`` and ``xlearn_predict``) and shared library (``libxlearn.so``
for Linux and ``libxlearn.dylib`` for Mac OSX) from the C++ code.

Build C++ code
>>>>>>>>>>>>>>>>
2. Then, install the python package.

Fortunately, we write a script ``build.sh`` to do all the things for users.

First you need is to clone the code from github ::

git clone https://github.com/aksnzhy/xlearn.git

and then build xLearn using the folloing commands ::

cd xlearn; mkdir build
cd build
cmake ..
make

Now you can check your building by using xlearn command line ::

./xlearn_train ./small_train.txt -v ./small_test.txt -s 2
./xlearn_predict ./small_test.txt ./small_train.txt.model


Install python package
>>>>>>>>>>>>>>>>>>>>>>>>>>

Users can use the install-python.sh script to install python package ::

cd python-package
./install-python.sh

The users can make a test ::

python test_python.py


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

If you have already installed your compiler before, you can skip this step.
cd xlearn
./build.sh

* On Cygwin, run setup.exe and install gcc and binutils.
* On Debian/Ubuntu Linux, type the command ::

sudo apt-get install gcc binutils

to install GCC, or install Clang by using ::

sudo apt-get install clang

* On FreeBSD, type the following command to install Clang ::

sudo pkg_add -r clang

* On Mac OS X, install XCode gets you Clang.


Install CMake
---------------------------

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

To install CMake from binary packages:

* On Cygwin, run setup.exe and install cmake.
* On Debian/Ubuntu Linux, type the command to install cmake ::
Test
----------------------------------

sudo apt-get install cmake
Now you can check your building by using xlearn command line ::

* On FreeBSD, type the command ::
sudo pkg_add -r cmake
cd build
./run_example.sh

On Mac OS X, if you have homebrew, you can use the command ::

brew install cmake
You can also test the python package by using ::

or if you have MacPorts, run ::
cd python-package/test
python test_python.py

sudo port install cmake
.. __: install_cmake.html

You won't want to have both Homebrew and !MacPorts installed.
.. toctree::
:hidden:

.. toctree::
:maxdepth: 1
install_cmake.rst
49 changes: 49 additions & 0 deletions _build/html/_sources/install_cmake.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Install GCC or Clang
---------------------------

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

* On Cygwin, run setup.exe and install gcc and binutils.
* On Debian/Ubuntu Linux, type the command ::

sudo apt-get install gcc binutils

to install GCC, or install Clang by using ::

sudo apt-get install clang

* On FreeBSD, type the following command to install Clang ::

sudo pkg_add -r clang

* On Mac OS X, install XCode gets you Clang.


Install CMake
---------------------------

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

To install CMake from binary packages:

* On Cygwin, run setup.exe and install cmake.
* On Debian/Ubuntu Linux, type the command to install cmake ::

sudo apt-get install cmake

* On FreeBSD, type the command ::
sudo pkg_add -r cmake

On Mac OS X, if you have homebrew, you can use the command ::

brew install cmake

or if you have MacPorts, run ::

sudo port install cmake

You won't want to have both Homebrew and !MacPorts installed.

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

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

.. toctree::
:maxdepth: 1
.. toctree::
:hidden:
4 changes: 3 additions & 1 deletion _build/html/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,10 @@

<div class="section" id="xlearn-demo">
<h1>xLearn Demo<a class="headerlink" href="#xlearn-demo" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<blockquote>
<div><div class="toctree-wrapper compound">
</div>
</div></blockquote>
</div>


Expand Down
4 changes: 2 additions & 2 deletions _build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ <h2>Link to the Other Helpful Resources<a class="headerlink" href="#link-to-the-
</div>
<div class="section" id="quick-install">
<h2>Quick Install<a class="headerlink" href="#quick-install" title="Permalink to this headline"></a></h2>
<p>The easiest way to install xLearn is to use pip. The following command will download the xLearn
source code and build it locally. We will update the xLearn source code on pip weekly.</p>
<p>The easiest way to install xLearn is to use <code class="docutils literal"><span class="pre">pip</span></code>. The following command will download the
xLearn source code and build it locally. We will update the xLearn source code on pip weekly.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">xlearn</span>
</pre></div>
</div>
Expand Down

0 comments on commit 4a51192

Please sign in to comment.