Data Science with Python Unsupervised Learning Algorithms Flashcards
6 cards from real Data Science with Python Certification practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 Data Science with Python Unsupervised Learning Algorithms flashcards as text
A retail company wants to segment its customer base into distinct groups based on purchasing behavior (e.g., purchase frequency, monetary value, items purchased) to tailor marketing campaigns. The company does not have any predefined labels for these customer groups. Which of the following algorithms is most appropriate for this task?
Answer: K-Means Clustering
K-Means is an unsupervised clustering algorithm ideal for partitioning a dataset into a specified number of distinct, non-overlapping subgroups (clusters) without prior knowledge of the group labels. [9] This scenario, known as customer segmentation, is a classic use case for clustering, as the goal is to discover natural groupings in the data. [24]
What is the primary objective of the Principal Component Analysis (PCA) algorithm?
Answer: To reduce the dimensionality of a dataset while preserving the maximum amount of variance.
Principal Component Analysis (PCA) is a dimensionality reduction technique used to transform a large set of variables into a smaller one that still contains most of the information. [11] It achieves this by identifying a new set of uncorrelated variables, called principal components, that are ordered by the amount of variance they explain in the original data. [23, 5]
A data scientist is using the K-Means algorithm and needs to configure its parameters. Which of the following is a mandatory hyperparameter that must be specified *before* running the algorithm?
Answer: The number of clusters (K)
The K-Means algorithm requires the user to specify the number of clusters, represented by 'K', before it can begin partitioning the data. [14, 25] The algorithm then iteratively assigns data points to the nearest of these K centroids. The other options are hyperparameters for different algorithms: epsilon for DBSCAN, linkage criterion for Hierarchical Clustering, and the number of components for PCA.
A cybersecurity analyst is processing a large dataset of network traffic to identify novel, previously unseen types of attacks (zero-day exploits). These attacks would appear as unusual patterns distinct from the vast amount of normal traffic. Which unsupervised learning task is most suitable for this scenario?
Answer: Anomaly Detection
Anomaly detection is the ideal task for this scenario. Unsupervised anomaly detection models are trained on data representing normal behavior and are designed to identify data points or patterns that deviate significantly from this norm. [12] This makes them effective at detecting unknown attacks without needing pre-labeled examples of those attacks. [7, 18]
Which of the following clustering algorithms is particularly well-suited for discovering clusters of arbitrary shapes and is robust to outliers, which it can identify as noise?
Answer: DBSCAN (Density-Based Spatial Clustering of Applications with Noise)
DBSCAN is a density-based clustering algorithm that excels at finding clusters of non-spherical or arbitrary shapes. [1, 10] A key advantage of DBSCAN over algorithms like K-Means is its ability to identify points that do not belong to any cluster, labeling them as noise or outliers, making it highly robust. [8]
In agglomerative hierarchical clustering, what is the purpose of the 'linkage criterion' (e.g., 'ward', 'complete', 'average')?
Answer: To define how the distance between two clusters is measured in order to decide which clusters to merge.
The linkage criterion in hierarchical clustering specifies how the dissimilarity between clusters is measured. [17] For example, 'complete' linkage uses the maximum distance between points in two clusters, while 'single' linkage uses the minimum distance. [6, 29] This criterion is fundamental to the algorithm's bottom-up approach of successively merging the closest pair of clusters.
How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy