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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.