Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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'})
----
Expand All @@ -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

Expand Down