Re: Maximum relative error in Multidimensional sca
- From: "Stéphane Bourgeois" <stephane.bourgeois@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 24 Jan 2006 14:54:52 -0500
Hello Peter,
yes, it's a bit non-euclidean, but the magnitudes of the negative
eigenvalue are quite resonable, or so I thought.
Anyway, thanks a lot for your help, it's very appreciated.
Best regards,
Stephane.
Peter Perkins wrote:
>
>
> Stéphane Bourgeois wrote:
>
>> D=[0.0596 0.05911 0.029867 0.05607...
>> 0.02963 0.022592 0.0045444...
>> 0.016778 0.021189...
>> 0.019387];
>>
>> [Y,eigvals] = cmdscale(D);
>>
>> maxrelerr = max(abs(D - pdist(Y(:,1:2)))) / max(D)
>>
>> maxrelerr =
>>
>> 0.1431
>>
>> Which is almost three time the maximum pairwise distance in my
>> matrix!! It's impossible for the reconstruction to be that bad.
> Any
>> idea?
>
> It's not impossible -- first of all, maxrelerr is the maximum
> _relative_ error.
> Second, your distance matrix is a bit on the noneuclidean side:
>
> [Y,eigvals] = cmdscale(D);
> eigvals
> eigvals =
> 0.0024919
> 0.0004886
> 7.1116e-020
> -6.2691e-006
> -0.00025479
>
> and so there's no guarantee that those two positive eigenvalues are
> going to
> give a good reconstruction. Fron the help for CMDSCALE:
>
> "D need not be a Euclidean distance matrix. If it is
> non-Euclidean, or is
> a more general dissimilarity matrix, then some elements of E
> are negative,
> and CMDSCALE chooses p as the number of positive eigenvalues.
> In this case,
> the reduction to p or fewer dimensions provides a reasonable
> approximation
> to D only if the negative elements of E are small in
> magnitude."
>
> Hope this helps.
>
> - Peter Perkins
> The MathWorks, Inc.
>
.
- Follow-Ups:
- Re: Maximum relative error in Multidimensional sca
- From: Peter Perkins
- Re: Maximum relative error in Multidimensional sca
- References:
- Maximum relative error in Multidimensional scaling demo: mistake, help please
- From: Stéphane Bourgeois
- Re: Maximum relative error in Multidimensional scaling demo: mistake, help please
- From: Bin Shi
- Re: Maximum relative error in Multidimensional sca
- From: Stéphane Bourgeois
- Re: Maximum relative error in Multidimensional sca
- From: Peter Perkins
- Maximum relative error in Multidimensional scaling demo: mistake, help please
- Prev by Date: Re: Excel Link - Running Matlab Command in Visual Basic
- Next by Date: Re: changing part axes background color
- Previous by thread: Re: Maximum relative error in Multidimensional sca
- Next by thread: Re: Maximum relative error in Multidimensional sca
- Index(es):
Relevant Pages
|