Package org.dmg.pmml

Examples of org.dmg.pmml.DataType


    FieldName fieldName = new FieldName( name );

    if( getPMMLModel().getDataField( fieldName ) != null )
      throw new IllegalStateException( "field name already in dictionary" );

    DataType dataType = DataTypes.getTypeToPmml( type );

    if( dataType == null )
      throw new IllegalStateException( "no data type mapping from: " + Util.getTypeName( type ) );

    getPMMLModel().addDataField( fieldName, OpType.CONTINUOUS, dataType );
View Full Code Here


  public static ContinuousDataField createContinuousDataField( String name, org.dmg.pmml.DataField dataField )
    {
    if( !dataField.getIntervals().isEmpty() )
      throw new UnsupportedOperationException( "intervals not supported" );

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

    return new ContinuousDataField( name, type );
    }
View Full Code Here

    return new ContinuousDataField( name, type );
    }

  public static CategoricalDataField createCategoricalDataField( String name, org.dmg.pmml.DataField dataField )
    {
    DataType dataType = dataField.getDataType();
    Type type = DataTypes.getPmmlToType( dataType );

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

TOP

Related Classes of org.dmg.pmml.DataType

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.