Orange Forum • View topic - MDS dimensionality?

MDS dimensionality?

A place to ask questions about methods in Orange and how they are used and other general support.

MDS dimensionality?

Postby hoodis » Wed Aug 20, 2008 12:47

hello, I'm trying to apply multidimensional scaling to my data set. orngMDS seems to work fine for this task, except for one thing...

I would like to be able to change the dimensionality of the output from the default (2D), but I can't seem to manage it. I understood that the "dim" variable was the dimensionality of the projected space, and yes, I seem to be able to set this to any value I want, but the output is always a set of 2D vectors. Am I understanding this wrong? or is there something else that I could try? Any ideas would be great! :)


One thing I did notice when setting a value for dim is that the variable is not recognised when first initialising the MDS class (though it's implied in the documentation that I can do this), but it can be set separately:


>>> mds = orngMDS.MDS(dists, dim=3)

Traceback (most recent call last):
File "<pyshell#29>", line 1, in -toplevel-
mds = orngMDS.MDS(dists, dim=3)
TypeError: __init__() got an unexpected keyword argument 'dim'

>>> mds = orngMDS.MDS(dists)
>>> mds.dim
2
>>> mds.dim = 3
>>> mds.dim
3

Postby Ales » Tue Aug 26, 2008 9:29

I just fixed this. The dim argument was treated as a positional and not as a keyword argument.
You can update orange from svn and the your code should work, or just replace your:
mds = orngMDS.MDS(dists, dim=3)
with:
mds = orngMDS.MDS(dists, 3)

Postby hoodis » Wed Sep 03, 2008 1:49

that seems to work fine now, thanks!


Return to Questions & Support



cron