Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [pca]

Principal component analysis, a technique for dimensionality reduction.

0
votes
1answer
16 views

How can we apply PCA to reduce dimensionality of a heterogenous dataset?

I have a dataset containing insurance Claims with quantitative and qualitative variables but PCA refuses to convert or work with "string" type variables. This is the code I used : ...
0
votes
0answers
16 views

PCA on conditional heteroscedastic timeseries

What is the correct method of application of PCA on time series data. Since the time series may exhibit conditional heteroscedasticity, application of normal PCA might be wrong as the variance changes ...
0
votes
1answer
12 views

How the original data can be written in the space defined by these M principal components?

Suppose you apply PCA on the data $x_1,...,x_6$ and find that data can be fully described using M principal components $u_1,...,u_M$. How the original data can be written in the space defined by these ...
0
votes
1answer
9 views

Given a 12x12 binary image (only black and white pixels) what is its dimensionality? And how can I define dimensionality of a data space?

Suppose I have a grid 12x12 of pixels that can be only black or white. I can't understand if the dimensionality is 2 or 3. I mean... Is dimension given by 12x12 or 12x12x2 ?
3
votes
1answer
27 views

Ploting eigenvectors

I've generated two clouds of 3d points from multivariate_normal ...
1
vote
1answer
28 views

How to mathematically explain the translational and rotational invariance of PCA

There is a homework question for a course I am self studying (not a student) that is: let our $n \times d$-dimensional data vectors be denoted by $x_1,\ldots,x_n$ and let $R$ be a $d \times d$ ...
2
votes
0answers
30 views

t-SNE on extremely high-dimensional spaces

I successfully applied t-SNE to the number handwriting dataset. n=3823 data points (i.e. handwritten numbers) in an D=64 dimensional space (i.e. 8x8 pixels). Worked great. Now I would like to cluster ...
1
vote
0answers
14 views

I need help interpreting this PCA plot

I have a dataset of 116 observations and 10 numeric variables. The dataset contains information about healthy patients and patients attained with breast cancer. I did a PCA plot showing the cluster of ...
1
vote
0answers
35 views

PCA for unsupervised feature selection [closed]

If I understood correctly, "using results of PCA to select features" (as recommended in this answer) implies visually analysing bi-plots of first two principal components - i.e. the angle between a ...
1
vote
0answers
14 views

Show importance of variables from a data set without a response variable? Use PCA? [closed]

I am trying to find a way to statistically show that some variables in my data set are more important than others to determine its classification. I have an example data set with three variables from ...
1
vote
0answers
18 views

I have data of some movies and their subtitles.I want to classify them based on their ratings

I will convert the subtitles into vectors and use them as features to classify the movies into different categories based on their ratings.The problem that I am facing is my feature vector is much ...
0
votes
0answers
18 views

PCA based anomaly detection

Let there be a data in the form of a ellipse where the minor axis corresponds to a normal data samples and major axis has an outlier, such that outlier has maximum variance from mean. In this case, ...
2
votes
1answer
55 views

PCA: projection of positive data on negative side of plane

I did PCA on my data and projected the data on first two eigen vectors. After projection I see that the scatter plot of the data starts from [-1,-1]. My data is all positive. Is it correct for the ...
0
votes
0answers
19 views

How to append a subset of data that has PCA applied to the main dataset

I have a dataset that consist of users profiles and books they read. I have a 2nd dataset that contains description/information on the books. This dataset has 30 features, which I have applied PCA to. ...
0
votes
0answers
21 views

python - How do I extract the id from an unsupervised text classification

So I have the following dataframe: id text 342 text sample 341 another text sample 343 ... And the following code: ...
0
votes
0answers
19 views

What is the actual average human face?

When looking for the average human face, I found: averaged male/female face per country averaged chinese young man face which was sold as "average human face" because chinese young men are such a ...
0
votes
1answer
22 views

Guidance needed with dimension reduction for clustering - some numerical, lots of categorical data

