new LinkedList<>(nominalAttrib.getValue());
// No explicit support for missing values, synthetic field is added
// manually
posssibleValues.add(MLJUtils.MISSING_NOM_VAL);
attrInfos
.add(new NominalAttrInfo(nominalAttrib.getKey(), posssibleValues));
}
Set<String> numericAttribs = metaData.getNumericAttribs();
for (String numericAttrib : numericAttribs) {
attrInfos.add(new RealAttrInfo(numericAttrib));
}
Map<String, Pair<AttrInfo, Integer>> attribMap =
new HashMap<>();
for (int i = 0; i < attrInfos.size(); i++) {
attribMap.put(attrInfos.get(i).name(), new Pair<>(
attrInfos.get(i), i));
}
// Create Attribute Information on label
AttrInfo labelAttrib = new NominalAttrInfo(PERFORMANCE_CLASS, perfClasses);
// Create MLJ meta information
schema = new Schema(attrInfos, labelAttrib);
InstanceList instances = createInstances(trainingData, attribMap);