@Override
  public ExampleSetMetaData applyOnFilteredMetaData(ExampleSetMetaData metaData) {
    for (AttributeMetaData amd : metaData.getAllAttributes()) {
      if (amd.isNumerical() && !amd.isSpecial()) {
        Range range = amd.getValueRange();
        amd.setValueRange(
            new Range(0, Math.max(Math.abs(range.getLower()), Math.abs(range.getUpper()))),
            amd.getValueSetRelation());
        amd.getMean().setUnkown();
      }
    }

    return metaData;
  }
Example #2
0
 @Override
 protected MetaData modifyMetaData(ExampleSetMetaData metaData) throws UndefinedParameterError {
   AttributeMetaData amd =
       metaData.getAttributeByName(getParameterAsString(PARAMETER_ATTRIBUTE_NAME));
   if (amd != null) {
     AttributeMetaData newAttribute = amd.clone();
     newAttribute.setType(Ontology.DATE_TIME);
     newAttribute.getMean().setUnkown();
     newAttribute.setValueSetRelation(SetRelation.UNKNOWN);
     if (!getParameterAsBoolean(PARAMETER_KEEP_OLD_ATTRIBUTE)) metaData.removeAttribute(amd);
     else newAttribute.setName(newAttribute.getName() + "_AS_DATE");
     metaData.addAttribute(newAttribute);
   }
   return metaData;
 }