[mlpack-git] [mlpack/mlpack] Spill trees (#747)

Ryan Curtin notifications at github.com
Sun Aug 14 12:30:04 EDT 2016


> +      double effectiveError = 0;
> +      size_t cases = 0;
> +      for (size_t i = 0; i < distances.n_elem; i++)
> +      {
> +        if (distancesExact(i) != 0 && distances(i) != DBL_MAX)
> +        {
> +          effectiveError += (distances(i) - distancesExact(i)) /
> +              distancesExact(i);
> +          cases++;
> +        }
> +      }
> +      if (cases)
> +        effectiveError /= cases;
> +
> +      Log::Info << "Effective error: " << effectiveError << endl;
> +    }

Do you think it would be better to move the effective relative error calculation into the `NeighborSearch` class, perhaps as a static method?  You could pass in the two distance matrices as input and get the effective relative error as output.  That way people could reuse this functionality elsewhere.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/747/files/fe090ee13c7cad79e2b7eb8b6690628ba3ead1ed#r74704736
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160814/03e1200b/attachment-0001.html>


More information about the mlpack-git mailing list