tdfile <- read.table("tdfile.txt", header = T)
d <- dist(tdfile)
fit <- cmdscale(d,eig=TRUE, k=3) # k is the number of dim
fit # view results
x1 <- fit$points[,1]
x2 <- fit$points[,2]
x3 <- fit$points[,3]
tdfile.txt:
x y
-0.000619727820637277 0.334742234439879
0.486972842621572 0.645794059282842
0.761097709102752 0.896891734895503
0.265979758391511 1.13248315974883
....
After the script is done I had the warning:
"In dist (tdfile): NA created as a result of the conversion"
JossChavez, hello!
Sorry, but I'm newbie in MDS and R.
I don't know how my output must be. When I used MDS for converting 3D data to 2D data it was great, all good. Now I want to do reverse convert 2D to 3D and I have the warning.
my output:
I don't know MDS package or what your work is about... But conceptually how does this make sense ? "When I used MDS for converting 3D data to 2D data it was great, all good. Now I want to do reverse convert 2D to 3D "
How would you determine what the additional dimension should contain?
For example, if I took a colour image and saved it as greyscale, there is no principled way to reverse an operation that discards information.
1 to 3 make some sense, but you completely lost me at 4 and 5. Can you think of a different way to describe?
Ok.
Step 4. I describe lines (of a rectangle) like 3 points (begin, middle, end).
Step 5. I thought I can get values of lines (of all point of lines) by MDS, and then use that's value in the system of linear equations to know input vector(1 Step) in some group or no.
rectangles have 4 lines, and can be described by 4 points, each line is represented by a beginning and end point. these lines have middle points , as well as points 1 third from each end, 1 quarter from each end and on to infinity... I dont see why you would mention the middle . I find that confusing.
As I've never done MDS, I'm probably not the best person to help you along.
Have you searched the internet for examples of where someone has done something along the lines of what you want to do ? If there is a clear example , it should be straightforward to adapt it to your own data. (I would think)