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 b5585f8 commit 14c61a4
Show file tree
Hide file tree
Showing 10 changed files with 325 additions and 3 deletions.
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.
5 changes: 5 additions & 0 deletions _build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ source code and build it locally. We will update the xLearn source code on pip w

sudo pip install --index-url https://test.pypi.org/simple/ xlearnn

Now you can type the following code in python shell to check the installation:

>>> 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 from `Installation Guide`__.

Expand Down
96 changes: 96 additions & 0 deletions _build/html/_sources/install.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,104 @@ 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.


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. ::

sudo pip install --index-url https://test.pypi.org/simple/ xlearnn

Now you can type the following code in python shell to check the installation:

>>> 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.


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.

Build C++ code
>>>>>>>>>>>>>>>>

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

.. toctree::
:maxdepth: 1
14 changes: 13 additions & 1 deletion _build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ <h2>Quick Install<a class="headerlink" href="#quick-install" title="Permalink to
<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="o">--</span><span class="n">index</span><span class="o">-</span><span class="n">url</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">test</span><span class="o">.</span><span class="n">pypi</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">simple</span><span class="o">/</span> <span class="n">xlearnn</span>
</pre></div>
</div>
<p>Now you can type the following code in python shell to check the installation:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">xlearn</span> <span class="k">as</span> <span class="nn">xl</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">xl</span><span class="o">.</span><span class="n">hello</span><span class="p">()</span>
</pre></div>
</div>
<p>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 from <a class="reference external" href="tutorial.html">Installation Guide</a>.</p>
</div>
Expand Down Expand Up @@ -226,7 +231,14 @@ <h2>Other Helpful Resources<a class="headerlink" href="#other-helpful-resources"
<div><div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation Guide</a><ul>
<li class="toctree-l2"><a class="reference internal" href="install.html#install-gcc-or-clang">Install GCC or Clang</a><ul class="simple">
<li class="toctree-l2"><a class="reference internal" href="install.html#install-gcc-or-clang">Install GCC or Clang</a></li>
<li class="toctree-l2"><a class="reference internal" href="install.html#install-cmake">Install CMake</a></li>
<li class="toctree-l2"><a class="reference internal" href="install.html#install-xlearn-from-pip">Install xLearn from pip</a></li>
<li class="toctree-l2"><a class="reference internal" href="install.html#install-xlearn-from-source-code">Install xLearn from source code</a><ul>
<li class="toctree-l3"><a class="reference internal" href="install.html#build-c-code">Build C++ code</a></li>
<li class="toctree-l3"><a class="reference internal" href="install.html#install-python-package">Install python package</a><ul class="simple">
</ul>
</li>
</ul>
</li>
</ul>
Expand Down
110 changes: 109 additions & 1 deletion _build/html/install.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,14 @@

