Skip to content

Commit b4ad959

Browse files
authored
Update kmeans.jl
Minor code cleanup
1 parent b350960 commit b4ad959

File tree

1 file changed

+7
-4
lines changed
  • Tutorials/kmeans_implementation_project

1 file changed

+7
-4
lines changed

Tutorials/kmeans_implementation_project/kmeans.jl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
# Replace python environment to suit your needs
2-
ENV["PYTHON"] = "/home/mysterio/miniconda3/envs/pydata/bin/python"
3-
Pkg.build("PyCall") # Build PyCall to suit the specified Python env
2+
ENV["PYTHON"] = "YOUR/PYTHON/ENVIRONMENT/DIRECTORY/HERE"
43

4+
# Build PyCall to suit the specified Python env
5+
Pkg.build("PyCall")
6+
7+
# Import needed libraries
58
using PyCall
69
using Statistics
710
using Plots
811

9-
# import whatever
12+
# Import sklearn dataset generator
1013
data = pyimport("sklearn.datasets")
1114

12-
#
15+
# Generate clustered data
1316
X, y = data.make_blobs(n_samples=5000, n_features=3, centers=3, cluster_std=0.9, random_state=10)
1417

1518
# Visualize the feature space

0 commit comments

Comments
 (0)