Package shared

Examples of shared.NominalAttrInfo


          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);
View Full Code Here

TOP

Related Classes of shared.NominalAttrInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.