Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
aksnzhy committed Dec 19, 2017
1 parent dc08851 commit 40a97e6
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 1 deletion.
Binary file modified _build/doctrees/demo.doctree
Binary file not shown.
Binary file modified _build/doctrees/environment.pickle
Binary file not shown.
15 changes: 15 additions & 0 deletions _build/html/_sources/demo.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,21 @@ Housing dataset. (`Link`__)

You can find the data used in this demo in the path ``/demo/regression/house_price/``.

The follow code is the Python demo:

.. code-block:: python
import xlearn as xl
# Training task
ffm_model = xl.create_ffm()
ffm_model.setTrain("./house_price_train.txt")
param = {'task':'reg', 'lr':0.2,
'lambda':0.002, 'metric':'rmse'}
# Cross-validation
ffm_model.cv(param)
More Demo in xLearn is coming soon.

.. __: https://www.kaggle.com/c/criteo-display-ad-challenge
Expand Down
13 changes: 13 additions & 0 deletions _build/html/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,19 @@ <h2>House Price Prediction<a class="headerlink" href="#house-price-prediction" t
It’s an incredible alternative for data scientists looking for a modernized and expanded version of the often cited Boston
Housing dataset. (<a class="reference external" href="https://www.kaggle.com/c/house-prices-advanced-regression-techniques">Link</a>)</p>
<p>You can find the data used in this demo in the path <code class="docutils literal"><span class="pre">/demo/regression/house_price/</span></code>.</p>
<p>The follow code is the Python demo:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">xlearn</span> <span class="kn">as</span> <span class="nn">xl</span>

<span class="c1"># Training task</span>
<span class="n">ffm_model</span> <span class="o">=</span> <span class="n">xl</span><span class="o">.</span><span class="n">create_ffm</span><span class="p">()</span>
<span class="n">ffm_model</span><span class="o">.</span><span class="n">setTrain</span><span class="p">(</span><span class="s2">&quot;./house_price_train.txt&quot;</span><span class="p">)</span>
<span class="n">param</span> <span class="o">=</span> <span class="p">{</span><span class="s1">&#39;task&#39;</span><span class="p">:</span><span class="s1">&#39;reg&#39;</span><span class="p">,</span> <span class="s1">&#39;lr&#39;</span><span class="p">:</span><span class="mf">0.2</span><span class="p">,</span>
<span class="s1">&#39;lambda&#39;</span><span class="p">:</span><span class="mf">0.002</span><span class="p">,</span> <span class="s1">&#39;metric&#39;</span><span class="p">:</span><span class="s1">&#39;rmse&#39;</span><span class="p">}</span>

<span class="c1"># Cross-validation</span>
<span class="n">ffm_model</span><span class="o">.</span><span class="n">cv</span><span class="p">(</span><span class="n">param</span><span class="p">)</span>
</pre></div>
</div>
<p>More Demo in xLearn is coming soon.</p>
<blockquote>
<div><div class="toctree-wrapper compound">
Expand Down
2 changes: 1 addition & 1 deletion _build/html/searchindex.js

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions demo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,21 @@ Housing dataset. (`Link`__)

You can find the data used in this demo in the path ``/demo/regression/house_price/``.

The follow code is the Python demo:

.. code-block:: python
import xlearn as xl
# Training task
ffm_model = xl.create_ffm()
ffm_model.setTrain("./house_price_train.txt")
param = {'task':'reg', 'lr':0.2,
'lambda':0.002, 'metric':'rmse'}
# Cross-validation
ffm_model.cv(param)
More Demo in xLearn is coming soon.

.. __: https://www.kaggle.com/c/criteo-display-ad-challenge
Expand Down

0 comments on commit 40a97e6

Please sign in to comment.