<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Installation Guide</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#install-gcc-or-clang">Install GCC or Clang</a><ul class="simple">
<li class="toctree-l2"><a class="reference internal" href="#install-gcc-or-clang">Install GCC or Clang</a></li>
<li class="toctree-l2"><a class="reference internal" href="#install-cmake">Install CMake</a></li>
<li class="toctree-l2"><a class="reference internal" href="#install-xlearn-from-pip">Install xLearn from pip</a></li>
<li class="toctree-l2"><a class="reference internal" href="#install-xlearn-from-source-code">Install xLearn from source code</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#build-c-code">Build C++ code</a></li>
<li class="toctree-l3"><a class="reference internal" href="#install-python-package">Install python package</a><ul class="simple">
</ul>
</li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -173,9 +180,110 @@ <h1>Installation Guide<a class="headerlink" href="#installation-guide" title="Pe
<div class="section" id="install-gcc-or-clang">
<h2>Install GCC or Clang<a class="headerlink" href="#install-gcc-or-clang" title="Permalink to this headline"></a></h2>
<p>If you have already installed your compiler before, you can skip this step.</p>
<ul>
<li><p class="first">On Cygwin, run setup.exe and install gcc and binutils.</p>
</li>
<li><p class="first">On Debian/Ubuntu Linux, type the command</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">gcc</span> <span class="n">binutils</span>
</pre></div>
</div>
<p>to install GCC, or install Clang by using</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">clang</span>
</pre></div>
</div>
</li>
<li><p class="first">On FreeBSD, type the following command to install Clang</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">pkg_add</span> <span class="o">-</span><span class="n">r</span> <span class="n">clang</span>
</pre></div>
</div>
</li>
<li><p class="first">On Mac OS X, install XCode gets you Clang.</p>
</li>
</ul>
</div>
<div class="section" id="install-cmake">
<h2>Install CMake<a class="headerlink" href="#install-cmake" title="Permalink to this headline"></a></h2>
<p>If you have already installed CMake before, you can skip this step.</p>
<p>To install CMake from binary packages:</p>
<ul>
<li><p class="first">On Cygwin, run setup.exe and install cmake.</p>
</li>
<li><p class="first">On Debian/Ubuntu Linux, type the command to install cmake</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">cmake</span>
</pre></div>
</div>
</li>
<li><p class="first">On FreeBSD, type the command</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">pkg_add</span> <span class="o">-</span><span class="n">r</span> <span class="n">cmake</span>
</pre></div>
</div>
</li>
</ul>
<p>On Mac OS X, if you have homebrew, you can use the command</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">brew</span> <span class="n">install</span> <span class="n">cmake</span>
</pre></div>
</div>
<p>or if you have MacPorts, run</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">port</span> <span class="n">install</span> <span class="n">cmake</span>
</pre></div>
</div>
<p>You won’t want to have both Homebrew and !MacPorts installed.</p>
</div>
<div class="section" id="install-xlearn-from-pip">
<h2>Install xLearn from pip<a class="headerlink" href="#install-xlearn-from-pip" title="Permalink to this headline"></a></h2>
<p>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.</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="o">--</span><span class="n">index</span><span class="o">-</span><span class="n">url</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">test</span><span class="o">.</span><span class="n">pypi</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">simple</span><span class="o">/</span> <span class="n">xlearnn</span>
</pre></div>
</div>
<p>Now you can type the following code in python shell to check the installation:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">xlearn</span> <span class="k">as</span> <span class="nn">xl</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">xl</span><span class="o">.</span><span class="n">hello</span><span class="p">()</span>
</pre></div>
</div>
<p>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.</p>
</div>
<div class="section" id="install-xlearn-from-source-code">
<h2>Install xLearn from source code<a class="headerlink" href="#install-xlearn-from-source-code" title="Permalink to this headline"></a></h2>
<p>Building xLearn from source code consists tow steps:</p>
<ul class="simple">
<li>First, build the executable files (<strong>xlearn_train</strong> and <strong>xlearn_predict</strong>) and shared library (<strong>libxlearn.so</strong> for Linux and <strong>libxlearn.dylib</strong> for Mac OSX) from the C++ codes.</li>
<li>Then, install the python package.</li>
</ul>
<div class="section" id="build-c-code">
<h3>Build C++ code<a class="headerlink" href="#build-c-code" title="Permalink to this headline"></a></h3>
<p>First you need is to clone the code from github</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">aksnzhy</span><span class="o">/</span><span class="n">xlearn</span><span class="o">.</span><span class="n">git</span>
</pre></div>
</div>
<p>and then build xLearn using the folloing commands</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">xlearn</span><span class="p">;</span> <span class="n">mkdir</span> <span class="n">build</span><span class="p">;</span> <span class="n">cd</span> <span class="n">build</span>
<span class="n">cmake</span> <span class="o">..</span>
<span class="n">make</span>
</pre></div>
</div>
<p>Now you can check your building by using xlearn command line</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">xlearn_train</span> <span class="o">./</span><span class="n">small_train</span><span class="o">.</span><span class="n">txt</span> <span class="o">-</span><span class="n">v</span> <span class="o">./</span><span class="n">small_test</span><span class="o">.</span><span class="n">txt</span> <span class="o">-</span><span class="n">s</span> <span class="mi">2</span>
<span class="o">./</span><span class="n">xlearn_predict</span> <span class="o">./</span><span class="n">small_test</span><span class="o">.</span><span class="n">txt</span> <span class="o">./</span><span class="n">small_train</span><span class="o">.</span><span class="n">txt</span><span class="o">.</span><span class="n">model</span>
</pre></div>
</div>
</div>
<div class="section" id="install-python-package">
<h3>Install python package<a class="headerlink" href="#install-python-package" title="Permalink to this headline"></a></h3>
<p>Users can use the install-python.sh script to install python package</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">python</span><span class="o">-</span><span class="n">package</span>
<span class="o">./</span><span class="n">install</span><span class="o">-</span><span class="n">python</span><span class="o">.</span><span class="n">sh</span>
</pre></div>
</div>
<p>The users can make a test</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">test_python</span><span class="o">.</span><span class="n">py</span>
</pre></div>
</div>
<div class="toctree-wrapper compound">
</div>
</div>
</div>
</div>


Expand Down
2 changes: 1 addition & 1 deletion _build/html/searchindex.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ source code and build it locally. We will update the xLearn source code on pip w

sudo pip install --index-url https://test.pypi.org/simple/ xlearnn

Now you can type the following code in python shell to check the installation:

>>> 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 from `Installation Guide`__.

Expand Down

0 comments on commit 14c61a4

Please sign in to comment.