Skip to content

A native Lua implementation of Spark MLlib

License

Notifications You must be signed in to change notification settings

drauschenbach/stuart-ml

Repository files navigation

Stuart ML

A native Lua implementation of Spark MLlib. This is a companion module for Stuart, the Spark runtime for embedding and edge computing.

Build Status License Lua

Getting Started

Installing

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>

API Guide

Testing

Testing Locally

$ busted -v
●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
62 successes / 0 failures / 0 errors / 0 pending : 0.252009 seconds

Testing with a Specific Lua Version

$ 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

About

A native Lua implementation of Spark MLlib

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages