---

title: LastFM dataset


keywords: fastai
sidebar: home_sidebar

summary: "LastFM dataset."
description: "LastFM dataset."
nb_path: "nbs/datasets/datasets.lastfm.ipynb"
---
<!--

#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: nbs/datasets/datasets.lastfm.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="LastfmDataset" class="doc_header"><code>class</code> <code>LastfmDataset</code><a href="https://github.com/RecoHut-Projects/recohut/tree/master/recohut/datasets/lastfm.py#L16" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>LastfmDataset</code>(<strong><code>root</code></strong>, <strong><code>interval</code></strong>=<em><code>Timedelta('0 days 08:00:00')</code></em>, <strong><code>n</code></strong>=<em><code>40000</code></em>) :: <a href="/recohut/datasets.base.html#SessionDatasetv3"><code>SessionDatasetv3</code></a></p>
</blockquote>
<p>Dataset base class</p>

</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">LastfmDataset</span><span class="p">(</span><span class="n">root</span><span class="o">=</span><span class="s1">&#39;/content/lastfmdata&#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>start preprocessing
No. of Clicks: 3835706
No. of Items: 38615
saving dataset
</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/lastfmdata
</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/lastfmdata</span>
├── [ 18M]  <span class="ansi-blue-intense-fg ansi-bold">processed</span>
│   ├── [   5]  all_train_seq.txt
│   ├── [3.5M]  test.txt
│   └── [ 14M]  train.txt
└── [2.4G]  <span class="ansi-blue-intense-fg ansi-bold">raw</span>
    └── [2.4G]  userid-timestamp-artid-artname-traid-traname.tsv

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

</div>
</div>

</div>
    {% endraw %}

</div>
 

