Questions tagged [multi-dimensional-scaling]

84 questions
16
votes
4 answers

Choosing subset of farthest points in given set of points

Imagine you are given set S of n points in 3 dimensions. Distance between any 2 points is simple Euclidean distance. You want to chose subset Q of k points from this set such that they are farthest from each other. In other words there is no other…
13
votes
1 answer

5 dimensional plot in r

I am trying to plot a 5 dimensional plot in R. I am currently using the rgl package to plot my data in 4 dimensions, using 3 variables as the x,y,z, coordinates, another variable as the color. I am wondering if I can add a fifth variable using this…
Error404
  • 6,959
  • 16
  • 45
  • 58
9
votes
2 answers

Multidimensional scaling with missing values in dissimilarity matrix

I have a dissimilarity matrix on which I would like to perform multidimensional scaling (MDS) using the sklearn.manifold.MDS function. The dissimilarity between some elements in this matrix is not meaningful and I am thus wondering if there is a way…
9
votes
6 answers

Avoid scaling binary columns in sci-kit learn StandsardScaler

I'm building a linear regression model in sci-kit learn, and am scaling the inputs as a preprocessing step in a sci-kit learn Pipeline. Is there any way I can avoid scaling binary columns? What's happening is that these columns are being scaled with…
user37760
  • 151
  • 2
  • 2
  • 3
6
votes
2 answers

Why is `sklearn.manifold.MDS` random when `skbio's pcoa` is not?

I'm trying to figure out how to implement Principal Coordinate Analysis with various distance metrics. I stumbled across both skbio and sklearn with implementations. I don't understand why sklearn's implementation is different everytime while…
4
votes
0 answers

t-SNE Choosing the Number of Dimensions

I am using t-SNE for exploratory data analysis. I am using this instead of PCA because PCA is linear and t-SNE is non-linear. It's really straight-forward to know how many dimensions are required to capture the necessary variance with PCA. How do…
4
votes
3 answers

Error in isoMDS(d): zero or negative distance between objects

I'm trying to do a nonmetric MDS (R version 3.3.3) using the isoMDS function in the MASS package and I get this error: Error in isoMDS(d): zero or negative distance between objects 1 and 2 Here's an example of what I'm doing: # LOAD…
user6094832
4
votes
2 answers

Numpy scale 3D array

I'm trying to scale a 3D array to size 64x64x64 (from a larger, non cube size), keeping aspect ratio. I've done the same thing in a 2D array like this: pad = Input.size[1]-Input.size[0] padLeft = math.ceil(pad/2) padRight = math.floor(pad/2) if(pad…
user2290362
  • 717
  • 2
  • 7
  • 21
4
votes
1 answer

What is the correct input to scikit-learn's MDS?

I'm hoping this is the correct place to post - if not, I am willing to change to SO. In any case, I am using MDS to help me find a 2-D representation of a dataset. Essentially, these are pKa values of amino acid residues across many years' worth of…
ericmjl
  • 13,541
  • 12
  • 51
  • 80
4
votes
1 answer

R : multidimensional scaling

I have several questions: 1. What's the difference between isoMDS and cmdscale? 2. May I use asymmetric matrix? 3. Is there any way to determine optimal number of dimensions (in result)?
Ivri
  • 2,159
  • 5
  • 25
  • 33
3
votes
1 answer

Convert co-occurrence matrix to dissimilarity matrix for MDS in scikit-learn

I have a matrix of word co-occurrence, like below. I'd like to use MDS to reduce the dimension and plot it. In sklearn there's a function model = MDS(n_components=2, dissimilarity='precomputed', random_state=1) and to apply the model output =…
3
votes
2 answers

What is the difference between metric and non-metric MDS for a beginner?

I am fairly new to data science and would like to know in simple words (like teaching your grandmother) what the difference between metric and non-metric Multidimensional scaling is. I have been googling for 2 days and watching different videos and…
3
votes
0 answers

Overlap percentage of NMDS using metaMDS in vegan package in R

How do I calculate the percent overlap of my 95% confidence interval ellipses in my NMDS plots? I used the 'vegan' package and my code is posted below. The data sheet columns are by species and the rows are by plot # 1-16 which are categorized…
3
votes
1 answer

How do you make one factor show as symbol, and another factor as colour in nMDS (vegan)?

I am trying to make an nMDS plot of data with a nested factor. I would like the nMDS to show both factors on one plot by using symbols and colour. In this reproducible example, if use was nested in moisture, I would like the plot to show Moisture as…
Slow Loris
  • 51
  • 1
  • 3
3
votes
2 answers

Python: Running Multidimensional Scaling with Incomplete Pairwise Dissimilarity Matrix in HDF5 format

I am working with large datasets of protein-protein similarities generated in NCBI BLAST. I have stored the results in a large pairwise matrices (25,000 x 25,000) and I am using multidimensional scaling (MDS) to visualize the data. These matrices…
1
2 3 4 5 6