Skip to content
Closed
Changes from 2 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 @@ -197,7 +197,7 @@ class BisectingKMeans private (
newClusters = summarize(d, newAssignments)
newClusterCenters = newClusters.mapValues(_.center).map(identity)
}
if (preIndices != null) preIndices.unpersist()
if (preIndices != null) preIndices.unpersist(blocking = false)
preIndices = indices
indices = updateAssignments(assignments, divisibleIndices, newClusterCenters).keys
.persist(StorageLevel.MEMORY_AND_DISK)
Expand All @@ -212,7 +212,9 @@ class BisectingKMeans private (
}
level += 1
}
if(indices != null) indices.unpersist()
if (preIndices != null) preIndices.unpersist(blocking = false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we usually write "blocking ="? there's only one argument.
I'd use braces and put the body on the next line too.

if (indices != null) indices.unpersist(blocking = false)
norms.unpersist(blocking = false)
val clusters = activeClusters ++ inactiveClusters
val root = buildTree(clusters)
new BisectingKMeansModel(root)
Expand Down