function columnsAndFieldsFromYPred(yPred, classLabels) {
  const columns = [];
  const fields = [];

  // `classLabels` passed as argument can ensure correct order
  const _classLabels = classLabels || Object.keys(yPred[0][0]);

  yPred.forEach((singleModelPredArr, modelId) => {
    _classLabels.forEach((classCol, classId) => {
      const name = predColName(modelId, classId);
      columns.push(singleModelPredArr.map(predObj => predObj[classCol]));
      fields.push({
        name,
        type: FEATURE_TYPE.NUMERICAL,
        role: FIELD_ROLE.PREDICTION,
        dataType: DATA_TYPE.REAL,
      });
    });
  });
  return {
    columns,
    fields,
  };
}
get columns and fields from prediction data
@param {Array<Array<Object>} yPred prediction data of multiple models, each sub array represent predictions from one model, each object has keys representing class names
@param {Array<String>} classLabels
@return {Object} {columns - array of array of columns; fields: array of field metadata} in the same order