1. Home
  2. Explore
  3. Computer Science
  4. Unsupervised Machine Learning

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Unsupervised Machine Learning

  • 44Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Unsupervised vs Supervised
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What is the main difference between supervised and unsupervised learning?

Tap to flipClick to flipspace

In supervised learning, there is a response variable yyy used to predict or detect associations from data xxx. In unsupervised learning, there is no response yyy; we only have xxx and aim to identify patterns or signal.

Or swipe the card

44 cards

  1. What is the main difference between supervised and unsupervised learning?

    In supervised learning, there is a response variable yyy used to predict or detect associations from data xxx. In unsupervised learning, there is no response yyy; we only have xxx and aim to identify patterns or signal.

  2. Why is unsupervised learning used in exploratory data analysis?

    It helps in data wrangling, data visualization, and hypothesis generation. It is often part of the initial exploration to discover patterns and generate ideas for further confirmatory analysis.

  3. What is the danger of generating and testing hypotheses on the same dataset in unsupervised learning?

    The findings remain exploratory and may not be reproducible. To ensure reproducibility, hypotheses should be validated on independent data or through cross-validation on a held-out set.

  4. What are the two main classes of unsupervised learning methods discussed in the lecture?

    Clustering techniques and dimension reduction methods.

  5. What is the objective of clustering?

    To group objects into meaningful clusters such that objects within a cluster are more similar to each other than to objects in other clusters.

  6. Why is the definition of clustering considered vague?

    Different definitions of 'meaningful clusters' and different notions of similarity can lead to different numbers and types of clusters (e.g., 2, 4, or 6 clusters from the same data).

  7. What are the three options for what to cluster in a dataset?

    Clustering observations, clustering features, or biclustering (clustering both observations and features simultaneously).

  8. What is a dendrogram in hierarchical clustering?

    A tree structure that shows a sequence of nested clusters, formed by merging (bottom-up) or splitting (top-down) clusters at various distances.

  9. What two pieces of information are needed to create a dendrogram?

    A measure of distance (or similarity) between observations, and a linkage function to measure distance between clusters.

  10. Define single, complete, and average linkage functions.

    Single linkage: distance between clusters is the minimum distance between any two points in the clusters. Complete linkage: maximum distance. Average linkage: average of all pairwise distances.

  11. When does single linkage clustering perform best?

    When there are few outliers and the data is not noisy. It can identify clusters with diverse (non-spherical) shapes.

  12. What is a disadvantage of single linkage clustering in high dimensions?

    It often exhibits 'chaining' behavior, where clusters are formed by adding one observation at a time, resulting in poor cluster separation (e.g., in NCI60 data).

  13. When are complete and average linkage more appropriate?

    When data has outliers or noise, and clusters are roughly spherical and comparable in size.

  14. How should the dendrogram be interpreted regarding the horizontal axis?

    The horizontal axis is not informative; the ordering of leaves is arbitrary. Only the vertical axis (height) indicates the distance between merged clusters.

  15. How do you determine the number of clusters from a dendrogram?

    Look for gaps in the fusion heights; cut the tree at a height where there is a large jump in distance. This yields a natural number of clusters.

  16. What is a major disadvantage of hierarchical clustering?

    It does not correspond to a formal optimization criterion; the final clustering is chosen arbitrarily by the analyst, and different linkage functions can give different results.

  17. Describe the k-means clustering algorithm.

    1. Randomly assign each observation to one of kkk clusters. 2. Calculate cluster centroids (means). 3. Reassign each observation to the nearest centroid. 4. Repeat steps 2 and 3 until assignments no longer change.
  18. What is a key requirement for k-means clustering (the user must specify)?

    The number of clusters kkk must be chosen a priori.

  19. What type of cluster shapes does k-means work best for?

    Compact, spherical clusters of roughly comparable size.

  20. What problem can occur with k-means clustering in the presence of outliers?

    It may produce small, empty clusters. A remedy is to remove empty clusters and refit the algorithm.

  21. How can you choose the number of clusters kkk in k-means?

    Use the 'elbow method': plot the within-cluster sum of squares (or another objective) against kkk and look for a point where the decrease flattens out. Alternatively, validate using downstream supervised analysis.

  22. What is the goal of dimension reduction methods?

    To find a low-dimensional representation of the data that retains the most important features (e.g., for visualization, noise reduction, or improving supervised learning).

  23. What is the main idea behind Principal Component Analysis (PCA)?

    PCA finds a lower-dimensional representation by projecting the data onto directions (principal components) that capture the maximum variance.

  24. How are principal components defined mathematically?

    Each principal component is a linear combination zj=wj1x1+wj2x2+⋯+wjpxpz_j = w_{j1}x_1 + w_{j2}x_2 + \dots + w_{jp}x_pzj​=wj1​x1​+wj2​x2​+⋯+wjp​xp​ of the original features, chosen to maximize variance subject to orthogonality constraints.

  25. What is a biplot in PCA?

    A plot that shows both the observations (as points) and the original variables (as arrows) in the space of the first two principal components, helping to interpret the loadings and relationships.

  26. Give an example of how PCA is used in biomedical data analysis.

    To correct for batch effects, study population stratification in GWAS, or explore patterns of human migration.

  27. How can you choose the number of principal components to retain?

    Consider the cumulative variance explained or use cross-validation in a supervised pipeline (e.g., principal component regression) to select the number that gives best prediction performance.

  28. What is the purpose of scaling or centering data before clustering or PCA?

    Preprocessing steps like centering (subtracting the mean) and scaling (dividing by standard deviation) can significantly affect results because they change the relative importance of features.

  29. Why is it difficult to evaluate the performance of a clustering algorithm?

    There is no single correct answer; clusters can have arbitrary shapes and sizes, and the true structure is unknown. Validation often requires external data or downstream analysis.

  30. How can unsupervised learning be validated when there is no outcome variable?

    Apply the same unsupervised method to an independent dataset and check if similar patterns (e.g., clusters) are found. Alternatively, use the clustering in a downstream supervised task and validate that task.

  31. What caution should be taken when interpreting results from unsupervised learning?

    Without external validation, findings may be artifacts of the data and not generalizable. They should be considered exploratory, not confirmatory.

  32. How does the choice of distance metric affect clustering?

    Different distance metrics (Euclidean, Manhattan, etc.) emphasize different aspects of similarity and can lead to different clusterings. There is no single best metric; the appropriate choice depends on the data.

  33. What is the 'chaining' behavior in single linkage clustering?

    A tendency to add one observation at a time to an existing cluster, forming long, chain-like clusters rather than compact groups. This is especially problematic in high dimensions.

  34. In the NCI60 example, why did single linkage perform poorly?

    Due to high dimensionality and noise, single linkage produced a chaining pattern with no clear cluster separation, while complete and average linkage gave somewhat better but still imperfect separation.

  35. What is the main advantage of k-means over hierarchical clustering?

    It has a clear optimization criterion (minimizing within-cluster sum of squares) and is computationally efficient for large datasets.

  36. What is a major disadvantage of k-means compared to hierarchical clustering?

    It does not produce a hierarchy of clusters; changing kkk completely changes the partition, and it is sensitive to initial random assignments.

  37. How does PCA help in correcting batch effects?

    By identifying principal components that capture non-biological variation (e.g., batch), those components can be removed or adjusted for, leaving data that reflects true biological signals.

  38. In PCA, what does the first principal component represent?

    The direction in the feature space along which the data has the largest variance.

  39. What does it mean that principal components are orthogonal?

    Each subsequent principal component is uncorrelated with (perpendicular to) all previous ones, ensuring that they capture variance not already explained.

  40. Why is PCA considered a 'rotation' of the data?

    It transforms the original coordinate system into a new one where the axes (PCs) are aligned with the directions of maximum variance. The new axes are rotated relative to the original features.

  41. What is principal component regression (PCR)?

    A method that first applies PCA to obtain a lower-dimensional representation, then uses regression or classification on the principal components to predict an outcome.

  42. Why can't PCR be used to find associations between original features and the outcome?

    Each principal component is a linear combination of all original features, so the regression coefficients do not directly correspond to individual features.

  43. In the US arrests example, what did the biplot reveal about the second principal component?

    It contrasted assault and murder (negative loadings) against urban population and rape (positive loadings), separating states with high violent crime from those with high property crime and urbanization.

  44. What general advice is given for selecting tuning parameters (like kkk in k-means or number of PCs)?

    When possible, use cross-validation within a supervised learning pipeline (e.g., PCR) to choose the parameter that optimizes prediction performance on held-out data.

Card 1 of 44
Card 1 of 44

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent