<p><strong><code>k</code> is the no. of classes</strong></p>

<p>From Section 2.1 of <a href="https://arxiv.org/pdf/1607.01759v3.pdf" rel="nofollow noreferrer">https://arxiv.org/pdf/1607.01759v3.pdf</a> </p>

<blockquote>
  <p>More precisely, the computational complexity is O(kh) where k is the number of classes and h the dimension of the text representation.</p>
</blockquote>

<hr>

<p><strong>When predicting classes in text classification</strong>, from the <a href="https://github.com/facebookresearch/fastText#text-classification" rel="nofollow noreferrer">docs</a>:</p>

<blockquote>
  <p>The argument k is optional, and is equal to 1 by default.
  In order to obtain the k most likely labels for a piece of text, use:</p>
  
  <p>$ ./fasttext predict model.bin test.txt k</p>
</blockquote>

<hr>

<p><strong>When training the model</strong>, this is implicitly specified in the training data when performing supervised training with the <code>__label__*</code> tag. </p>

<p>From the <a href="https://github.com/facebookresearch/fastText/blob/master/tutorials/supervised-learning.md#getting-and-preparing-the-data" rel="nofollow noreferrer">example tutorial</a>:</p>

<pre><code>$ wget https://s3-us-west-1.amazonaws.com/fasttext-vectors/cooking.stackexchange.tar.gz &amp;&amp; tar xvzf cooking.stackexchange.tar.gz
--2017-05-23 09:03:26--  https://s3-us-west-1.amazonaws.com/fasttext-vectors/cooking.stackexchange.tar.gz
Resolving s3-us-west-1.amazonaws.com... 54.231.236.45
Connecting to s3-us-west-1.amazonaws.com|54.231.236.45|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 457609 (447K) [application/x-gzip]
Saving to: ‘cooking.stackexchange.tar.gz.1’

cooking.stackexchange.tar.gz.1      100%[================================================================&gt;] 446.88K   385KB/s    in 1.2s    

2017-05-23 09:03:28 (385 KB/s) - ‘cooking.stackexchange.tar.gz.1’ saved [457609/457609]

x cooking.stackexchange.id
x cooking.stackexchange.txt
x readme.txt


$ cat readme.txt 
The data in this archive is derived from the user-contributed content on the
Cooking Stack Exchange website (https://cooking.stackexchange.com/), used under
CC-BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/).

The original data dump can be downloaded from:
https://archive.org/download/stackexchange/cooking.stackexchange.com.7z
and details about the dump obtained from:
https://archive.org/details/stackexchange

We distribute two files, under CC-BY-SA 3.0:

 - cooking.stackexchange.txt, which contains all question titles and
   their associated tags (one question per line, tags are prefixed by
   the string "__label__") ;

 - cooking.stackexchange.id, which contains the corresponding row IDs,
   from the original data dump.
</code></pre>
Specifying the # of hidden units in Facebook fasttext
<p>In the <a href="https://arxiv.org/pdf/1607.01759v3.pdf" rel="nofollow noreferrer">paper on fasttext</a> for supervised classification, the authors specified various quantities of hidden units by altering some parameter  (h is the one on pages 3,4 - In table 1 you see "It has 10 hidden units and we evaluate it with and without bigrams.") But after reading <a href="https://github.com/facebookresearch/fastText/blob/master/README.md#full-documentation" rel="nofollow noreferrer">the documentation</a> it does not appear that there is a "hidden unit" parameter to alter.  Is there a way to specify the number of hidden units? Or is this the same as specifying the -dim option? </p>