TUGAS Artificial Intelligence 26/27 -BD107

Module Question 5

  1. Describe the steps of the k-Means clustering algorithm. What does the ‘k’ represent?
  2. Why is dimensionality reduction useful in machine learning?
  3. Provide a real-world application for clustering (e.g., customer segmentation).
  4. What is the main objective of PCA?

 

JAWABAN:

1. Steps of the \(k\)-Means Clustering Algorithm & What ‘\(k\)’ Represents

The \(k\)-Means clustering algorithm is an unsupervised learning method used to partition a dataset into distinct, non-overlapping subgroups.

Steps of the Algorithm:

• Initialization: Choose the number of clusters \(k\) and randomly select \(k\) data points to serve as the initial centroids.
• Assignment: Assign each data point to the nearest centroid based on a distance metric (commonly Euclidean distance).
• Update: Calculate the mean of all data points assigned to each cluster and move the centroid to this new mean position.
• Convergence: Repeat the Assignment and Update steps until the centroids no longer change positions or a maximum number of iterations is reached.

Meaning of ‘\(k\)’:

• The letter ‘\(k\)’ represents the predefined number of clusters (or groups) that you want the algorithm to divide the dataset into.

 

 

2. Why Dimensionality Reduction is Useful

Dimensionality reduction reduces the number of input variables (features) in a dataset, which provides several major benefits:
• Mitigates the Curse of Dimensionality: High-dimensional spaces make data sparse, causing distance metrics to lose their effectiveness.
• Improves Model Performance: Removing redundant or noisy features speeds up training time and lowers computational costs.
• Prevents Overfitting: Simpler data representations help models generalize better to unseen data.
• Enables Visualization: Compressing data down to 2D or 3D allows humans to easily graph and interpret underlying structures.

3. Real-World Application for Clustering

Beyond customer segmentation, a prominent real-world application is Anomaly Detection in Fraud Prevention:
• How it works: Financial transactions are clustered based on features like spending amount, location, and frequency. Standard transactions form dense, well-defined clusters.
• The outcome: Any transaction that falls far away from these established groups is flagged as an outlier (anomaly), indicating potential credit card fraud.

 

4. Main Objective of PCA (Principal Component Analysis)

The main objective of PCA is to reduce the dimensionality of a large dataset while preserving as much variance (information) as possible.
It achieves this by transforming the original correlated features into a new set of uncorrelated linear combinations called Principal Components (PCs), sorted by the amount of variance they explain.

Previous Post Previous Post

Leave a comment