Hot answers tagged

18 votes

Is PCA considered a machine learning algorithm

PCA is actually just a rotation. Seriously, that's all: it's a clever way to spin the data around onto a new basis. This basis has properties that make it useful as a pre-processing step for several ...
David Marx's user avatar
  • 3,188
14 votes

How many dimensions to reduce to when doing PCA?

After performing the PCA algorithm you get the principal components, sorted by the amount of information they hold. If you keep the whole set there is no information lost. Removing them one by one and ...
Jan van der Vegt's user avatar
10 votes

How do I make an interactive PCA scatterplot in Python?

There is an awesome library called MPLD3 that generates interactive D3 plots. This code produces an HTML interactive plot of the popular iris dataset that is compatible with Jupyter Notebook. When ...
scottlittle's user avatar
9 votes

Classify multivariate time series

If you're in Python, there are a couple of packages that can automatically extract hundreds or thousands of features from your timeseries, correlate them with your labels, choose the most significant, ...
Doctor J's user avatar
  • 213
9 votes

Why does PCA assume Gaussian Distribution?

TL;DR PCA does assume normal distribution of features See p.55 SAS book1 or Rummel, 19702 or Mardia, 19793. If you expect the PCs to be independent, then PCA might fail to live to your expectations. ...
Oren Milman's user avatar
9 votes
Accepted

Is PCA considered a machine learning algorithm

It's not uncommon for someone to label it as an unsupervised technique. You can do some analysis on the eigenvectors and that help explain behavior of the data. Naturally if your transformation still ...
Tophat's user avatar
  • 2,350
9 votes
Accepted

How to export PCA to use in another program

Ideally PCA should not be used as a part of pre-processing feature reduction. Anyhow regarding saving and reusing PCA model, sharing a basic code snippet which is working very fine in my case(as I'm ...
vipin bansal's user avatar
  • 1,252
8 votes
Accepted

Is Overfitting a problem in Unsupervised learning?

Overfitting happens when the model fits the training dataset more than it fits the underlying distribution. In a way, it models the specific sample rather than producing a more general model of the ...
DaL's user avatar
  • 2,623
7 votes

How can give weight to feature before PCA

PCA is unsupervised method for finding the most important components. I don't see a reason why you should want add a weight. If you know what features are important, why use PCA at all? Or perform PCA ...
HonzaB's user avatar
  • 1,669
7 votes

PCA before K-mean clustering

PCA reduces dimensionality. It does not change the number of observations you have. Nor does it change the order of the data. The n-th observation in your original dataset will still be the n-th ...
Lauren Yu's user avatar
7 votes
Accepted

Is it always possible to get well-defined clusters from the data?

First of all, a picture should not be taken to define if there are or no groups on your data, since no matter what projection you use (linear with PCA or manifold with tSNE), you are reducing a 64-...
Multivac's user avatar
  • 2,784
6 votes
Accepted

Classify multivariate time series

You're on the right track. Look at calculating a few more features, both in time and frequency domain. As long as number of samples >> number of features, you aren't likely to overfit. Is there any ...
mpotma's user avatar
  • 366
6 votes

Is PCA considered a machine learning algorithm

Absolutely, it is not a learning algorithm, as you do not learn anything in PCA. However, it can be used in different learning algorithms to reach a better performance in real, likes the most of the ...
OmG's user avatar
  • 1,199
6 votes
Accepted

Can PCA be applied to reduce dimensionality of only a subset of features?

Yes, absolutely. Simply split your data into two sets feature-wise, apply PCA to one of them, and then stick them back together again. How to actually perform this will vary depending on your ...
timleathart's user avatar
  • 3,900
6 votes

Data scaling before PCA: how to deal with categorical values?

You can not use PCA, or at least it is not recommended, for mixed data. It is best to use Factor analysis of mixed data. You are lucky that Prince is a Python package that covers all data scenarios, ...
TwinPenguins's user avatar
  • 4,187
6 votes

Is it OK to try to find the best PCA k parameter as we do with other hyperparameters?

Your emphasis on using a validation set rather than the training set for selecting $k$ is a good practice and should be followed. However, we can do even better! The parameter $k$ in $\text{PCA}$ is ...
Esmailian's user avatar
  • 9,147
6 votes

Is it always possible to get well-defined clusters from the data?

This is true of any data analytics endeavor. You don't have ANY guarantees that you're going to find what you are looking for in your data. You have a theory, question, assumptions... and you collect ...
Yoan B. M.Sc's user avatar
5 votes
Accepted

What statistical method can be applied in my case?

There are a number of methods for this. Here's a list: You can build a Regression model and observe the p-values of the coefficients of each variable. Pearson Correlation Spearman Correlation Kendall ...
PM0087's user avatar
  • 191
5 votes
Accepted

Understanding how distributed PCA works

The question is more related to Apache Spark architecture and map reduce; there are more than one questions here, however, the central piece of your question perhaps is For example, one of the means ...
Ironluca's user avatar
  • 187
5 votes

Does it make sense to combine PCA with an artificial neural network?

Neural networks are actually extremely effective at performing dimensionality reduction. A great example is word2vec, which applies a shallow neural network to reduce inputs on the order of several ...
David Marx's user avatar
  • 3,188
5 votes

Does it make sense to combine PCA with an artificial neural network?

PCA is used to abandon having redundant features. It expands directions which your data is highly distributed in those directions. During this process, it does not ...
Green Falcon's user avatar
  • 13.9k
5 votes

Are dimensionality reduction techniques useful in deep learning

Deep learning does not use dimensionality reduction because deep learning itself is a useful dimensionality reduction technique. Deep learning learns a compressed, nonlinear representation of the data ...
Brian Spiering's user avatar
5 votes
Accepted

Why do we choose principal components based on maximum variance explained?

do we always have to choose principal components based on maximum variance explained? Yes. "Maximum variance explained" is closely related to the main objective as follows. Our main objective is: ...
Esmailian's user avatar
  • 9,147
5 votes
Accepted

can I use t-sne or PCA to reduce number of classes?

No. t-Distributed Stochastic Neighbor Embedding (t-SNE) and Principal Component Analysis (PCA) are dimension reduction techniques, aka fewer columns of a tidy dataframe. Clustering will reduce the ...
Brian Spiering's user avatar
5 votes
Accepted

PCA for complex-valued data

Apparently this functionality is left out intentionally, see here. I'm afraid you have to use SVD, but that should be fairly straightforward: ...
matthiaw91's user avatar
  • 1,505
4 votes
Accepted

Interpreting the results of randomized PCA in scikit-learn

Yes, through the components_ property: ...
Emre's user avatar
  • 10.5k
4 votes

What statistical method can be applied in my case?

Update: With this sample size you almost can't find any useful insight. One of the ways to find one to one relationship is finding correlation coefficient of two random variables. Correlation is the ...
Hossein Sarshar's user avatar
4 votes
Accepted

How can give weight to feature before PCA

After standardizing your data you can multiply the features with weights to assign weights before the principal component analysis. Giving higher weights means the variance within the feature goes up, ...
Jan van der Vegt's user avatar
4 votes
Accepted

Feature Selection and PCA

PCA simply finds more compact ways of representing correlated data. PCA does not explicitly compact the data in order to better explain the target variable. In some cases, most of your inputs might be ...
Ryan Zotti's user avatar
  • 4,129
4 votes

PCA before K-mean clustering

PCA will not change the order of your points. The first point will still be the first point. As for the second, this is too unclear to answer. There is no obvious relationship between the number of ...
Has QUIT--Anony-Mousse's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible