<p>For testing purpose, I Loaded a simple csv like the one below.</p>

<pre><code>1, 1, 1
1, 1, 1
  , 1, 1  &lt;-- intentionally put missing value here
1, 1, 1
</code></pre>

<p>But it recognizes wrong number of mappings and modifies the csv in a wrong way.</p>

<pre><code>[INFO ]         0       1.0000   1.0000   1.0000
[INFO ]         0       1.0000   1.0000   1.0000
[INFO ]    1.0000   1.0000   1.0000   1.0000
[INFO ] 
[INFO ] dataset info: 
[INFO ] 2 mappings in dimension 0.
[INFO ] 0 mappings in dimension 1.
[INFO ] 0 mappings in dimension 2.
</code></pre>

<p>Funny thing is that when I tried this,</p>

<pre><code>1, 1, 1
  , 1, 1 &lt;-- intentionally put missing value here
1, 1, 1
1, 1, 1
</code></pre>

<p>the result was different</p>

<pre><code>[INFO ]         0       1.0000   1.0000   1.0000
[INFO ]    1.0000   1.0000   1.0000   1.0000
[INFO ]    1.0000   1.0000   1.0000   1.0000
[INFO ] 
[INFO ] dataset info: 
[INFO ] 2 mappings in dimension 0.
[INFO ] 0 mappings in dimension 1.
[INFO ] 0 mappings in dimension 2.
</code></pre>

<p>And the lastly when I tried with the following,</p>

<pre><code>  , 1, 1  &lt;-- intentionally put missing value here
1, 1, 1
1, 1, 1
1, 1, 1
</code></pre>

<p>It finally showed the right number of mappings</p>

<pre><code>[INFO ]         0   1.0000   1.0000   1.0000
[INFO ]    1.0000   1.0000   1.0000   1.0000
[INFO ]    1.0000   1.0000   1.0000   1.0000
[INFO ] 
[INFO ] dataset info: 
[INFO ] 1 mappings in dimension 0.
[INFO ] 0 mappings in dimension 1.
[INFO ] 0 mappings in dimension 2.
</code></pre>

<p>The code I used for loading the file is:</p>

<pre><code>  arma::mat data;
  data::DatasetInfo info;
  data::Load(inputFile, data, info,  true);
  Log::Info &lt;&lt; data &lt;&lt; endl;

  Log::Info &lt;&lt; "dataset info: " &lt;&lt; endl;
  for (size_t i = 0; i &lt; data.n_rows; ++i)
  {
    Log::Info &lt;&lt; info.NumMappings(i) &lt;&lt; " mappings in dimension "
        &lt;&lt; i &lt;&lt; "." &lt;&lt; endl;
  }
</code></pre>

<p>Thanks for reading this long post.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/issues/658">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFG6VZ1lD9lpybSQebQxTHf1LLnZsks5qGerJgaJpZM4IpXCN">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFGcjMD_qhg5IjgXSc03OygY2qtX_ks5qGerJgaJpZM4IpXCN.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/issues/658"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>