In this example, we demonstrate how to do kMeans fitting of data, and then plot the results in an SVG graph.
To draw SVG graphs in Rust, we used the techniques described by Cetra in this article.
If you have not done so already, follow these simple instructions to install Rust, Node.js, SSVM, and ssvmup.
$ ssvmup build --enable-aot
$ cd node
$ node server.js
Point your browser to http://localhost:8080/, upload a CSV file for 2D data points, and hit the "Draw" button. The web app provides sample CSV files you can download and then upload to process. The birch3 data set is large and will take longer to complete.
$ node node/test.js
<?xml version="1.0" standalone="no"?>
<svg
... ...
</svg>