How to do it...

  1. Create a method to generate a schema for the user input:
private static Schema generateSchema(){ Schema schema = new Schema.Builder() .addColumnString("RowNumber") .addColumnInteger("CustomerId") .addColumnString("Surname") .addColumnInteger("CreditScore") .addColumnCategorical("Geography", Arrays.asList("France","Germany","Spain")) .addColumnCategorical("Gender", Arrays.asList("Male","Female")) .addColumnsInteger("Age", "Tenure") .addColumnDouble("Balance") .addColumnsInteger("NumOfProducts","HasCrCard","IsActiveMember") .addColumnDouble("EstimatedSalary") .build(); return schema; }
  1. Create a TransformProcess from the schema:
private static RecordReader applyTransform(RecordReader recordReader, Schema schema){ final TransformProcess ...

Get Java Deep Learning Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.