I've my data in a Pandas df with 25.000 rows and 1.500 columns without any NaNs. Of the columns about 30 contain numerical data which I standardized with StandardScaler(). The rest are cols with ...
0
votes
2answers
96 views

multivariate clustering, dimensionality reduction and data scalling for regression

I have a dataset with approximately 20000 observations consisting of 40 independent and 1 dependent variable. My initial objective is to develop a model that will predict the dependent variable. I ...
0
votes
3answers
24 views

What best/correct algorithm/procedure to cluster a dataset with a lot 0's?

I'm new to statistics so sorry any major lack of knowledge in the topic, just doing a project for graduation. I'm trying to cluster a Health dataset containing Diseases(3456) and Symptoms(25) ...
-1
votes
0answers
15 views

PCA computed by GPflow and Sklearn doesn't match

I am performing PCA analysis by using Sklearn and GPflow. I noticed that the output returned by both the libraries doesn't match. Please see below the sample code snippet- ...
2
votes
1answer
50 views

Is PCA (by eigendecomposition) or SVD better in decorrelating the predictors of a machine learning model?

Is there any reason to think that SVD is better than PCA (by eigendecomposition) in decorrelating the predictors of a machine learning model?
0
votes
1answer
28 views

How to choose PCA or KernelPCA a priori?

I am learning about dimensionality reduction and I understood that one of the most used techniques in ML is PCA. If I understood correctly, I use PCA whenever I want to reduce the number of features ...
2
votes
0answers
28 views

PCA and FastICA in scikit-learn giving near identical results

So after importing my data, transforming it, and splitting into training and test sets I tried running this script for PCA: ...
1
vote
2answers
48 views

Differences between applying KMeans over PCA and applying PCA over KMeans

Short question: As stated in the title, I'm interested in the differences between applying KMeans over PCA-ed vectors and applying PCA over KMean-ed vectors. Long question: Let's suppose we have a ...
1
vote
2answers
201 views

sklearn.decomposition.PCA explained_variance_ratio_ attribute does not exist

When trying to identify the variance explained by the first two columns of my dataset using the explained_variance_ratio_ attribute of ...
0
votes
0answers
18 views

Incremental subspace learning methods

I want to learn methods for incremental subspace learning. I tried to read papers, but most of them mention incremental PCA. Since, incremental PCA involves computing eigen decomposition for every new ...
0
votes
1answer
15 views

What does it mean if a high or low number of my componenets describe a percentage of the cumulative explained variance?

In the following code run after PCA i can see that X number of components explain Y % of cumulative explained variance (CEV). I would like to know 1- What percentage of the CEV is typically ...
1
vote
1answer
32 views

Can anyone explain me the difference between Factor Anaysis and PCA?

Is PCA and Factor Analysis same? Both are used for Data dimension reduction but theoretically I am not able to find the difference between them? I did FA in SPSS to reduce number of variables in my ...
2
votes
0answers
42 views

A classification machine learning flow chart implimenting dimentionality reduction, upsampling, and cross validation [closed]

I would like to make a flow chart for an ML classifier and make sure that my thinking is correct. Here is a little about my sample: I have 3 classes and about 160 features. I suspect that some of ...
0
votes
0answers
32 views

Can I use MCA on categorical features, and PCA on numeric then combine both for learning

So all is said in the title. I have a mix of both categorical and numeric features, both are more than 20 columns and reside in the same data-set. I am using PCA solution from sklearn.decomposition ...
-1
votes
2answers
41 views

How to plot High Dimensional supervised K-means on a 2D plot chart

I'm Having a ML problem where my data set contains 80 features labelled into 3 groups (0, 1, -1). I want to plot the data on a 2D surface to see how "close" (similar) data with ...
0
votes
0answers
35 views

Does PCA need unevenly distributed data to be successful/meaningful?

I am not quite sure about these assumptions here, but if my data is evenly distributed in the feature space does that mean that PCA will have no impact on the classification result? My thought ...
2
votes
2answers
48 views

Is deduction, genetic programming, PCA, or clustering machine learning according to Tom Mitchells definition?

Tom M. Mitchell defines machine learning as A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P if its performance at tasks in T, ...
4
votes
3answers
114 views

