Package cascading.pattern.datafield

Examples of cascading.pattern.datafield.CategoricalDataField


    {
    DataType dataType = dataField.getDataType();
    Type type = DataTypes.getPmmlToType( dataType );

    if( type == String.class )
      return new CategoricalDataField( name, type, asStrings( dataField.getValues() ) );

    String message = String.format( "unsupported data type: %s", dataType );
    LOG.error( message );

    throw new PatternException( message );
View Full Code Here


      throw new IllegalArgumentException( "predicted field does not exist: " + fieldName );

    DataField dataField = dictionary.get( fieldName );

    if( dataField instanceof ContinuousDataField )
      dataField = new CategoricalDataField( fieldName, String.class, categories );
    else
      dataField = new CategoricalDataField( (CategoricalDataField) dataField, categories );

    dictionary.put( fieldName, dataField );
    }
View Full Code Here

    for( Comparable field : fields )
      {
      if( field instanceof Number )
        throw new IllegalArgumentException( "all fields must be names, not ordinal, got: " + field );

      dataFields.add( new CategoricalDataField( (String) field, fields.getType( field ), categories[ fields.getPos( field ) ] ) );
      }

    return dataFields;
    }
View Full Code Here

TOP

Related Classes of cascading.pattern.datafield.CategoricalDataField

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.