Skip to content

How to use MetricMDS #231

@l8l

Description

@l8l

This might be a naive question but I am unable to understand how to use metric MDS. When following the examples in the documentation, I only get classical MDS out. In the documentation, an example for classical MDS (cMDS) is provided, using the code

using MultivariateStats
# ... prepare data X ...
M = fit(MDS, X; maxoutdim=3, distances=false)
# returns "Classical MDS(indim = 4, outdim = 3)"

However, no example for metric MDS (mMDS) is given. Scrolling down, there are 2 sections, one explaining cMDS and one mMDS. In the mMDS section, the code provided to call mMDS seems to be the same as for cMDS:

mds = fit(MDS, X; distances=false, maxoutdim=size(X,1)-1)

There is no specification what one has to load before that to make the function return an mMDS object instead of a cMDS object. (Maybe this is also related to me lacking general knowledge of julia?) I tried things like

using MultivariateStats.MetricMDS
mds = fit(MDS, X; distances=false, maxoutdim=size(X,1)-1)

or

using MultivariateStats
mds = fit(MetricMDS, X; distances=false, maxoutdim=size(X,1)-1)

or

using MultivariateStats
mds = fit(MDS::MetricMDS, X; distances=false, maxoutdim=size(X,1)-1)

but all return errors. Is there a problem with the documentation or am I just doing a silly mistake? Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions