Do predictive variables need to be standardised before applying PCA in classification learner?

4 次查看(过去 30 天)
Hi,
I have a feature table and I'm looking to apply PCA in classification learner. Do I need to first standardise my feature table before I import the data into classification learner to apply PCA and train models?
Reason I ask is that if I want to perform PCA e.g. in the live editor, it is usually recommended to standardise data using the zscore function and then apply PCA to generate pareto, biplots etc. However, the classification learner doesn't seem to do this. Additionally, when I look at the fisheriris dataset examples in the help files, it looks like the data is not standardised before being imported to the classification learner (https://uk.mathworks.com/help/stats/feature-selection-and-feature-transformation.html).
Any guidance will be really appreciated!

采纳的回答

Taylor
Taylor 2024-4-16
Yes, it is generally recommended to standardize data before applying PCA, especially when the variables in your dataset are measured on different scales or have different units of measurement.
Standardization transforms the data to have a mean of zero and a standard deviation of one. This process ensures that each variable contributes equally to the analysis and prevents variables with larger scales from dominating the variance explained by the principal components.
Skipping the step of standardization when applying PCA might be appropriate or necessary in certain contexts. In the case of the fisheriris dataset, it is because the data has homogeneous units and scales. If all variables in your dataset are measured in the same units and have approximately the same scale and variance, standardization might not be necessary. In such cases, the original scales of the variables are meaningful, and preserving these scales might be important for interpretation. For example, if all variables are measurements of length in centimeters, standardizing would remove this common scale, potentially making the results less interpretable.
  2 个评论
Impala
Impala 2024-4-16
Hi Taylor,
Thank you for your explanation. So if I standardise my feature table using zscore, and create a new feature table, say called featTable_stand - is that the table I then use in classification learner to train models?
Thank you!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dimensionality Reduction and Feature Extraction 的更多信息

产品


版本

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by