# Alex Toon - Week 6 - Write up
# Quiz
## Question 1 - Variance Explained
The first column of $V$ indicates that the prevalence of "America" and "American" equally contribute to 83% of the variance from the original data. So, if we were to create a column that was just the sum of the two counts, this column (multiplied by a constant, say) would retain 83% of the variance in the data, $A$.
### Correct Answer: TRUE
### Explanation:
The first principal component explains the 83% of the total variance where $σ_j$ are the sigular values of the mean-centered matrix $A$. If we just take all of our points and project them onto the axis, then we get points along our principal components that have the highest variance.
If the loadings of "America" and "american" in $V_1$ are nearly equal and the same sign, then projecting onto $V_1$ is essentially a scaled equal weight sum of those two columns, so that 1-D representation retains about 83% of the total variance.
because.... 
n = df_A.shape[0]
av.var(ddof=1, axis=0) * (n - 1)
## Question 2 - The Gram Matrix
For any matrix $A$,$A^⊤$ $A$ will always contain positive eigenvalues, so singular values of $A$ will always be strictly positive.
### Correct Answer: FALSE
### Explanation:
The values in $A$ doesn't "always" have to contain positive eigenvalues. It is possible for it to have zero eigenvalues if A were to be squashed. Zero eigenvalues in $A^T A$ mean zero singular values in $A$. Having ONLY positive values would require $A$ has a full column rank.
## Question 3 - Singular Value / Explained Variance
Each singular value of $D$ corresponds to a column of $D$. So, the smallest singular value (approximately 1.08) indicates a term that explains the smallest amount of variance in the data.
### Correct Answer: FALSE
### Explanation:
In the single value di $D = UΣV^T$, each singular value pairs with a linear combination of terms (or a transformation), not a single original column or term. The smallest singular value marks the least important component, not a specific least important term.
## Question 4 - Principal Axis Projection
The column values in $AV$ correspond to the same x-y axes (i.e., the labeled tick-marks) on the plotted scatterplot called "Data and Eigenvectors".
### Correct Answer: FALSE
### Explanation:
The columns in $AV$ do not NOT correspond to the same x-y axes on the scatterplot.

The columns of $AV$ are principal component scores, not coordinates in the axes used by the scatterplot. The plot shows data from the variables America/American, with the eigenvectors shown as arrows inside the original axis system. The tick marks on the plot are not the principal component scores from $AV$
## Question 5 - Image Matrix
If the image matrix is called $M$, then the "Variance Explained ..." plot can be generated using only eigenvalues of $M^⊤ M$ or $MM^⊤$.
### Correct Answer: TRUE
### Explanation:
The eigenvalues of either matrix are just the $σ^\frac 2 j$. The plot for variance explained is those $σ^\frac 2 j$ normalised by their sum.
## Question 6 - Truncated SVD
The Truncated SVD for any matrix $M$ will always reconstruct a different matrix than the original matrix.
### Correct Answer: FALSE
### Explanation:
This is not true due to the 'always' in the question. If you were to only truncate the linear dependent columns, keeping the top $k$ singular values, and remain full rank, you would not lose unrecoverable information in the truncation process that would prevent you from reconstructing the original matrix.
## Question 7 - Truncated SVD Reduction
Applying Truncated SVD can reduce the rank of an image-matrix.
### Correct Answer: TRUE
### Explanation:
Truncation zeroes out the smaller singular values, so the matrix would drop to a lower rank, resulting in a fewer effective components, which gives it's compression.
## Question 8 - Image Compression
The fidelity (or "accuracy") of a compressed image depends on $k$, and after a certain point, increasing $k$ has diminishing returns.
### Correct Answer: TRUE
### Explanation:
As $k$ grows, you add smaller tail terms $σ^\frac 2 j$ so the numerator increases by tiny amounts, hence diminishing returns in image clarity. Early components add the bulk of the information while the later components just add finer detail.
# General Notes
- The **Explained Variance Ratio**
indicates the proportion of the total variance captured in or "explained by" each principal component. It provides insight into the "significance" of each component in capturing the variability within the dataset. This is calculated by dividing each eigenvalue by the sum of all the eigenvalues.
# Survey write up
- Explain what learning method worked best for you this week, and give an example for evidence of this. Share the concept you were learning, and explain what finally made it click.
(Think about moments where you might have thought to yourself "Ah hah!" or "Eureka, I've got it!".)
- The usual theme but still helps me is addition videos that are more visual, this week being "visual kernal" videos. - Re-watching the key videos BEFORE watching the lecture videos was again key. This week was more difficult as the topic isn't covered well on Brilliant.org platform i use.
- Think about the learning activities you did this week (e.g., taking notes while watching lecture, working through an exercise in a certain way, listening to music while you work, etc.).
Give an example of a specific learning activity that was LEAST helpful in improving your knowledge. What other learning strategies might work better for this in the future? What could you do differently?
- Going straight in the lecture material would be the least effective. I need to understand the intuition and visuals first. Start with visual videos -> Brilliant.org (if available for the topic) -> Lecture material. Again, I would not say any of them were unhelpful, but just this seems to be a good order to reinforce.
- Explain why you chose the letter evaluation you did.
- M - Again, between the lecture, videos and my usual reinforcement - I kept close to the scope of the material provided.
- How did you improve on suggestions given to you by AI tools (e.g., ChatGPT, Gemini, etc.)? Give examples, and explain why those changes needed to be made.
- I continue to use ChatGPT/AI to create flash cards and multiple choice quiz's to test my knowledge or by by writing out in sentences what I think a phrase means and it can guide me from there.