Module Question 5 – AI-BD107 – Algiyant Rezki Tri Utama – 2681495394

Pertanyaan:
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?

Status:
100% Sudah Tercapai

Keterangan:
Saya sudah mengerjakan module question 2 dengan baik dan benar

Bukti:
1. Describe the steps of the k-Means clustering algorithm. What does the ‘k’ represent?
Jawab:

What Does the ‘k’ Represent?

In the k-Means algorithm, $k$ represents the number of clusters you want the algorithm to find and partition your dataset into.

It is a hyperparameter that you (the user) must choose before running the algorithm.

For example, if you set $k = 3$, the algorithm will attempt to group your data points into 3 distinct clusters. (Methods like the Elbow Method are often used to help determine the optimal value of $k$).

Steps of the k-Means Clustering Algorithm

The k-Means algorithm is an iterative process that refines cluster groupings until they stabilize. Here are the core steps:

1. Initialization

  • The algorithm randomly selects $k$ data points from the dataset to act as the initial center points, called centroids.

2. Assignment Step (Cluster Formation)

  • Every data point in the dataset is examined.

  • Using a distance metric (most commonly Euclidean distance), the algorithm calculates the distance from each data point to all $k$ centroids.

  • Each data point is then assigned to its nearest centroid, forming $k$ distinct clusters.

3. Update Step (Centroid Recalculation)

  • Once all data points are assigned, the algorithm recalculates the position of the $k$ centroids.

  • It does this by taking the mean (average) of all data points currently belonging to each cluster. The new mean becomes the updated centroid for that cluster.

4. Iteration and Convergence

  • Steps 2 and 3 are repeated iteratively: points are reassigned based on the new centroids, and centroids are updated based on the new assignments.

  • The algorithm stops (converges) when one of the following conditions is met:

2. Why is dimensionality reduction useful in machine learning?
Jawab: Dimensionality reduction is useful in machine learning because it reduces the number of features in a dataset, making data easier and faster to process. It can also remove redundant information, simplify data visualization, and improve model performance in some cases. According to Scikit-learn Developers, dimensionality reduction methods such as Principal Component Analysis (PCA) help represent data using fewer dimensions while preserving important information.

3. Provide a real-world application for clustering (e.g., customer segmentation).
Jawab: Clustering is used by companies to group customers based on similar purchasing behaviors, spending habits, and shopping frequency. For example, an e-commerce company can use the K-Means algorithm to divide customers into groups such as loyal customers, occasional buyers, and low-spending customers. This helps companies develop targeted marketing strategies, improve customer satisfaction, and increase sales.

4.What is the main objective of PCA?

Jawab: The main objective of Principal Component Analysis (PCA) is to reduce the number of features in a dataset while preserving as much important information as possible. PCA transforms the original features into a smaller set of new variables called principal components, making data easier to analyze, reducing computational complexity, and helping visualize patterns in the data.

Previous Post Previous Post
Newer Post Newer Post

Leave a comment