public class PMMLAssociationModel extends PMMLModel
The frequent item sets contain references to items contained in the item list. The association rules contain references to the defined item sets.
Due to the way the model is defined, the model should be built in this order:
PMMLModel.MiningFunction
Constructor and Description |
---|
PMMLAssociationModel(Document document)
Construct a
PMMLAssociationObject from the given PMML
represented as an XML DOM. |
PMMLAssociationModel(PMMLModelSpec spec)
Construct a
PMMLAssociationObject from the given specification. |
Modifier and Type | Method and Description |
---|---|
void |
addAssociationRule(AssociationRule rule)
Add an association rule to the model.
|
void |
addItem(Item item)
Add an item to the model.
|
void |
addItemSet(ItemSet itemSet)
Add an item set to the model.
|
protected void |
buildModelElement(Element modelElem)
Subclasses must implement this method to fill-in the contents
of the model element.
|
String |
getAlgorithmName()
Get the algorithm name.
|
double |
getAvgItemsPerTxn()
Get the average items per transaction value.
|
Map<Integer,String> |
getItemLabelMap()
Create a mapping from item identifier to item label of the
items contained in this model.
|
Map<Integer,String> |
getItemNameMap()
Create a mapping from item identifier to item name of the
items contained in this model.
|
List<Item> |
getItems()
Return the list of items contained in the model.
|
List<ItemSet> |
getItemSets()
Return the list of frequent item sets contained in the model.
|
int |
getMaxItemsPerTxn()
Get the maximum items per transaction value.
|
double |
getMinConfidence()
Get the minimum confidence setting.
|
double |
getMinSupport()
Get the minimum support setting.
|
protected String |
getModelElementName()
Return the element name of the primary model element associated with
this PMML
|
List<AssociationRule> |
getRules()
Return the list of association rules contained in the model.
|
long |
getTxnCount()
Get the transaction count value.
|
protected void |
parseModelElement(Element modelElem)
Parse the given model element into the respective model object.
|
void |
setAlgorithmName(String algorithmName)
Set the name of the algorithm used to generate the association
model.
|
void |
setAvgItemsPerTxn(double avgItemsPerTxn)
Set the average items per transaction value.
|
void |
setMaxItemsPerTxn(int maxItemsPerTxn)
Set the maximum items per transaction value.
|
void |
setMinConfidence(double minConfidence)
Set the minimum confidence used to generate the rules within
this association model.
|
void |
setMinSupport(double minSupport)
Set the minimum support setting.
|
void |
setTxnCount(long txnCount)
Set the transaction count value.
|
findModelElement, getAnnotationText, getModelExplanation, getModelSpec, getVersion, parse, setAnnotationText, setModelExplanation, setVersion, toPMML
public PMMLAssociationModel(PMMLModelSpec spec)
PMMLAssociationObject
from the given specification.spec
- input specificationpublic PMMLAssociationModel(Document document)
PMMLAssociationObject
from the given PMML
represented as an XML DOM.document
- input PMML modelpublic long getTxnCount()
public void setTxnCount(long txnCount)
txnCount
- transaction countpublic double getMinSupport()
public void setMinSupport(double minSupport)
minSupport
- minimum supportpublic int getMaxItemsPerTxn()
public void setMaxItemsPerTxn(int maxItemsPerTxn)
maxItemsPerTxn
- maximum items per transactionpublic double getAvgItemsPerTxn()
public void setAvgItemsPerTxn(double avgItemsPerTxn)
avgItemsPerTxn
- average items per transactionpublic String getAlgorithmName()
public double getMinConfidence()
public void setMinConfidence(double minConfidence)
minConfidence
- minimum confidence valuepublic void setAlgorithmName(String algorithmName)
algorithmName
- the name of the algorithm usedpublic final void addItem(Item item)
item
- the item to add to the modelpublic List<Item> getItems()
public Map<Integer,String> getItemNameMap()
public Map<Integer,String> getItemLabelMap()
public List<ItemSet> getItemSets()
public List<AssociationRule> getRules()
public void addItemSet(ItemSet itemSet)
itemSet
- the item set to add to the modelpublic void addAssociationRule(AssociationRule rule)
rule
- an association rule to add to the modelprotected String getModelElementName()
PMMLModel
getModelElementName
in class PMMLModel
protected void buildModelElement(Element modelElem)
PMMLModel
buildModelElement
in class PMMLModel
modelElem
- the model elementprotected void parseModelElement(Element modelElem)
PMMLModel
parseModelElement
in class PMMLModel
modelElem
- root element of model objectCopyright © 2020 Actian Corporation. All rights reserved.