mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: Use of Preconditions in Mahalanobis and other places
Date Thu, 03 Nov 2011 00:05:10 GMT
The preconditions should still be there, but should be in the constructor
in such cases (IMHO).

This might be an argument for removing setters if they exist or adding
preconditions to the setters.

On Wed, Nov 2, 2011 at 4:11 PM, Grant Ingersoll <gsingers@apache.org> wrote:

> I was looking at some of the DistanceMeasure stuff (Mahalanobis at the
> moment) and it strikes me as a bit odd that our core distance() functions
> would use Preconditions to check things that are part of
> construction/configuration of the instance.  A call to distance() is likely
> executed a lot of times.  Is it really going to change?   Any objections to
> me removing them?
>
> As an aside, should we have SquaredMahalanobis too, much like we have
> SquaredEuclidean?  Seems like, since we just need relativeness we don't
> actually care about the sqrt, right?
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message