public class FPGrowth extends CompositeOperator implements Serializable, RecordSinkOperator
The input data is required to have two fields: a transaction identifier and an item identifier. The transaction identifier discriminates transactions. The item identifier identifies items within transactions. Transactions are assumed to be in line item order (i.e. one input record per item in a transaction). Transactions records are also assumed to be contiguous. An optional label field may also be specified which will be used for display purposes instead of the transaction identifiers.
The output is a PMML based association model. The model contains frequent items, frequent item sets and association rules.
Constructor and Description |
---|
FPGrowth() |
Modifier and Type | Method and Description |
---|---|
protected void |
compose(CompositionContext ctx)
Compose the body of this operator.
|
String |
getAnnotationText()
Get the annotation text property.
|
RecordPort |
getInput()
Get the input port that should contain transactions.
|
String |
getItemFieldName()
Get the item field name property.
|
RecordPort |
getItemSets()
Get the output port containing the frequent item sets.
|
int |
getK()
Get the item-set cardinality property.
|
String |
getLabelFieldName()
Get the optional label field name property.
|
double |
getMinConfidence()
Get the minimum confidence property.
|
double |
getMinSupport()
Get the minimum support property.
|
PMMLPort |
getModel()
Get the output port containing the generated PMML-based association model.
|
String |
getTxnFieldName()
Get the transaction identifier field name property.
|
void |
setAnnotationText(String annotationText)
The text provided will be added as an annotation to the
output PMML model.
|
void |
setItemFieldName(String itemFieldName)
Set the item field name property.
|
void |
setK(int k)
Set the largest item-set cardinality wanted.
|
void |
setLabelFieldName(String labelFieldName)
Set the optional label field name property.
|
void |
setMinConfidence(double minConfidence)
Set the minimum confidence threshold.
|
void |
setMinSupport(double minSupport)
Set the minimum support property.
|
void |
setTxnFieldName(String txnFieldName)
Set the transaction identifier field name property.
|
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disableParallelism, getInputPorts, getOutputPorts
public String getTxnFieldName()
public void setTxnFieldName(String txnFieldName)
txnFieldName
- transaction field namepublic String getItemFieldName()
public void setItemFieldName(String itemFieldName)
itemFieldName
- item field namepublic String getLabelFieldName()
public void setLabelFieldName(String labelFieldName)
labelFieldName
- label field namepublic double getMinSupport()
public void setMinSupport(double minSupport)
minSupport
- minimum supportpublic int getK()
public void setK(int k)
k
- the largest item-set cardinality wantedpublic double getMinConfidence()
public void setMinConfidence(double minConfidence)
The minimum confidence value must be between 0.0 and 1.0 (exclusively).
minConfidence
- the minConfidence value to setpublic String getAnnotationText()
public void setAnnotationText(String annotationText)
annotationText
- annotation textpublic PMMLPort getModel()
public RecordPort getItemSets()
public RecordPort getInput()
getInput
in interface RecordSinkOperator
getInput
in interface SinkOperator<RecordPort>
protected void compose(CompositionContext ctx)
CompositeOperator
OperatorComposable.add(O)
OperatorComposable.connect(P, P)
. This includes
connections from the composite's input ports to sub-operators, connections between sub-operators, and
connections from sub-operators output ports to the composite's output portscompose
in class CompositeOperator
ctx
- the contextCopyright © 2016 Actian Corporation. All rights reserved.