# Does PCA decrease the feature on my Data set or just decrease the dimension?

I'm new in AI and sorry if my question is simple. I have a data set and want to use PCA to decrease the feature but after some research on the internet I'm confused about decreasing dimensions and features.

As an example I have a data set with 50 rows and 10 columns, if I use PCA it will reduce a data set with 50x5 (as an example) or 50x10 and just removed some dimensions?

I want to do it in MATLAB and want to use PCA function and don't want to write PCA function by myself.

What is the PCA parameters in MATLAB to decrease the feature? It's a lot of parameters and confused me.

• My answer referenced parts of your question that you edited out, and I don't know what you want answered in the edited question. Apr 23, 2019 at 19:43

coeff = pca(X) returns the principal component coefficients, also known as loadings, for the $$n$$-by-$$p$$ data matrix X. Rows of X correspond to observations and columns correspond to variables. The coefficient matrix is $$p$$-by-$$p$$. Each column of coeff contains coefficients for one principal component, and the columns are in descending order of component variance. By default, pca centers the data and uses the singular value decomposition (SVD) algorithm.
The values in coef represent the transformation from the original features (rows of coef) to the principal components (columns of coef). You'll want to keep only the first $$k$$ columns, then multiply your data matrix by this matrix.