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

  • 26Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Introduction to Unsupervised Learning

What is the fundamental difference between supervised and unsupervised machine learning?

26 questions

  1. 1

    What is the fundamental difference between supervised and unsupervised machine learning?

    Model answer

    In supervised learning, we have a data matrix XXX and a response vector YYY to predict or detect associations, whereas in unsupervised learning we have only the data matrix XXX with no response variable.

    Explanation

    The presence or absence of the response variable YYY distinguishes the two paradigms: supervised uses YYY for prediction/classification, unsupervised seeks patterns without YYY.

  2. 2

    List three common uses of unsupervised learning in the data analysis pipeline.

    Model answer

    Exploratory data analysis (including data visualization and data wrangling), generating new hypotheses, and in conjunction with supervised learning techniques (e.g., principal component regression).

    Explanation

    Unsupervised learning is used early in analysis to explore data, later to generate testable hypotheses, and sometimes combined with supervised methods to improve performance.

  3. 3

    Why is it important to validate unsupervised learning results on independent data or held-out datasets?

    Model answer

    To ensure reproducibility; without external validation, findings may be spurious patterns driven by the same data used to generate hypotheses.

    Explanation

    Using the same data for hypothesis generation and testing inflates false discovery; independent validation (e.g., cross-validation) is needed for credible conclusions.

  4. 4

    Define the objective of clustering.

    Model answer

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

    Explanation

    This is a somewhat vague definition because 'meaningful' and 'similar' depend on the chosen criteria and distance measures.

  5. 5

    What are the three types of clustering based on what is being clustered?

    Model answer

    Clustering observations, clustering features, and clustering both observations and features simultaneously (bi-clustering).

    Explanation

    Observations (e.g., patients) are most commonly clustered; features (e.g., genes) can be clustered to find functional groups; bi-clustering does both.

  6. 6

    Describe the output of hierarchical clustering and what a dendrogram represents.

    Model answer

    Hierarchical clustering produces a dendrogram, a tree showing a sequence of nested clusters where leaves are individual observations and branches represent merged clusters.

    Explanation

    The dendrogram organizes observations into a hierarchy; closer fusions indicate greater similarity.

  7. 7

    Explain the two main approaches to building a hierarchical clustering tree.

    Model answer

    Bottom-up (agglomerative) starts with each observation as its own cluster and merges until one cluster remains; top-down (divisive) starts with one cluster and splits recursively until each observation is separate.

    Explanation

    Both produce dendrograms; agglomerative is more common and discussed in the lecture.

  8. 8

    What is a linkage function in hierarchical clustering?

    Model answer

    A measure of dissimilarity between two clusters, used to decide which clusters to merge.

    Explanation

    Common choices include single, complete, and average linkage, each defining inter-cluster distance differently.

  9. 9

    Compare single, complete, and average linkage in terms of robustness to outliers and cluster shape sensitivity.

    Model answer

    Single linkage can identify non-spherical clusters but is sensitive to outliers/noise; complete and average linkage are more robust to outliers but assume roughly spherical, comparable-sized clusters.

    Explanation

    Single linkage uses minimum distance, making it prone to chaining with outliers; complete and average use maximum or mean distance, which are less affected by distant points.

  10. 10

    What is the 'chaining behavior' of single linkage clustering in high dimensions?

    Model answer

    Single linkage tends to add one observation at a time to the existing cluster, forming a long chain rather than distinct groups, due to noise in high-dimensional data.

    Explanation

    This makes single linkage ineffective for many high-dimensional biomedical datasets.

  11. 11

    How should the vertical and horizontal axes of a dendrogram be interpreted?

    Model answer

    The vertical axis indicates the dissimilarity (height) at which clusters are merged; early (low) fusions show high similarity. The horizontal axis has no meaningful order.

    Explanation

    The leaves can be reordered arbitrarily; only the vertical heights and topology matter.

  12. 12

    What is the main drawback of k-means clustering compared to hierarchical clustering?

    Model answer

    K-means does not produce a hierarchy of clusters; changing the number of clusters kkk can completely reassign memberships with no nesting relationship.

    Explanation

    Hierarchical clustering yields nested clusters for any cut, but k-means partitions are independent for different kkk.

  13. 13

    Describe the k-means clustering algorithm.

    Model answer

    Step 1: randomly assign observations to kkk clusters. Step 2: calculate cluster centroids (means). Step 3: reassign each observation to the nearest centroid. Repeat steps 2-3 until assignments stabilize.

    Explanation

    This iterative algorithm finds a local optimum for the objective of minimizing within-cluster sum of squares.

  14. 14

    What types of clusters does k-means work best for, and what problem can occur?

    Model answer

    K-means works best for compact, spherical clusters of roughly equal size. It may produce empty clusters, especially with outliers, which can be removed and the algorithm refit.

    Explanation

    Similar to complete linkage, k-means assumes spherical distributions; outliers can cause empty clusters.

  15. 15

    How can one choose the number of clusters in k-means clustering?

    Model answer

    Vary kkk and plot the objective function (within-cluster sum of squares) against kkk; look for an 'elbow' where the decrease flattens. Alternatively, validate on downstream supervised tasks.

    Explanation

    The elbow method is heuristic; more rigorous is using cross-validation in the full analysis pipeline.

  16. 16

    What is the goal of principal components analysis (PCA)?

    Model answer

    To find a lower-dimensional representation of the data that captures most of the variation (or information) in the original features.

    Explanation

    PCA achieves dimension reduction by projecting data onto orthogonal directions that maximize variance.

  17. 17

    How does PCA choose the direction for the first principal component?

    Model answer

    It chooses the linear combination (direction) of the original variables that captures the maximum variance in the data.

    Explanation

    The first PC is the line along which the data has the greatest spread; subsequent PCs are orthogonal directions maximizing remaining variance.

  18. 18

    What constraint is placed on subsequent principal components after the first?

    Model answer

    Each subsequent principal component is orthogonal (perpendicular) to all previous ones while still maximizing variance.

    Explanation

    Orthogonality ensures that each PC captures unique information not already explained by earlier PCs.

  19. 19

    In the context of PCA, what is a biplot?

    Model answer

    A biplot displays both observations (as points) and original variables (as arrows) in the space of the first two principal components.

    Explanation

    Arrows show how each variable contributes to the PCs; the plot helps interpret patterns in the data.

  20. 20

    How can PCA be used to correct for batch effects in biomedical data?

    Model answer

    PCA can identify artificial non-biological variation due to batch effects; these components can be removed or adjusted to retain true biological signal.

    Explanation

    Batch effects often appear as large principal components that do not correspond to biological factors.

  21. 21

    What is principal component regression and how does it combine unsupervised and supervised learning?

    Model answer

    Principal component regression first applies PCA to reduce dimensionality, then uses the principal components as predictors in a regression or classification model.

    Explanation

    This hybrid method leverages unsupervised learning for dimension reduction followed by supervised prediction, often improving performance in high-dimensional settings.

  22. 22

    Why is it difficult to validate the results of unsupervised learning methods?

    Model answer

    Because there is no response variable to use for cross-validation; validation often requires independent datasets or evaluation within a larger analysis pipeline.

    Explanation

    Without a ground truth, assessing cluster quality or dimension reduction effectiveness is inherently subjective.

  23. 23

    How can data preprocessing (e.g., centering and scaling) affect clustering results?

    Model answer

    Centering and scaling can change distances between observations, thus altering the resulting clusters dramatically.

    Explanation

    Variables with larger scales may dominate distance calculations if not scaled, so preprocessing is a critical step.

  24. 24

    According to the Q&A, what is the recommended approach for choosing a distance measure in hierarchical clustering?

    Model answer

    Try several distance measures and validate which one produces more generalizable results (e.g., on a test set) within the full data analysis pipeline.

    Explanation

    There is no universally best distance; empirical validation is needed to select the measure that yields reproducible findings.

  25. 25

    Why is PCA not ideal for identifying which original features are associated with an outcome?

    Model answer

    Because each principal component is a linear combination of all original features, making it difficult to interpret associations with individual variables.

    Explanation

    PCA is a rotation; the resulting components mix variables, so they are not directly interpretable for feature selection.

  26. 26

    In unsupervised learning, what is the role of the data scientist in striking a balance with automated methods?

    Model answer

    Unsupervised learning often requires active involvement from the data scientist to choose methods, tune parameters, and interpret results, but care must be taken not to overfit by finding artificial patterns.

    Explanation

    Human judgment is needed because unsupervised tasks lack a clear objective function; validation on independent data helps avoid spurious discoveries.

1 of 26
Question 1 of 26

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent