public class MiningSchema
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
MiningSchema(org.w3c.dom.Element model,
Instances dataDictionary,
weka.core.pmml.TransformationDictionary transDict)
Constructor for MiningSchema.
|
Modifier and Type | Method and Description |
---|---|
void |
applyMissingAndOutlierTreatments(double[] values)
Apply both missing and outlier treatments to an incoming instance.
|
void |
applyMissingValuesTreatment(double[] values)
Apply the missing value treatments (if any) to an incoming instance.
|
void |
applyOutlierTreatment(double[] values)
Apply the outlier treatment methods (if any) to an incoming instance.
|
void |
convertNumericAttToNominal(int index,
java.util.ArrayList<java.lang.String> newVals)
Convert a numeric attribute in the mining schema to nominal.
|
void |
convertStringAttsToNominal()
Method to convert any string attributes in the mining schema
Instances to nominal attributes.
|
java.util.ArrayList<DerivedFieldMetaInfo> |
getDerivedFields() |
Instances |
getFieldsAsInstances()
Get the all the fields (both mining schema and derived) as Instances.
|
java.util.ArrayList<MiningFieldMetaInfo> |
getMiningFields() |
Instances |
getMiningSchemaAsInstances()
Get the mining schema fields as an Instances object.
|
TargetMetaInfo |
getTargetMetaData()
Get the Target meta data.
|
weka.core.pmml.TransformationDictionary |
getTransformationDictionary()
Get the transformation dictionary .
|
boolean |
hasTargetMetaData()
Returns true if there is Target meta data.
|
java.lang.String |
toString()
Get a textual description of the mining schema.
|
public MiningSchema(org.w3c.dom.Element model, Instances dataDictionary, weka.core.pmml.TransformationDictionary transDict) throws java.lang.Exception
model
- the Element
encapsulating the pmml modeldataDictionary
- the data dictionary as an Instances objectjava.lang.Exception
- if something goes wrong during construction of the
mining schemapublic void applyMissingValuesTreatment(double[] values) throws java.lang.Exception
values
- an array of doubles in order of the fields in the mining schema
that represents the incoming instance (note: use PMMLUtils.instanceToSchema()
to generate this).java.lang.Exception
- if something goes wrong during missing value handlingpublic void applyOutlierTreatment(double[] values) throws java.lang.Exception
values
- an array of doubles in order of the fields in the mining schema
that represents the incoming instance (note: use PMMLUtils.instanceToSchema()
to generate this).java.lang.Exception
- if something goes wrong during outlier treatment handlingpublic void applyMissingAndOutlierTreatments(double[] values) throws java.lang.Exception
values
- an array of doubles in order of the fields in the mining schema
that represents the incoming instance (note: use MappingInfo.instanceToSchema()
to generate this).java.lang.Exception
- if something goes wrong during this processpublic Instances getFieldsAsInstances()
public Instances getMiningSchemaAsInstances()
public weka.core.pmml.TransformationDictionary getTransformationDictionary()
public boolean hasTargetMetaData()
public TargetMetaInfo getTargetMetaData()
public void convertStringAttsToNominal()
public void convertNumericAttToNominal(int index, java.util.ArrayList<java.lang.String> newVals)
index
- the index of the attribute to convertnewVals
- an ArrayList of the values of the nominal attributepublic java.util.ArrayList<DerivedFieldMetaInfo> getDerivedFields()
public java.util.ArrayList<MiningFieldMetaInfo> getMiningFields()
public java.lang.String toString()
toString
in class java.lang.Object