1

I'm using both MDS and PCA in the package MultivariateStats.jl. My code is

 M = fit(PCA, matrix; maxoutdim=2)
Yte = predict(M, matrix)
M1 = fit(MDS, matrix; maxoutdim=2, distances=false)
Yte1 = predict(M1)

Soon I found that Yte and Yte1 are always the same since MDS uses Euclidean norm, so MDS is always equivalent to PCA in this case. Then I tried another method.

mds = fit(MDS, matrix; distances=true, metric=isotonic)

But I got the error that

MethodError: no method matching fit(::Type{MDS}, ::Adjoint{Float64, Matrix{Float64}}; distances=true, metric=MultivariateStats.isotonic) Closest candidates are: fit(::Type{MDS}, ::AbstractMatrix{T}; maxoutdim, distances) where T<:Real at ~/.julia/packages/MultivariateStats/cFZlL/src/cmds.jl:232 got unsupported keyword argument "metric"

I found the example code above in https://juliastats.org/MultivariateStats.jl/dev/mds/#MultivariateStats.MetricMDS

Is there anyway to fix it?

Joe
  • 93
  • 1
  • 5
  • Please [report it here](https://github.com/JuliaStats/MultivariateStats.jl/issues/new/choose). Open an issue with a title like `MethodError: no method matching fit(::Type{MDS}, ::Adjoint{Float64, Matrix{Float64}}` and paste your entire post there. Thanks. – Shayan Nov 15 '22 at 11:28

1 Answers1

0

I think the documentation is wrong, try MetricMDS instead of MDS.

August
  • 12,410
  • 3
  • 35
  • 51