code: private double[] expandRawData(double[] data, int size) {
      double[] expanded = new double[size];
      int pos = 0;
      for (int i = 0; i < data.length; i++) {
        if (m._domains[i] == null) {
          expanded[pos] = data[i];
          pos++;
        } else {
          int idx = Double.isNaN(data[i]) ? m._domains[i].length : (int) data[i];
          expanded[pos + idx] = 1.0;
          pos += m._domains[i].length + 1;
        }
      }
      return expanded;
    }
docs: Creates a 1-hot encoded representation of the input data.
  @param data raw input as seen by the score0 function
  @param size target size of the output array
  @return 1-hot encoded data