A native Lua implementation of Spark MLlib. This is a companion module for Stuart, the Spark runtime for embedding and edge computing.
To install on an operating system:
$ luarocks install stuart-ml
To load into a web page:
<html>
<body>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/fengari-web@0.1.2/dist/fengari-web.js"></script>
<script type="application/lua" src="https://cdn.jsdelivr.net/npm/lua-stuart@0.1.8-0/stuart.lua"></script>
<script type="application/lua" src="https://cdn.jsdelivr.net/npm/lua-stuart-ml@0.1.8-0/stuart-ml.lua"></script>
<script type="application/lua">
local Vectors = require 'stuart-ml.linalg.Vectors'
local denseVector = Vectors.dense({0.1, 0.0, 0.3})
...
</script>
</body>
</html>
$ busted -v
●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
62 successes / 0 failures / 0 errors / 0 pending : 0.252009 seconds
$ docker build -f Test-Lua5.3.Dockerfile -t test .
$ docker run -it test busted -v
●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
62 successes / 0 failures / 0 errors / 0 pending : 0.252009 seconds