[{"data":1,"prerenderedAt":123},["ShallowReactive",2],{"term-p\u002Fprincipal-component-analysis":3,"related-p\u002Fprincipal-component-analysis":107},{"id":4,"title":5,"acronym":6,"body":7,"category":90,"description":91,"difficulty":92,"extension":93,"letter":16,"meta":94,"navigation":53,"path":95,"related":96,"seo":101,"sitemap":102,"stem":105,"subcategory":6,"__hash__":106},"terms\u002Fterms\u002Fp\u002Fprincipal-component-analysis.md","Principal Component Analysis",null,{"type":8,"value":9,"toc":84},"minimark",[10,15,19,23,26,30,73,77,80],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 - The Vibe Check",[16,17,18],"p",{},"PCA is a way to take data with a hundred confusing, overlapping columns and boil it down to just a handful of new super-columns that capture most of what actually matters, throwing away the redundant noise. It's like discovering that height and shoe size are basically measuring the same underlying thing, so instead of tracking both, you track one combined size score that loses barely any information.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"Principal Component Analysis is a dimensionality reduction technique that transforms a set of possibly correlated features into a smaller set of uncorrelated variables, called principal components, ordered by how much variance in the original data each one explains. It's commonly used to compress high-dimensional data before modeling, speed up training, visualize data in two or three dimensions, and reduce noise from correlated features.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from sklearn.decomposition import PCA\n\npca = PCA(n_components=2)\nX_reduced = pca.fit_transform(X)\nprint(pca.explained_variance_ratio_)  # how much info each component keeps\n","python","",[38,39,40,48,55,61,67],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,47],{},"from sklearn.decomposition import PCA\n",[41,49,51],{"class":43,"line":50},2,[41,52,54],{"emptyLinePlaceholder":53},true,"\n",[41,56,58],{"class":43,"line":57},3,[41,59,60],{},"pca = PCA(n_components=2)\n",[41,62,64],{"class":43,"line":63},4,[41,65,66],{},"X_reduced = pca.fit_transform(X)\n",[41,68,70],{"class":43,"line":69},5,[41,71,72],{},"print(pca.explained_variance_ratio_)  # how much info each component keeps\n",[11,74,76],{"id":75},"when-youll-hear-this","When You'll Hear This",[16,78,79],{},"\"We ran PCA down to 20 components and kept 95% of the variance, training got way faster.\" \u002F \"Plot the first two principal components, it's the fastest way to eyeball whether the classes even separate.\"",[81,82,83],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":50,"depth":50,"links":85},[86,87,88,89],{"id":13,"depth":50,"text":14},{"id":21,"depth":50,"text":22},{"id":28,"depth":50,"text":29},{"id":75,"depth":50,"text":76},"ai","PCA is a way to take data with a hundred confusing, overlapping columns and boil it down to just a handful of new super-columns that capture most of what a...","advanced","md",{},"\u002Fterms\u002Fp\u002Fprincipal-component-analysis",[97,98,99,100],"K-Means","Feature Engineering","Embedding","Machine Learning",{"title":5,"description":91},{"changefreq":103,"priority":104},"weekly",0.7,"terms\u002Fp\u002Fprincipal-component-analysis","nS4H2bMi0MApOf_4RjNzjK50SuvE_4qicBZzE2RANBA",[108,112,115,118],{"title":99,"path":109,"acronym":6,"category":90,"difficulty":110,"description":111},"\u002Fterms\u002Fe\u002Fembedding","intermediate","An embedding is turning words, sentences, or entire documents into lists of numbers (vectors) that capture their meaning.",{"title":98,"path":113,"acronym":6,"category":90,"difficulty":110,"description":114},"\u002Fterms\u002Ff\u002Ffeature-engineering","Feature engineering is the unglamorous, hugely important work of turning raw, messy real-world data into the specific columns a model can actually learn fr...",{"title":97,"path":116,"acronym":6,"category":90,"difficulty":110,"description":117},"\u002Fterms\u002Fk\u002Fk-means","K-Means is a clustering algorithm that groups your data into a set number of buckets without ever being told what the buckets should mean.",{"title":100,"path":119,"acronym":120,"category":90,"difficulty":121,"description":122},"\u002Fterms\u002Fm\u002Fmachine-learning","ML","beginner","Machine Learning is teaching a computer by showing it thousands of examples instead of writing out every rule.",1792528109957]