tree: 043a801422207b744acaf47470b5bfb5baa46d67 [path history] [tgz]
  1. project/
  2. build.sbt
  3. engine.json
  4. README.md
  5. Run.scala
examples/experimental/scala-parallel-regression/README.md

Parallel Regression Engine

Configuration

This sample regression engine reads data from file system.

Edit the file path in engine.json, change filepath of datasource to an absolute path that points to lr_data.py

$ cat engine.json
...
"datasource": {
  "filepath": <absolute_path_to_lr_data.txt>,
  "k": 3,
  "seed": 9527
}
...

Register engine, train, and deploy.

$ pio build
$ pio train
$ pio deploy --port 9998

Query the Engine Instance

$ curl -X POST http://localhost:9998/queries.json -d \
  '[1.80,0.87,2.41,0.35,-0.21,1.35,0.51,1.55,-0.20,1.32]'

0.8912731719174509

0.89... is the prediction result.