JuliaAcademy / DataScience

Data Science in Julia course for JuliaAcademy.com, taught by Huda Nassar
https://juliaacademy.com/p/julia-for-data-science
MIT License
488 stars 256 forks source link

[Error] Clustering Algorithms #25

Closed shaksham95 closed 3 years ago

shaksham95 commented 3 years ago

Hey,

While trying to code along with the clustering video, I am facing issues in the following clustering methods.

K-medoids:

x_matrix = Matrix(X)
D = pairwise(Euclidean(), x_matrix, x_matrix, dims=2)
k_medoids = kmedoids(D, 10)
insertcols!(houses_data, 3, :medoids_clusters => k_medoids.assignments)

Error: image

Hierarchical Clustering:

hier_model = hclust(distances)
L = cutree(hier_model; k=10) ## tries to form a clustering tree
insertcols!(houses_data, 3, :hierarchial_clusters => L)

Error: image

Can anyone please help me with this?

logankilpatrick commented 3 years ago

Just updated the notebook, should be good now!