org.jpmml.manager
Class ModelManager<M extends Model>

java.lang.Object
  extended by org.jpmml.manager.PMMLManager
      extended by org.jpmml.manager.ModelManager<M>
All Implemented Interfaces:
Consumer
Direct Known Subclasses:
MiningModelManager, NeuralNetworkManager, RegressionModelManager, TreeModelManager

public abstract class ModelManager<M extends Model>
extends PMMLManager
implements Consumer


Constructor Summary
ModelManager()
           
ModelManager(PMML pmml)
           
 
Method Summary
 void addField(FieldName name, String displayName, OpType opType, DataType dataType, FieldUsageType fieldUsageType)
          Convenience method for adding a field declaration to DataDictionary and MiningSchema.
 MiningField addMiningField(FieldName name, FieldUsageType usageType)
           
protected static void ensureNotNull(Object object)
           
protected static void ensureNull(Object object)
           
 List<FieldName> getActiveFields()
          Gets the independent (ie. input) fields of a Model from its MiningSchema.
 MiningField getMiningField(FieldName name)
          Gets the definition of a field from the MiningSchema.
 List<FieldName> getMiningFields(FieldUsageType fieldUsageType)
           
 MiningSchema getMiningSchema()
           
abstract  M getModel()
           
 LocalTransformations getOrCreateLocalTransformations()
           
 Output getOrCreateOutput()
           
 OutputField getOutputField(FieldName name)
          Gets the definition of a field from the Output
 List<FieldName> getOutputFields()
          Gets the output fields of a Model from its Output.
 List<FieldName> getPredictedFields()
          Gets the dependent (ie. output) field(s) of a Model from its MiningSchema.
 FieldName getTarget()
           
 DerivedField resolve(FieldName name)
           
 
Methods inherited from class org.jpmml.manager.PMMLManager
addDataField, find, find, findAll, getDataDictionary, getDataField, getHeader, getModel, getModelManager, getModelManager, getModels, getOrCreateTransformationDictionary, getPmml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jpmml.manager.Consumer
getDataField, getSummary
 

Constructor Detail

ModelManager

public ModelManager()

ModelManager

public ModelManager(PMML pmml)
Method Detail

getModel

public abstract M getModel()
Throws:
ModelManagerException - If the Model does not exist

addField

public void addField(FieldName name,
                     String displayName,
                     OpType opType,
                     DataType dataType,
                     FieldUsageType fieldUsageType)
Convenience method for adding a field declaration to DataDictionary and MiningSchema.

See Also:
PMMLManager.addDataField(FieldName, String, OpType, DataType), addMiningField(FieldName, FieldUsageType)

getActiveFields

public List<FieldName> getActiveFields()
Description copied from interface: Consumer
Gets the independent (ie. input) fields of a Model from its MiningSchema.

Specified by:
getActiveFields in interface Consumer
See Also:
getActiveFields()

getTarget

public FieldName getTarget()

getPredictedFields

public List<FieldName> getPredictedFields()
Description copied from interface: Consumer
Gets the dependent (ie. output) field(s) of a Model from its MiningSchema.

Specified by:
getPredictedFields in interface Consumer
See Also:
getPredictedFields()

getMiningFields

public List<FieldName> getMiningFields(FieldUsageType fieldUsageType)

getMiningField

public MiningField getMiningField(FieldName name)
Description copied from interface: Consumer
Gets the definition of a field from the MiningSchema.

Specified by:
getMiningField in interface Consumer
See Also:
Consumer.getActiveFields(), Consumer.getPredictedFields(), getMiningField(FieldName)

addMiningField

public MiningField addMiningField(FieldName name,
                                  FieldUsageType usageType)

getOutputFields

public List<FieldName> getOutputFields()
Description copied from interface: Consumer
Gets the output fields of a Model from its Output.

Specified by:
getOutputFields in interface Consumer
See Also:
getOutputFields()

getOutputField

public OutputField getOutputField(FieldName name)
Description copied from interface: Consumer
Gets the definition of a field from the Output

Specified by:
getOutputField in interface Consumer
See Also:
Consumer.getOutputFields()

resolve

public DerivedField resolve(FieldName name)
Overrides:
resolve in class PMMLManager

getMiningSchema

public MiningSchema getMiningSchema()

getOrCreateLocalTransformations

public LocalTransformations getOrCreateLocalTransformations()

getOrCreateOutput

public Output getOrCreateOutput()

ensureNull

protected static void ensureNull(Object object)
                          throws ModelManagerException
Throws:
ModelManagerException

ensureNotNull

protected static void ensureNotNull(Object object)
                             throws ModelManagerException
Throws:
ModelManagerException


Copyright © 2013 University of Tartu. All Rights Reserved.