[R-sig-Geo] Mahalanobis scores for training data
Robert J. Hijmans
r.hijmans at gmail.com
Fri Dec 13 16:22:37 CET 2013
Gerardo:
?mahal says:
"The predictions are (1-distance). I.e. the highest possible value is
1, and there will likely be large negative numbers"
So I suppose you could do:
predict(model, data) - 1
Best, RH
On Wed, Dec 11, 2013 at 5:57 PM, Gerardo Martin <gerardommc at gmail.com> wrote:
> Hi all. I have a series of distribution models with the mahalanobis distance
> implementation of dismo. I used the data.frame method because of the nature
> of data. However in order to run the proper diagnostic tests (not the
> traditional AUC) I need to calculate the distances of the training data. To
> date I've done this using the predict function as:
>
> predict(model, data)
>
> Bus this only gives scores of 1, which is incorrect given that all scores
> should normally go from 0 to -inf. I suppose that what the function is doing
> is identifying training data and returning 1 as closest to training data.
> But is there a way to compute the raw distances?
>
> Regards
>
> Gerardo
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
More information about the R-sig-Geo
mailing list