# Extreme Classification - Amazon — Data

来源：https://www.kaggle.com/competitions/extreme-classification-amazon/data

本地 Meta Kaggle 快照；不是本次实时页面。

# Dataset Description

<p>The dataset folder contains 3 files -</p>
<ul>
<li><strong>trn_ft_mat.txt</strong> - the training feature file</li>
<li><strong>trn_lbl_mat.txt</strong> - the training label file</li>
<li><strong>tst_ft_mat.txt</strong> - the test feature file</li>
</ul>
<p> <strong>Feature file format -</strong> First line specifies number of datapoints and the total number of features. Each of the following lines contains features active in that datapoint.
<pre>&lt;#datapoints&gt; &lt;#features&gt;<br />&lt;feature_id:feature_value&gt; &lt;feature_id:feature_value&gt; &lt;feature_id:feature_value&gt; <br />&lt;feature_id:feature_value&gt; &lt;feature_id:feature_value&gt; &lt;feature_id:feature_value&gt; <br /><span style="font-size: 14px; line-height: 1.4em;">etc.</span></pre>

<p> <strong>Label file format -</strong> First line specifies number of datapoints and the total number of labels. Each of the following lines contains labes active in that datapoint.
<pre>&lt;#datapoints&gt; &lt;#labels&gt;<br />&lt;label_id:1&gt; &lt;label_id:1&gt; &lt;label_id:1&gt;  <br />&lt;label_id:1&gt; &lt;label_id:1&gt;  <br /><span style="font-size: 14px; line-height: 1.4em;">etc.</span></pre>

<p> <strong>Reading/Writing data in Matlab -</strong> You can download the scripts from <a href="https://drive.google.com/open?id=17XO9kMlVLnoOJ_Ry1BYJWrUnGtTesagG"> here</a> to read feature and label sparse matrices from .txt files into matlab: (Note that these scripts are present in the folder named matlab)</p>
<pre>To read a text matrix into Matlab: 
       [matrix] = read_text_mat([text matrix name]);
To write a Matlab matrix into text format:
       write_text_mat([Matlab sparse matrix], [text matrix name to be written to]);
</pre>