From 7cb7d644c7c1f918de2b5655b28a12086f32097d Mon Sep 17 00:00:00 2001 From: Laurent Modolo <laurent.modolo@ens-lyon.fr> Date: Thu, 12 Oct 2023 10:18:02 +0200 Subject: [PATCH] Practical b: fix typo --- Practical_b.Rmd | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Practical_b.Rmd b/Practical_b.Rmd index 01ff3eb..14146c5 100644 --- a/Practical_b.Rmd +++ b/Practical_b.Rmd @@ -493,13 +493,13 @@ Think about the starting state of your algorithm and the stopping condition <details><summary>Solution</summary> <p> -We have no prior information about the centroid, we can randomly draw them -We are going to iterate over the two step of the algorithm until the centroids stay the same +We have no prior information about the centroid, we can randomly draw them. +We are going to iterate over the two-step of the algorithm until the centroids stay the same. </p> </details> <div class="pencadre"> -Start by implementing an `kmeans_initiation(x, k)` function for your algorithm, returning $k$ centroids +Start by implementing a `kmeans_initiation(x, k)` function for your algorithm, returning $k$ centroids </div> <details><summary>Solution</summary> @@ -517,7 +517,7 @@ kmeans_initiation <- function(x, k) { </details> <div class="pencadre"> -Implement an `compute_distance(x, centroid)` function for your algorithm, the distance of each point (row of x) to each centroid, based on the squared Euclidian distance +Implement a `compute_distance(x, centroid)` function for your algorithm, the distance of each point (row of x) to each centroid, based on the squared Euclidian distance. </div> <details><summary>Solution</summary> @@ -535,7 +535,7 @@ compute_distance <- function(x, centroid) { </details> <div class="pencadre"> -Implement an `cluster_assignment(distance)` function for your algorithm, returning the assignment of each point (row of x), based on the squared Euclidian distance +Implement a `cluster_assignment(distance)` function for your algorithm, returning the assignment of each point (row of x), based on the squared Euclidian distance. </div> <details><summary>Solution</summary> @@ -554,7 +554,7 @@ cluster_assignment <- function(distance) { <div class="pencadre"> -Implement an `centroid_update(x, cluster, k)` function for your algorithm, returning the updated centroid for your clusters +Implement a `centroid_update(x, cluster, k)` function for your algorithm, returning the updated centroid for your clusters. </div> <details><summary>Solution</summary> @@ -572,7 +572,7 @@ centroid_update <- function(x, cluster, k) { </details> <div class="pencadre"> -Implement an `kmeans_example(x, k)` function for your algorithm, wrapping everything and test it +Implement a `kmeans_example(x, k)` function for your algorithm, wrapping everything and test it. </div> <details><summary>Solution</summary> -- GitLab