16. PreidctionIOの確認
pio statusを実行して、エラーが出なければOK
$ ./bin/pio status
…
[INFO] [Management$] Apache Spark 2.1.1 detected
[INFO] [Management$] Inspecting storage backend connections...
[INFO] [Storage$] Verifying Meta Data Backend (Source: ELASTICSEARCH)...
[INFO] [Storage$] Verifying Model Data Backend (Source: LOCALFS)...
[INFO] [Storage$] Verifying Event Data Backend (Source: ELASTICSEARCH)...
[INFO] [Storage$] Test writing to Event Store (App Id 0)...
[INFO] [Management$] Your system is all ready to go.
26. 予測
pio deployで予測サーバを起動する
$ pio deploy &
…
[INFO] [MasterActor] Engine is deployed and running. Engine API is live at
http://0.0.0.0:8000.
$ curl -H "Content-Type: application/json" -d '{"attr0":90,"attr1":15,"attr2":73}'
http://localhost:8000/queries.json
{"label":3.0}
data/data.txtのデータを投げてみる
(たとえば、「3,90 15 73」の場合、3がlabelとして返却される(予測成功!))