# Questions tagged [pca]

Principal component analysis (PCA) is a linear dimensionality reduction technique. It reduces a multivariate dataset to a smaller set of constructed variables preserving as much information (as much variance) as possible. These variables, called principal components, are linear combinations of the input variables.

3,392 questions
Filter by
Sorted by
Tagged with
240 views

### PCA regression coefficients recovery

Assume we have a simple linear model $$y = b^TX + \epsilon$$ for which we want to reduce the number of variables. We perform a PCA reduction on $X$ such that $$Z_{j} = \gamma^{T}_{j}(X-\mu)$$ where ...
1 vote
351 views

### Factor analysis for ordinal data converted from binary ordinal data [closed]

Let’s begin with simple visualization: ...
1 vote
42 views

### Purpose of expressing data in principal components

I have a rough understanding of the outline PCA. Given $n$ samples of $m$-dimensional data: $\vec{x}_1, \vec{x}_2, \dots, \vec{x}_n$, PCA aims to find an appropriate orthonormal basis called principal ...
2k views

### Feature Selection Using Principal Feature Analysis and Variables Factor Map

I am trying to select the most important features that explain the variability of my data using an unsupervised approach in python (would consider R though). This is after I performed a PCA and ...
11 views

### Training data for classification with dimensionality reduction. How do we test the model prediction?

Hi I'm sorry if my question is a bit basic. But I need help with understanding classification with dimensionality reduction. Say I have a training matrix, X containing n $\times$ m. And m is a very ...
29 views

### help with principal component analysis using spatiotemporal data [closed]

I'm currently trying to run a PCA in R using the vegan and ggvegan packages. I have environmental data as well as spatial (site) and temporal (day, season, year) data. I'm attempting to show how much ...
1 vote
24 views

### Why does princomp in R stats package use population sd if data is supplied but sample sd if covariance matrix is supplied?

In princomp of the R stats package, I noticed that the "scale" of the output varies based on whether the raw data or ...
41 views

### sklearn.decomposition PCA fit_transform() returns different results for the exact same array [duplicate]

If PCA is a deterministic algorithm, how come the results of two separate PCA operations on the exact same array are not even in close vicinity of each other? EDIT: It is not a sign problem (used abs()...
893 views

### Blind source separation of convex mixture?

Suppose I have $n$ independent sources, $X_1, X_2, ..., X_n$ and I observe $m$ convex mixtures: \begin{align} Y_1 &= a_{11}X_1 + a_{12}X_2 + \cdots + a_{1n}X_n\\ ...&\\ Y_m &= a_{m1}X_1 + ...
1k views

### Calculating RMSEC and RMSECV of PCA in R

I have been trying to calculate the root mean squares error of calibration (RMSEC) and the root mean squares error of cross validation (RMSECV) for a PCA model made in R using the mdatools package. ...
276 views

### Combining continuous and binary data in unsupervised learning

I am working on cluster detection applied to housing data. Each data point has some continuous features, such as house size, and some discrete ones, such as the number of garages (0 or 1). At the ...
20 views

### Understanding clustering using oblique decision tree

I would like to understand the following post with regards to the code below. https://www.kaggle.com/competitions/optiver-realized-volatility-prediction/discussion/276137#1559582 Initially, Principal ...
1 vote
258 views

### How to apply PCA results on a Future Dataset?

I have a fundamental question regarding the applications of the results of PCA: If we have already performed a successful PCA on a dataset of, say, real estate prices of a certain region over the last ...
1 vote
112 views

### Applying PCA to Time-Series Emotional Data: Validity and Interpretation Concerns

I'm currently exploring the application of Principal Component Analysis (PCA) to time-series data representing various "facial emotional expression" states (e.g., anger, happiness, sadness, ...
1 vote
22 views

### Scaling and centring in PCA of compositional data

I am following this review's approach for PCA using compositional data. It involves computing the centred log-ratio (CLR) transformation of the compositional data, and then running PCA on the ...
2k views

### Principal Component analysis (vector space or inner product space?)

(WARNING: This question might seem dumb) I see that the optimization problem in PCA involves the notion of inner product. For example, to solve for the loadings in second principal component, the ...
1 vote
382 views

### Link between CCA and PCA

I have two datasets, $X$ and $Y$. I calculate the PCA components of $X$ and also perform CCA on $X$ and $Y$. If I create a model with all the PCA components of $X$, and another model with all the CCA ...
6k views

45 views

### Rank Neurons Importance of the latent space of an Autoencoder using PCA

I am trying to extract only the important neurons from the latent space of an Autoencoder to be converted later to a pattern for a model pattern recognizer. PCA Loadings helps in finding the highest ...
408 views

### PCA: should standardization be applied on features or samples?

I am struggling a little bit with PCA. I understand that standardization is an important part of the algorithm but I do not understand which elements should be standardized. Let's say I have a 10x100 ...
8k views

### I'm getting "jumpy" loadings in rollapply PCA in R. Can I fix it?

I have 10 years of daily returns data for 28 different currencies. I wish to extract the first principal component, but rather than operate PCA on the whole 10 years, I want to rollapply a 2 year ...
82 views

### Direction of PC1 and PC2 in Principal Component Analysis (PCA)

I am a bit confused by what is considered the direction for the principal components in PCA. For example: I do understand that the picture on the right hand side is correct. However, is the the PC1 ...