๐๐จ๐ฐ ๐๐จ๐๐ฌ ๐๐๐ ๐ฆ๐๐ง๐ฎ๐๐ฅ๐ฅ๐ฒ ๐๐จ๐ฆ๐ฉ๐ฎ๐ญ๐? ๐๐ง๐ ๐๐ก๐ฒ ๐๐ก๐จ๐ฎ๐ฅ๐ ๐๐ ๐๐ง๐จ๐ฐ ๐๐ญ?
In data science, machine learning, and statistics, Principal Component Analysis (PCA) is a dimensionality-reduction method often used to reduce the dimensionality of large data sets by transforming a large set of variables into a smaller one that still contains most of the information in the large set.
Reducing the number of variables in a data set naturally comes at the expense of accuracy. Still, the trick in dimensionality reduction is to trade a little accuracy for simplicity. Smaller data sets are easier to explore and visualize, making analyzing data much easier and faster for machine learning algorithms without extraneous variables to process.
PCA finds directions for the maximal variance of the data. It finds mutually orthogonal directions. Mutually orthogonal means it's a global algorithm. Global means that all the directions and all the new features they find have a significant global constraint, namely that they must be mutually orthogonal.
Letโs see how we can manually compute PCA given some random table of values (see the illustration)
๐บ๐๐๐ 1: Standardize the dataset.
๐บ๐๐๐ 2: Calculate the covariance matrix for the features in the dataset.
๐บ๐๐๐ 3: Calculate the eigenvalues and eigenvectors for the covariance matrix.
๐บ๐๐๐ 4: Sort eigenvalues and their corresponding eigenvectors.
๐บ๐๐๐ 5: Calculate eigenvector for each eigenvalue using Cramerโs rule
๐บ๐๐๐ 6: Build eigenvectors matrix
๐บ๐๐๐ 7: Pick k eigenvalues and form a matrix of eigenvectors.
๐บ๐๐๐ 8: Transform the original matrix.
๐๐ง๐จ๐ฐ๐ข๐ง๐ ๐ก๐จ๐ฐ ๐ญ๐จ ๐๐จ๐ฆ๐ฉ๐ฎ๐ญ๐ ๐๐๐ ๐ฆ๐๐ง๐ฎ๐๐ฅ๐ฅ๐ฒ ๐๐๐ง ๐๐ ๐๐ฌ๐ฌ๐๐ง๐ญ๐ข๐๐ฅ ๐๐จ๐ซ ๐ฌ๐๐ฏ๐๐ซ๐๐ฅ:
โธ Conceptual understanding enhances your grasp of the underlying mathematical principles.
โธ Sometimes, we may need to customize the PCA process to suit specific requirements or constraints. Manual computation enables us to adapt PCA and adjust it to ๐จ๐ฎ๐ซ needs as necessary.
โธ Understanding the inner workings of PCA through manual computation can enhance our problem-solving skills in data analysis and dimensionality reduction. We will be better equipped to tackle complex data-related challenges.
โธ A solid grasp of manual PCA can be a foundation for understanding ๐ฆ๐จ๐ซ๐ ๐๐๐ฏ๐๐ง๐๐๐ ๐๐ข๐ฆ๐๐ง๐ฌ๐ข๐จ๐ง๐๐ฅ๐ข๐ญ๐ฒ ๐ซ๐๐๐ฎ๐๐ญ๐ข๐จ๐ง ๐ญ๐๐๐ก๐ง๐ข๐ช๐ฎ๐๐ฌ and related machine learning and data analysis methods.
โธ Manual computation can be a valuable educational tool if we teach or learn about PCA. It allows instructors and students to see how PCA works from a foundational perspective.
In data science, machine learning, and statistics, Principal Component Analysis (PCA) is a dimensionality-reduction method often used to reduce the dimensionality of large data sets by transforming a large set of variables into a smaller one that still contains most of the information in the large set.
Reducing the number of variables in a data set naturally comes at the expense of accuracy. Still, the trick in dimensionality reduction is to trade a little accuracy for simplicity. Smaller data sets are easier to explore and visualize, making analyzing data much easier and faster for machine learning algorithms without extraneous variables to process.
PCA finds directions for the maximal variance of the data. It finds mutually orthogonal directions. Mutually orthogonal means it's a global algorithm. Global means that all the directions and all the new features they find have a significant global constraint, namely that they must be mutually orthogonal.
Letโs see how we can manually compute PCA given some random table of values (see the illustration)
๐บ๐๐๐ 1: Standardize the dataset.
๐บ๐๐๐ 2: Calculate the covariance matrix for the features in the dataset.
๐บ๐๐๐ 3: Calculate the eigenvalues and eigenvectors for the covariance matrix.
๐บ๐๐๐ 4: Sort eigenvalues and their corresponding eigenvectors.
๐บ๐๐๐ 5: Calculate eigenvector for each eigenvalue using Cramerโs rule
๐บ๐๐๐ 6: Build eigenvectors matrix
๐บ๐๐๐ 7: Pick k eigenvalues and form a matrix of eigenvectors.
๐บ๐๐๐ 8: Transform the original matrix.
๐๐ง๐จ๐ฐ๐ข๐ง๐ ๐ก๐จ๐ฐ ๐ญ๐จ ๐๐จ๐ฆ๐ฉ๐ฎ๐ญ๐ ๐๐๐ ๐ฆ๐๐ง๐ฎ๐๐ฅ๐ฅ๐ฒ ๐๐๐ง ๐๐ ๐๐ฌ๐ฌ๐๐ง๐ญ๐ข๐๐ฅ ๐๐จ๐ซ ๐ฌ๐๐ฏ๐๐ซ๐๐ฅ:
โธ Conceptual understanding enhances your grasp of the underlying mathematical principles.
โธ Sometimes, we may need to customize the PCA process to suit specific requirements or constraints. Manual computation enables us to adapt PCA and adjust it to ๐จ๐ฎ๐ซ needs as necessary.
โธ Understanding the inner workings of PCA through manual computation can enhance our problem-solving skills in data analysis and dimensionality reduction. We will be better equipped to tackle complex data-related challenges.
โธ A solid grasp of manual PCA can be a foundation for understanding ๐ฆ๐จ๐ซ๐ ๐๐๐ฏ๐๐ง๐๐๐ ๐๐ข๐ฆ๐๐ง๐ฌ๐ข๐จ๐ง๐๐ฅ๐ข๐ญ๐ฒ ๐ซ๐๐๐ฎ๐๐ญ๐ข๐จ๐ง ๐ญ๐๐๐ก๐ง๐ข๐ช๐ฎ๐๐ฌ and related machine learning and data analysis methods.
โธ Manual computation can be a valuable educational tool if we teach or learn about PCA. It allows instructors and students to see how PCA works from a foundational perspective.
๐1
Hi All
Welcome to GeekyCodes. Thank you for 500 members in this group. Join our channel for latest Programming Blogs,Job Openings at various organizations and machine learning blogs.
In case you've any doubt regarding ML/Data Science please reach out to me @ved1104
Welcome to GeekyCodes. Thank you for 500 members in this group. Join our channel for latest Programming Blogs,Job Openings at various organizations and machine learning blogs.
In case you've any doubt regarding ML/Data Science please reach out to me @ved1104
๐1
1705473469811_e_1706140800_v_beta_t_KKLQzyvAqr45ypFci1UN4wIFa02
316.2 KB
Why we can never fully optimize
ML models
ML models