Skip to content

Commit

Permalink
adding todays lecture
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalab committed Dec 2, 2024
1 parent 5cc71e7 commit b20c74e
Show file tree
Hide file tree
Showing 53 changed files with 1,064 additions and 1,169 deletions.
12 changes: 6 additions & 6 deletions docs/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -10305,8 +10305,8 @@
"objectID": "slides/highdim/35-dimension-reduction.html#dimension-reduction",
"href": "slides/highdim/35-dimension-reduction.html#dimension-reduction",
"title": "Dimension Reduction",
"section": "",
"text": "A typical machine learning task involves working with a large number of predictors which can make data analysis challenging.\nFor example, to compare each of the 784 features in our predicting digits example, we would have to create 306,936 scatterplots.\nCreating one single scatterplot of the data is impossible due to the high dimensionality."
"section": "Dimension reduction",
"text": "Dimension reduction\n\nA typical machine learning task involves working with a large number of predictors which can make data analysis challenging.\nFor example, to compare each of the 784 features in our predicting digits example, we would have to create 306,936 scatterplots.\nCreating one single scatterplot of the data is impossible due to the high dimensionality."
},
{
"objectID": "slides/highdim/35-dimension-reduction.html#dimension-reduction-1",
Expand Down Expand Up @@ -10509,7 +10509,7 @@
"href": "slides/highdim/35-dimension-reduction.html#linear-transformations-10",
"title": "Dimension Reduction",
"section": "Linear transformations",
"text": "Linear transformations\n\nNote that in this case\n\n\\[\n\\begin{pmatrix}\n\\cos \\theta&-\\sin \\theta\\\\\n\\sin \\theta&\\cos \\theta\n\\end{pmatrix} =\n\\mathbf{A}^\\top\n\\]\nwhich implies\n\\[\n\\mathbf{Z} \\mathbf{A}^\\top = \\mathbf{X} \\mathbf{A}\\mathbf{A}^\\top\\ = \\mathbf{X}\n\\]\nand therefore that \\(\\mathbf{A}^\\top\\) is the inverse of \\(\\mathbf{A}\\).\n\n\n\n\n\n\n\nNote\n\n\n\n\nRemember that we represent the rows of a matrix as column vectors.\nThis explains why we use \\(\\mathbf{A}\\) when showing the multiplication for the matrix \\(\\mathbf{Z}=\\mathbf{X}\\mathbf{A}\\), but transpose the operation when showing the transformation for just one observation: \\(\\mathbf{z}_i = \\mathbf{A}^\\top\\mathbf{x}_i\\)."
"text": "Linear transformations\n\nNote that in this case\n\n\\[\n\\begin{pmatrix}\n\\cos \\theta&-\\sin \\theta\\\\\n\\sin \\theta&\\cos \\theta\n\\end{pmatrix} =\n\\mathbf{A}^\\top\n\\]\nwhich implies\n\\[\n\\mathbf{Z} \\mathbf{A}^\\top = \\mathbf{X} \\mathbf{A}\\mathbf{A}^\\top\\ = \\mathbf{X}\n\\]\nand therefore that \\(\\mathbf{A}^\\top\\) is the inverse of \\(\\mathbf{A}\\)."
},
{
"objectID": "slides/highdim/35-dimension-reduction.html#linear-transformations-11",
Expand Down Expand Up @@ -10971,7 +10971,7 @@
"href": "slides/highdim/35-dimension-reduction.html#principal-component-analysis-8",
"title": "Dimension Reduction",
"section": "Principal Component Analysis",
"text": "Principal Component Analysis\n\nThe two groups can be clearly observed with the one dimension:\n\n\n\n\n\n\n\n\n\n\n\nBetter than with any of the two original dimensions."
"text": "Principal Component Analysis\n\nThe two groups can be clearly observed with the one dimension:\n\n\n\nBetter than with any of the two original dimensions."
},
{
"objectID": "slides/highdim/35-dimension-reduction.html#principal-component-analysis-9",
Expand Down Expand Up @@ -11006,7 +11006,7 @@
"href": "slides/highdim/35-dimension-reduction.html#principal-component-analysis-13",
"title": "Dimension Reduction",
"section": "Principal Component Analysis",
"text": "Principal Component Analysis\n\nFor a multidimensional matrix with \\(p\\) columns, we can find an orthogonal transformation \\(\\mathbf{A}\\) that preserves the distance between rows, but with the variance explained by the columns in decreasing order.\nIf the variances of the columns \\(\\mathbf{Z}_j\\), \\(j>k\\) are very small, these dimensions have little to contribute to the distance calculation and we can approximate the distance between any two points with just \\(k\\) dimensions.\nIf \\(k\\) is much smaller than \\(p\\), then we can achieve a very efficient summary of our data.\n\n\n\n\n\n\n\n\nWarning\n\n\n\n\nNotice that the solution to this maximization problem is not unique because \\(||\\mathbf{X} \\mathbf{v}|| = ||-\\mathbf{X} \\mathbf{v}||\\).\nAlso, note that if we multiply a column of \\(\\mathbf{A}\\) by \\(-1\\), we still represent \\(\\mathbf{X}\\) as \\(\\mathbf{Z}\\mathbf{V}^\\top\\) as long as we also multiple the corresponding column of \\(\\mathbf{V}\\) by -1.\nThis implies that we can arbitrarily change the sign of each column of the rotation \\(\\mathbf{V}\\) and principal component matrix \\(\\mathbf{Z}\\)."
"text": "Principal Component Analysis\n\nFor a multidimensional matrix with \\(p\\) columns, we can find an orthogonal transformation \\(\\mathbf{A}\\) that preserves the distance between rows, but with the variance explained by the columns in decreasing order.\nIf the variances of the columns \\(\\mathbf{Z}_j\\), \\(j>k\\) are very small, these dimensions have little to contribute to the distance calculation and we can approximate the distance between any two points with just \\(k\\) dimensions.\nIf \\(k\\) is much smaller than \\(p\\), then we can achieve a very efficient summary of our data."
},
{
"objectID": "slides/highdim/35-dimension-reduction.html#principal-component-analysis-14",
Expand Down Expand Up @@ -11139,7 +11139,7 @@
"href": "slides/highdim/35-dimension-reduction.html#dimensions-approximation-1",
"title": "Dimension Reduction",
"section": "200 dimensions approximation",
"text": "200 dimensions approximation\n\n\n── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──\n✔ dplyr 1.1.4 ✔ readr 2.1.5\n✔ forcats 1.0.0 ✔ stringr 1.5.1\n✔ lubridate 1.9.3 ✔ tibble 3.2.1\n✔ purrr 1.0.2 ✔ tidyr 1.3.1\n── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──\n✖ dplyr::combine() masks gridExtra::combine()\n✖ dplyr::count() masks matrixStats::count()\n✖ dplyr::filter() masks stats::filter()\n✖ dplyr::lag() masks stats::lag()\n✖ dplyr::select() masks MASS::select()\nℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors"
"text": "200 dimensions approximation"
},
{
"objectID": "slides/highdim/35-dimension-reduction.html#dimensions-approximation-2",
Expand Down
Loading

0 comments on commit b20c74e

Please sign in to comment.