Package de.lmu.ifi.dbs.elki.data

Examples of de.lmu.ifi.dbs.elki.data.SimpleClassLabel


      if(columnIndex == 1 && aValue instanceof String) {
        orep.set(id, (String) aValue);
      }
      if(columnIndex == 2 && aValue instanceof String) {
        // FIXME: better class label handling!
        SimpleClassLabel lbl = new SimpleClassLabel((String) aValue);
        crep.set(id, lbl);
      }
      if(!(aValue instanceof String)) {
        logger.warning("Was expecting a String value from the input element, got: " + aValue.getClass());
        return;
View Full Code Here


    VectorFieldTypeInformation<DoubleVector> type = new VectorFieldTypeInformation<DoubleVector>(DoubleVector.class, dim, factory);
    bundle.appendColumn(type, new ArrayList<Object>());
    bundle.appendColumn(TypeUtil.CLASSLABEL, new ArrayList<Object>());

    for(GeneratorInterface generator : generators) {
      ClassLabel l = new SimpleClassLabel(generator.getName());
      for(Vector v : generator.getPoints()) {
        DoubleVector dv = new DoubleVector(v);
        bundle.appendSimple(dv, l);
      }
    }
View Full Code Here

      if(columnIndex == 1 && aValue instanceof String) {
        orep.set(id, (String) aValue);
      }
      if(columnIndex == 2 && aValue instanceof String) {
        // FIXME: better class label handling!
        SimpleClassLabel lbl = new SimpleClassLabel((String) aValue);
        crep.set(id, lbl);
      }
      if(!(aValue instanceof String)) {
        logger.warning("Was expecting a String value from the input element, got: " + aValue.getClass());
        return;
View Full Code Here

    bundle.appendColumn(TypeUtil.CLASSLABEL, new ArrayList<Object>());
    bundle.appendColumn(TypeUtil.MODEL, new ArrayList<Model>());

    // generate clusters
    for(GeneratorInterface curclus : generators) {
      ClassLabel l = new SimpleClassLabel(curclus.getName());
      Model model = curclus.makeModel();
      int kept = 0;
      while(kept < curclus.getSize()) {
        // generate the "missing" number of points
        List<Vector> newp = curclus.generate(curclus.getSize() - kept);
View Full Code Here

      }
      else if(elkitypes[out] == TypeUtil.CLASSLABEL) {
        String val = (String) map.get(s);
        if(val != null) {
          // TODO: support other class label types.
          ClassLabel lbl = new SimpleClassLabel(val);
          data[out] = lbl;
        }
        else {
          throw new AbortException("Class label column not set in sparse instance." + tokenizer.toString());
        }
View Full Code Here

      else if(etyp[out] == TypeUtil.CLASSLABEL) {
        if(tokenizer.ttype != StreamTokenizer.TT_WORD) {
          throw new AbortException("Expected word token, got: " + tokenizer.toString());
        }
        // TODO: support other class label types.
        ClassLabel lbl = new SimpleClassLabel(tokenizer.sval);
        data[out] = lbl;
        nextToken(tokenizer);
      }
      else {
        throw new AbortException("Unsupported type for column " + "->" + out + ": " + ((etyp[out] != null) ? etyp[out].toString() : "null"));
View Full Code Here

      }
      else if(elkitypes[out] == TypeUtil.CLASSLABEL) {
        String val = (String) map.get(s);
        if(val != null) {
          // TODO: support other class label types.
          ClassLabel lbl = new SimpleClassLabel(val);
          data[out] = lbl;
        }
        else {
          throw new AbortException("Class label column not set in sparse instance." + tokenizer.toString());
        }
View Full Code Here

      else if(etyp[out] == TypeUtil.CLASSLABEL) {
        if(tokenizer.ttype != StreamTokenizer.TT_WORD) {
          throw new AbortException("Expected word token, got: " + tokenizer.toString());
        }
        // TODO: support other class label types.
        ClassLabel lbl = new SimpleClassLabel(tokenizer.sval);
        data[out] = lbl;
        nextToken(tokenizer);
      }
      else {
        throw new AbortException("Unsupported type for column " + "->" + out + ": " + ((etyp[out] != null) ? etyp[out].toString() : "null"));
View Full Code Here

TOP

Related Classes of de.lmu.ifi.dbs.elki.data.SimpleClassLabel

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.