diff --git a/asciidoc/courses/gds-community-detection/modules/3-kmeans/lessons/2-kmeans/lesson.adoc b/asciidoc/courses/gds-community-detection/modules/3-kmeans/lessons/2-kmeans/lesson.adoc index f0f2c505b..f8713a463 100644 --- a/asciidoc/courses/gds-community-detection/modules/3-kmeans/lessons/2-kmeans/lesson.adoc +++ b/asciidoc/courses/gds-community-detection/modules/3-kmeans/lessons/2-kmeans/lesson.adoc @@ -117,6 +117,37 @@ include::questions/1-deterministic.adoc[leveloffset=+1] include::questions/2-kmeans.adoc[leveloffset=+1] + +== Troubleshooting + +If you receive an error stating that the graph does not exist, you may need to recreate the `survey` graph projection from the link:/courses/gds-community-detection/3-kmeans/1-scaling/[Feature normalization^] lesson. + +.Recreate the graph projection +[%collapsible] +==== +[source,cypher] +---- +CALL gds.graph.drop('survey', false); + +CALL gds.graph.project( + 'survey', + 'Person', + '*', + {nodeProperties:['vector']} +); + +CALL gds.scaleProperties.mutate( + 'survey', + { + nodeProperties: ['vector'], + scaler: 'MinMax', + mutateProperty: 'scaledVector' + } +); +---- +==== + + [.summary] == Summary diff --git a/asciidoc/courses/gds-community-detection/modules/3-kmeans/lessons/3-optimization/lesson.adoc b/asciidoc/courses/gds-community-detection/modules/3-kmeans/lessons/3-optimization/lesson.adoc index 0e2478cbd..2f1a6f1af 100644 --- a/asciidoc/courses/gds-community-detection/modules/3-kmeans/lessons/3-optimization/lesson.adoc +++ b/asciidoc/courses/gds-community-detection/modules/3-kmeans/lessons/3-optimization/lesson.adoc @@ -27,7 +27,7 @@ You will use the *stats* mode of the algorithm as you are only interested in the ---- UNWIND range(5,20) AS k CALL gds.beta.kmeans.stats('survey', - {k:k, nodeProperty:'vector', computeSilhouette: True}) + {k:k, nodeProperty:'scaledVector', computeSilhouette: true}) YIELD averageDistanceToCentroid, averageSilhouette RETURN k, averageDistanceToCentroid, averageSilhouette ORDER BY averageSilhouette DESC LIMIT 3; @@ -48,7 +48,7 @@ In this example, you will use the `numberOfRestarts` value 5. [source,cypher] ---- CALL gds.beta.kmeans.write('survey', - {k:5, nodeProperty:'vector', + {k:5, nodeProperty:'scaledVector', numberOfRestarts: 5, writeProperty:'kmeans5'}) ---- @@ -61,6 +61,37 @@ CALL gds.beta.kmeans.write('survey', include::questions/1-metric.adoc[leveloffset=+1] include::questions/2-restarts.adoc[leveloffset=+1] + +== Troubleshooting + +If you receive an error stating that the graph does not exist, you may need to recreate the `survey` graph projection from the link:/courses/gds-community-detection/3-kmeans/1-scaling/[Feature normalization^] lesson. + +.Recreate the graph projection +[%collapsible] +==== +[source,cypher] +---- +CALL gds.graph.drop('survey', false); + +CALL gds.graph.project( + 'survey', + 'Person', + '*', + {nodeProperties:['vector']} +); + +CALL gds.scaleProperties.mutate( + 'survey', + { + nodeProperties: ['vector'], + scaler: 'MinMax', + mutateProperty: 'scaledVector' + } +); +---- +==== + + [.summary] == Summary