<p>Similar problem in KMeans:</p>
<div class="highlight highlight-source-c++"><pre><span class="pl-k">float</span> mat[] = { <span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>, <span class="pl-c1">5</span>, <span class="pl-c1">6</span> };
<span class="pl-k">const</span> arma::fmat <span class="pl-en">data</span>(mat, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">false</span>, <span class="pl-c1">true</span>);
<span class="pl-c1">size_t</span> number_of_clusters = <span class="pl-c1">2</span>;
arma::Row<<span class="pl-c1">size_t</span>> <span class="pl-en">assignments</span>(<span class="pl-c1">3</span>);
arma::mat <span class="pl-en">centroids</span>(<span class="pl-c1">2</span>, <span class="pl-c1">3</span>);
km::KMeans<mlpack::metric::EuclideanDistance, km::RandomPartition,
km::MaxVarianceNewCluster, km::NaiveKMeans, arma::fmat> k;
k.Cluster(data, number_of_clusters, assignments, centroids);</pre></div>
<pre><code>/usr/include/mlpack/methods/kmeans/kmeans_impl.hpp: In instantiation of ‘void mlpack::kmeans::KMeans<MetricType, InitialPartitionPolicy, EmptyClusterPolicy, LloydStepType, MatType>::Cluster(const MatType&, size_t, arma::Row<long unsigned int>&, arma::mat&, bool, bool) [with MetricType = mlpack::metric::LMetric<2, true>; InitialPartitionPolicy = mlpack::kmeans::RandomPartition; EmptyClusterPolicy = mlpack::kmeans::MaxVarianceNewCluster; LloydStepType = mlpack::kmeans::NaiveKMeans; MatType = arma::Mat<float>; size_t = long unsigned int; arma::mat = arma::Mat<double>]’:
test.cxx:44:65: required from here
/usr/include/mlpack/methods/kmeans/kmeans_impl.hpp:239:37: error: no matching function for call to ‘arma::Col<double>::Col(const arma::subview_col<float>)’
centroids.col(assignments[i]) += arma::vec(data.col(i));
</code></pre>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/506#issuecomment-208715641">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFNf2sHemiwx2wDcQZNPP86aL1gKoks5p2y5_gaJpZM4HKrIf.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/506#issuecomment-208715641"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>