Are dimensionality reduction techniques useful in deep learning

I have been working on machine learning and noticed that most of the time, dimensionality reduction techniques like PCA and t-SNE...
0
votes
0answers
31 views

Feature selection after performing PCA

I have a data set with 57 variables on which I am performing PCA. The PCA returns me a list of principal components, each of which is in turn a list of the loadings to be placed on my variables in a ...
2
votes
0answers
132 views

How to use SVD to reduce the dimension of test data which is not available at the time of SVD?

Usually, when both train and test data are available in the beginning, a dimensionality reduction such as Singular Value Decomposition (SVD) can be applied on both of them as one matrix. The reduced ...
0
votes
0answers
83 views

Number of clusters with eigengap method in spectral clustering

I would like to find the number of clusters for spectral clustering which I could apply to my data. I've tried eigengap technique on a cosine similarity matrix and got the following plot: The gap ...
0
votes
0answers
35 views

Is it possible to compute residual variances of Laplacian Eigenmaps, Diffusion Map and t-SNE to have a scree plots as in PCA?

I will like to do comparative analysis of PCA vs. Laplacian Eigenmaps, Diffusion Map, and <...
0
votes
1answer
58 views

Reconstructing original data points from t-SNE output

I have been trying to understand t-SNE for a while now and I have this very basic question on the comparison of PCA and t-SNE, on which I would really appreciate some help. In case of PCA suppose the ...
4
votes
2answers
259 views

Distributed PCA or an equivalent

We normally have fairly large datasets to model on, just to give you an idea: over 1M features (sparse, average population of features is around 12%); over 60M rows. A lot of modeling algorithms ...
0
votes
1answer
151 views

How to use multiple encoders(one-hot and numerical) together for PCA

I want to implement PCA on a dataset(retail) but the data is categorical. One-hot encoding on some columns like Gender, Fabric, Brand makes sense but on other features like price range, size, I would ...
0
votes
1answer
62 views

PCA - Error minimization and Variance Maximization

I'm studying the PCA algorithm and the theory behind it. I think I understood how does it work and the idea of dimension reduction of the data in order to find a new feature (component) that maximizes ...
0
votes
2answers
43 views

How can we interpret biplot?

This is not a question as such but more likely to be verification (enhancement) of my current understanding. With the thought that it may help future visitors as well, I am taking liberty to make this ...
0
votes
2answers
34 views

Does high regression coefficient for Principal components that don't explain much variance imply that my data is not a good predictor?

There isn't much to add to the question. Essentially i had some data that I reduced to 4 principal components, the first two components of which explain 99% of the variance in my data. Upon building ...
1
vote
1answer
125 views

Using PCA to cluster multidimensional data (RFM variables)

So i am performing k-means clustering on RFM variables (Recency, Frequency, Monetary). The RFM variables are in the form of quantiles (1-4). I used PCA and found the PCA components. I then used the ...
0
votes
3answers
1k views

Predictor Variable vs. Target Variable [closed]

If I find that a variable is not a predictor variable, does that mean it automatically becomes a target variable? I don't believe so because if you have 209 variables, and you find your predictor ...
2
votes
1answer
381 views

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

I have to apply PCA on a dataset, which contains both numerical and categorical values. In the preprocessing phase, I converted all the categorical values in numerical, so that the software can deal ...
2
votes
1answer
90 views

How can I apply PCA to KNN?

I want to know the do not want to how to use library I will denote a $n\times p$ data matrix by $X$, where $n<p$. That is, each row of $X$ is one sample data with $p$ feature variables. By using ...
2
votes
1answer
120 views

Sklearn Pipelines - How to carry over PCA?

I'm developing a pipeline to fit parameters for a gradient boosting classifier while also fitting the optimum number of features in a PCA model. This is the current setup: ...
5
votes
1answer
108 views

Sklearn PCA with zero components example

I'm simply trying to repeat a benchmark from the sklearn's docs. The unclear part is: n_components = np.arange(0, n_features, 5). They are applying a PCA transform ...