jpeck

jpeck / h2o_demo / 0.2.0

README.md

Overview

This algorithm implements the model shown in H2O's POJO Quick Start

See the Algorithm Developer Sample for H2O for more info.

Usage #1: single-input

Input

{
  "Year":"1987",
  "Month":"10",
  "DayOfMonth":"14",
  "DayOfWeek":"3",
  "CRSDepTime":"730",
  "UniqueCarrier":"PS",
  "Origin":"SAN",
  "Dest":"SFO"
}

Output

{
  "prediction": "YES",
  "probabilities":
  [
    0.4319916897116479,
    0.5680083102883521
  ]
}

Usage #2: batch-input

Input

[
  {
    "Year":"1987",
    "Month":"10",
    "DayOfMonth":"14",
    "DayOfWeek":"3",
    "CRSDepTime":"730",
    "UniqueCarrier":"PS",
    "Origin":"SAN",
    "Dest":"SFO"
  },
  {
    "Year":"1987",
    "Month":"10",
    "DayOfMonth":"14",
    "DayOfWeek":"3",
    "CRSDepTime":"730",
    "UniqueCarrier":"PS",
    "Origin":"BOS",
    "Dest":"SFO"
  }
]

Output

[  
   {  
      "prediction":"YES",
      "probabilities":
      [
         0.4319916897116479,
         0.5680083102883521
      ]
   },
   {  
      "prediction":"YES",
      "probabilities":
      [
         0.4020763147865981,
         0.5979236852134019
      ]
   }
]