Search code examples
orange

MDS with n different than 2 in Orange3


In Orange 2 it was possible to perform MDS and project data onto multidimensional space rather than a plane when using the scripting library as documented in the docs.

How to do that in Orange 3? Is the feature still supported as I cannot find the MDS projection class in the data mining library, just in the visual programming part?


Solution

  • The following should work (set the number of desired components with n_components):

    import Orange
    
    data = Orange.data.Table("iris")
    mds = Orange.projection.MDS(n_components=3)
    projection = mds(data)
    print(projection.embedding_[:5])
    

    Orange3 borrows this functionality from sklearn.