Published
Edited
Apr 13, 2018
1 fork
4 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
iris_features = ["petal_length","petal_width", "sepal_length", "sepal_width"]
Insert cell
resultsLog = {
let kmeans = new Kmeans(dataset, iris_features, 3);
const initial_results = JSON.parse(JSON.stringify(kmeans.dataset));
kmeans.step();
kmeans.step();
kmeans.step();
kmeans.step();
kmeans.step();
const final_results = JSON.parse(JSON.stringify(kmeans.dataset));
return [initial_results, final_results];
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more