Feature Store & Sparkling Water integration
Python Sparkling Water
- In a Python environment, pip install the featurestore client.
- Download spark and pysparkling by following the instructions from the Sparkling Water documentation.
- Start the pysparkling session with the Spark dependencies.
./bin/pysparkling --jars <spark dependency jar file>
Example:
from featurestore import Client
ref = fs.retrieve()
data_frame = ref.as_spark_frame(spark)
# sparklingwater
from pysparkling import *
hc = H2OContext.getOrCreate()
from pysparkling.ml import H2OGLM
estimator = H2OGLM(labelCol = "RainTomorrow")
model = estimator.fit(data_frame)
Scala Sparkling Water
- Download the Spark dependency jar and Scala client jar.
- Start the sparkling shell with the jars
./bin/sparkling-shell --jars <spark dependency jar file>, <scala client jar file>
Example:
import ai.h2o.featurestore.Client
val ref = fs.retrieve()
val dataFrame = ref.asSparkFrame(spark)
// sparklingwater
import ai.h2o.sparkling._
val hc = H2OContext.getOrCreate()
import ai.h2o.sparkling.ml.algos.H2OGLM
val estimator = new H2OGLM().setLabelCol("RainTomorrow")
val model = estimator.fit(dataFrame)
Feedback
- Submit and view feedback for this page
- Send feedback about H2O Feature Store to cloud-feedback@h2o.ai