# Comparing ISOMAP residual variance to PCA explained variance

I am using R princomp function (from stats package) to run a PCA on a data set and I want to compare its output to that of the nonlinear dimensionality reduction method ISOMAP, which I am using under matlab through this toolbox: http://isomap.stanford.edu on the same dataset.

What I am interested in is the intrinsic dimensionality of the dataset as determined according to PCA and to ISOMAP separately, the ultimate goal being to check whether nonlinear dimensionality reduction works better on this dataset than PCA.

With princomp I get the standard deviations associated to each component, while the ISOMAP package returns residual variances as a function of the manifold dimensionality. How do I compare these two quantities? In other words, how is the residual variance defined in ISOMAP?

This should be irrelevant, but the dataset is 54 points in 5 dimensions.

Cross Validated Asked by user3358740 on November 21, 2021

The original Isomap paper defined "residual variance" as follows (reference 42):

$$text{residual variance} = 1 - R^2(hat D_M, D_y)$$

where $$R$$ is the Pearson correlation coefficient over all entries of $$hat D_M$$ and $$D_Y$$. $$hat D_M$$ is the euclidean distance matrix for PCA and the geodesic distance matrix for Isomap. $$D_Y$$ is the euclidean distance matrix of the low dimensional embedding, this matrix changes with the number of dimensions you use for the embedding.

EDIT: This is numerically different than the explained variance of PCA derived from the eigenvalues and I don't know if there is a direct connection between the two of them.

EDIT: I asked here for the connection between residual and explained variance.

Answered by gdkrmr on November 21, 2021

## Related Questions

### Specifying specific priors for a correlation matrix via Stan

1  Asked on December 11, 2020 by sue-doh-nimh

### Example of mean independent variables but dependent still

0  Asked on December 11, 2020 by luchonacho

### When are observations not weakly exchangeable?

1  Asked on December 11, 2020 by rumtscho

### How big should my subsample be?

1  Asked on December 11, 2020 by kaecvtionr

### Spirtes’ example of d-separation not leading to independence in a directed cyclic graph with non-linear structural equations

1  Asked on December 10, 2020 by quant_dev

### Asymptotic normality for nonsmooth objective functions

1  Asked on December 10, 2020

### Regression: is it wrong to bin a continuous variable to overcome overfitting?

1  Asked on December 10, 2020 by st4co4

### How do you compare standard deviations?

2  Asked on December 10, 2020 by yaynikkiprograms

### How to interpret the beta estimates of a generalized linear model with a square root power link?

0  Asked on December 10, 2020 by statboy_41

### Can k-fold CV help reduce sampling bias?

0  Asked on December 9, 2020 by aite97

### Why is the standard deviation of the average of averages smaller than the standard deviation of the total?

0  Asked on December 9, 2020 by pinocchio

### Calculating bias of ML estimate of AR(1) coefficient

1  Asked on December 9, 2020 by andrew-kirk

### Using residuals from linear regression for normality testing for ANOVA

0  Asked on December 9, 2020 by s-ramagokula-krishnan

### How does scaled conjugate gradient work in neural network training? Comparison with gradient descent

0  Asked on December 9, 2020 by johanna

### For B-spline what does $sum_{i=0,n}N_{i,k}(t)=1$ mean?

1  Asked on December 9, 2020

### Is it possible to detect overfitting automatically/programmatically after model creation?

0  Asked on December 9, 2020 by ayberk-yavuz

### R lmer model: degree of freedom and chi square values are zero

1  Asked on December 9, 2020 by roromario

### Random Censoring scheme in Weibull Distribution

0  Asked on December 8, 2020 by soham-bagchi

### fixed effects vs random effects vs random intercept model

1  Asked on December 8, 2020 by daniela-rodrigues

### Immediate NaN in loss function with custom activation without extreme batch size–how to prevent exploding gradients?

0  Asked on December 8, 2020 by rain