To predict a client subscription assessment, we use the deep learning classifier implementation from H2O. First, we set up and create a Spark session:
val spark = SparkSession.builder .master("local[*]") .config("spark.sql.warehouse.dir", "E:/Exp/") // change accordingly .appName(s"OneVsRestExample") .getOrCreate()
Then we load the dataset as a data frame:
spark.sqlContext.setConf("spark.sql.caseSensitive", "false");val trainDF = spark.read.option("inferSchema","true") .format("com.databricks.spark.csv") .option("delimiter", ";") .option("header", "true") .load("data/bank-additional-full.csv")
Although there are categorical features in this dataset, there is no need to use a StringIndexer ...