---

title: Yoochoose


keywords: fastai
sidebar: home_sidebar

summary: "Yoochoose dataset."
description: "Yoochoose dataset."
nb_path: "nbs/datasets/yoochoose.ipynb"
---
<!--

#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: nbs/datasets/yoochoose.ipynb
# command to build the docs after a change: nbdev_build_docs

-->

<div class="container" id="notebook-container">
        
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h2 id="YoochooseDataset" class="doc_header"><code>class</code> <code>YoochooseDataset</code><a href="https://github.com/RecoHut-Projects/recohut/tree/master/recohut/datasets/yoochoose.py#L16" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>YoochooseDataset</code>(<strong><code>root</code></strong>, <strong><code>min_session_length</code></strong>:<code>int</code>=<em><code>2</code></em>, <strong><code>min_item_support</code></strong>:<code>int</code>=<em><code>5</code></em>, <strong><code>eval_sec</code></strong>:<code>int</code>=<em><code>86400</code></em>) :: <a href="/recohut/base.html#SessionDataset"><code>SessionDataset</code></a></p>
</blockquote>
<p>Session data base class.</p>
<p>Args:
    min_session_length (int): Minimum number of items for a session to be valid
    min_item_support (int): Minimum number of interactions for an item to be valid
    eval_sec (int): these many seconds from the end will be taken as validation data</p>
<p>References:</p>

<pre><code>1. https://github.com/Ethan-Yys/GRU4REC-pytorch-master/blob/master/preprocessing.py</code></pre>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">ds</span> <span class="o">=</span> <span class="n">YoochooseDataset</span><span class="p">(</span><span class="n">root</span><span class="o">=</span><span class="s1">&#39;/content/yoochoose&#39;</span><span class="p">)</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">

<div class="output_subarea output_stream output_stderr output_text">
<pre>Processing...
</pre>
</div>
</div>

<div class="output_area">

<div class="output_subarea output_stream output_stdout output_text">
<pre>Training Set has 31637239 Events, 7966257 Sessions, and 37483 Items


Validation Set has 71222 Events, 15324 Sessions, and 6751 Items


</pre>
</div>
</div>

<div class="output_area">

<div class="output_subarea output_stream output_stderr output_text">
<pre>Done!
</pre>
</div>
</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>tree --du -h -C /content/yoochoose
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">

<div class="output_subarea output_stream output_stdout output_text">
<pre><span class="ansi-blue-intense-fg ansi-bold">/content/yoochoose</span>
├── [995M]  <span class="ansi-blue-intense-fg ansi-bold">processed</span>
│   ├── [993M]  yoochoose_train.txt
│   └── [2.3M]  yoochoose_valid.txt
└── [1.4G]  <span class="ansi-blue-intense-fg ansi-bold">raw</span>
    └── [1.4G]  rsc15-clicks.dat

 2.4G used in 2 directories, 3 files
</pre>
</div>
</div>

</div>
</div>

</div>
    {% endraw %}

</div>
 

