Class

org.pmml4s.model

AssociationModel

Related Doc: package model

Permalink

class AssociationModel extends Model with HasWrappedAssociationAttributes

The Association Rule model represents rules where some set of items is associated to another set of items. For example a rule can express that a certain product or set of products is often bought in combination with a certain set of other products, also known as Market Basket Analysis. An Association Rule model typically has two variables: one for grouping records together into transactions (usageType="group") and another that uniquely identifies each record (usageType="active"). Alternatively, association rule models can be built on regular data, where each category of each categorical field is an item. Yet another possible format of data is a table with true/false values, where only the fields having true value in a record are considered valid items.

An Association Rule model consists of four major parts: - Model attributes - Items - ItemSets - AssociationRules

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AssociationModel
  2. HasWrappedAssociationAttributes
  3. HasAssociationAttributes
  4. Model
  5. PmmlElement
  6. Serializable
  7. Serializable
  8. HasExtensions
  9. HasModelVerification
  10. Predictable
  11. HasTargetFields
  12. ModelLocation
  13. FieldScope
  14. HasField
  15. HasLocalTransformations
  16. HasTargets
  17. HasModelExplanation
  18. HasModelStats
  19. HasOutput
  20. HasMiningSchema
  21. HasWrappedModelAttributes
  22. HasModelAttributes
  23. HasVersion
  24. HasParent
  25. AnyRef
  26. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AssociationModel(parent: Model, attributes: AssociationAttributes, miningSchema: MiningSchema, items: Array[Item], itemsets: Array[Itemset], associationRules: Array[AssociationRule], output: Option[Output] = None, targets: Option[Targets] = None, localTransformations: Option[LocalTransformations] = None, modelStats: Option[ModelStats] = None, modelExplanation: Option[ModelExplanation] = None, modelVerification: Option[ModelVerification] = None, extensions: Seq[Extension] = immutable.Seq.empty)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val activeField: Field

    Permalink
  5. val activeFields: Array[Field]

    Permalink
  6. val activeNames: Array[String]

    Permalink
  7. def algorithmName: Option[String]

    Permalink

    The algorithm name is free-type and can be any description for the specific algorithm that produced the model.

    The algorithm name is free-type and can be any description for the specific algorithm that produced the model. This attribute is for information only.

    Definition Classes
    HasWrappedModelAttributesHasModelAttributes
  8. def anyMissing(series: Series): Boolean

    Permalink

    Returns true if there are any missing values of all input fields in the specified series.

    Returns true if there are any missing values of all input fields in the specified series.

    Attributes
    protected
    Definition Classes
    Model
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. val associationRules: Array[AssociationRule]

    Permalink
  11. val attributes: AssociationAttributes

    Permalink

    Common attributes of this model

    Common attributes of this model

    Definition Classes
    AssociationModelHasWrappedAssociationAttributesHasWrappedModelAttributes
  12. def avgNumberOfItemsPerTA: Option[Double]

    Permalink

    The average number of items contained in a transaction.

    The average number of items contained in a transaction.

    Definition Classes
    HasWrappedAssociationAttributesHasAssociationAttributes
  13. def candidateOutputFields: Array[OutputField]

    Permalink
    Definition Classes
    HasOutput
  14. def candidateOutputSchema: StructType

    Permalink

    The schema of candidate outputs.

    The schema of candidate outputs.

    Definition Classes
    Model
  15. def classes(name: String): Array[Any]

    Permalink

    Returns class labels of the specified target.

    Returns class labels of the specified target.

    Definition Classes
    Model
  16. lazy val classes: Array[Any]

    Permalink

    The class labels in a classification model.

    The class labels in a classification model.

    Definition Classes
    Model
  17. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. def combineOutputFields(listA: Array[OutputField], listB: Array[OutputField]): Array[OutputField]

    Permalink
    Definition Classes
    HasOutput
  19. def containInterResults: Boolean

    Permalink
    Definition Classes
    HasOutput
  20. def createOutputs(): AssociationOutputs

    Permalink

    Creates an object of subclass of ModelOutputs that is for writing into an output series.

    Creates an object of subclass of ModelOutputs that is for writing into an output series.

    Definition Classes
    AssociationModelModel
  21. var customOutputFields: Array[OutputField]

    Permalink

    User-defined custom output fields, both the internal output of PMML and predefined output are ignored when the field is specified.

    User-defined custom output fields, both the internal output of PMML and predefined output are ignored when the field is specified.

    Definition Classes
    HasOutput
  22. def dVersion: Double

    Permalink

    Returns PMML version as a double value

    Returns PMML version as a double value

    Definition Classes
    HasVersion
  23. def dataDictionary: DataDictionary

    Permalink

    The data dictionary of this model.

    The data dictionary of this model.

    Definition Classes
    Model
  24. def defaultOutputFields: Array[OutputField]

    Permalink

    Returns all candidates output fields of this model when there is no output specified explicitly.

    Returns all candidates output fields of this model when there is no output specified explicitly.

    Definition Classes
    ModelHasOutput
  25. def encode(series: Series): DSeries

    Permalink

    Encodes the input series.

    Encodes the input series.

    Attributes
    protected
    Definition Classes
    Model
  26. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  28. val extensions: Seq[Extension]

    Permalink
    Definition Classes
    AssociationModelHasExtensions
  29. def field(name: String): Field

    Permalink

    Returns the field of a given name.

    Returns the field of a given name.

    Definition Classes
    HasField
    Exceptions thrown

    FieldNotFoundException if a field with the given name does not exist

  30. def fieldsOfUsageType(typ: UsageType): Array[Field]

    Permalink

    Get fields by its usage type: 'active', 'target', 'predicted', 'group' and so on

    Get fields by its usage type: 'active', 'target', 'predicted', 'group' and so on

    Definition Classes
    Model
  31. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  32. def functionName: MiningFunction

    Permalink

    Describe the kind of mining model, e.g., whether it is intended to be used for clustering or for classification.

    Describe the kind of mining model, e.g., whether it is intended to be used for clustering or for classification.

    Definition Classes
    HasWrappedModelAttributesHasModelAttributes
  33. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  34. def getField(name: String): Option[Field]

    Permalink

    Returns the field of a given name, None if a field with the given name does not exist.

    Returns the field of a given name, None if a field with the given name does not exist.

    Definition Classes
    ModelHasField
  35. val groupField: Field

    Permalink
  36. def hasExtensions: Boolean

    Permalink
    Definition Classes
    HasExtensions
  37. def hasTarget: Boolean

    Permalink
    Definition Classes
    HasTargetFields
  38. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  39. def header: Header

    Permalink

    The header of this model.

    The header of this model.

    Definition Classes
    Model
  40. lazy val implicitInputDerivedFields: Array[Field]

    Permalink

    Implicit referenced derived fields for the sub-model except ones defined in the mining schema.

    Implicit referenced derived fields for the sub-model except ones defined in the mining schema.

    Definition Classes
    Model
  41. def importances: Map[String, Double]

    Permalink

    Returns importances of predictors.

    Returns importances of predictors.

    Definition Classes
    Model
  42. def inferClasses: Array[Any]

    Permalink

    The sub-classes can override this method to provide classes of target inside model.

    The sub-classes can override this method to provide classes of target inside model.

    Definition Classes
    Model
  43. lazy val inputDerivedFields: Array[Field]

    Permalink

    Referenced derived fields.

    Referenced derived fields.

    Definition Classes
    Model
  44. lazy val inputFields: Array[Field]

    Permalink

    All input fields in an array.

    All input fields in an array.

    Definition Classes
    Model
  45. lazy val inputNames: Array[String]

    Permalink

    All input names in an array.

    All input names in an array.

    Definition Classes
    Model
  46. lazy val inputSchema: StructType

    Permalink

    The schema of inputs.

    The schema of inputs.

    Definition Classes
    Model
  47. def isAssociationRules: Boolean

    Permalink

    Tests if this is a association rules model.

    Tests if this is a association rules model.

    Definition Classes
    HasModelAttributes
  48. def isBinary: Boolean

    Permalink

    Tests if the target is a binary field

    Tests if the target is a binary field

    Definition Classes
    Model
  49. def isClassification(name: String): Boolean

    Permalink

    Tests if this is a classification model of the specified target, it's applicable for multiple targets.

    Tests if this is a classification model of the specified target, it's applicable for multiple targets.

    Definition Classes
    Model
  50. def isClassification: Boolean

    Permalink

    Tests if this is a classification model.

    Tests if this is a classification model.

    Definition Classes
    ModelHasModelAttributes
  51. def isClustering: Boolean

    Permalink

    Tests if this is a clustering model.

    Tests if this is a clustering model.

    Definition Classes
    HasModelAttributes
  52. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  53. def isMixed: Boolean

    Permalink

    Tests if this is a mixed model.

    Tests if this is a mixed model.

    Definition Classes
    HasModelAttributes
  54. def isOrdinal: Boolean

    Permalink

    Tests if the target is an ordinal field

    Tests if the target is an ordinal field

    Definition Classes
    Model
  55. def isPredictionOnly: Boolean

    Permalink
    Definition Classes
    HasOutput
  56. def isRegression(name: String): Boolean

    Permalink

    Tests if this is a regression model of the specified target, it's applicable for multiple targets.

    Tests if this is a regression model of the specified target, it's applicable for multiple targets.

    Definition Classes
    Model
  57. def isRegression: Boolean

    Permalink

    Tests if this is a regression model.

    Tests if this is a regression model.

    Definition Classes
    ModelHasModelAttributes
  58. def isScorable: Boolean

    Permalink

    Indicates if the model is valid for scoring.

    Indicates if the model is valid for scoring. If this attribute is true or if it is missing, then the model should be processed normally. However, if the attribute is false, then the model producer has indicated that this model is intended for information purposes only and should not be used to generate results.

    Definition Classes
    HasWrappedModelAttributesHasModelAttributes
  59. def isSequences: Boolean

    Permalink

    Tests if this is a sequences model.

    Tests if this is a sequences model.

    Definition Classes
    HasModelAttributes
  60. def isSubModel: Boolean

    Permalink
    Definition Classes
    ModelLocation
  61. def isTimeSeries: Boolean

    Permalink

    Tests if this is a time series model.

    Tests if this is a time series model.

    Definition Classes
    HasModelAttributes
  62. def isTopLevelModel: Boolean

    Permalink
    Definition Classes
    ModelLocation
  63. val items: Array[Item]

    Permalink
  64. val itemsets: Array[Itemset]

    Permalink
  65. def lengthLimit: Option[Int]

    Permalink

    The maximum number of items contained in a rule which was used to limit the number of rules.

    The maximum number of items contained in a rule which was used to limit the number of rules.

    Definition Classes
    HasWrappedAssociationAttributesHasAssociationAttributes
  66. val localTransformations: Option[LocalTransformations]

    Permalink

    The optional local transformations.

    The optional local transformations.

    Definition Classes
    AssociationModelHasLocalTransformations
  67. def maxNumberOfItemsPerTA: Option[Int]

    Permalink

    The number of items contained in the largest transaction.

    The number of items contained in the largest transaction.

    Definition Classes
    HasWrappedAssociationAttributesHasAssociationAttributes
  68. def minimumConfidence: Double

    Permalink

    The minimum confidence value satisfied by all rules.

    The minimum confidence value satisfied by all rules. Confidence is calculated as (support (rule) / support(antecedent)).

    Definition Classes
    HasWrappedAssociationAttributesHasAssociationAttributes
  69. def minimumSupport: Double

    Permalink

    The minimum relative support value (#supporting transactions / #total transactions) satisfied by all rules.

    The minimum relative support value (#supporting transactions / #total transactions) satisfied by all rules.

    Definition Classes
    HasWrappedAssociationAttributesHasAssociationAttributes
  70. val miningSchema: MiningSchema

    Permalink
    Definition Classes
    AssociationModelHasMiningSchema
  71. def modelElement: ModelElement

    Permalink

    Model element type.

    Model element type.

    Definition Classes
    AssociationModelModel
  72. val modelExplanation: Option[ModelExplanation]

    Permalink
    Definition Classes
    AssociationModelHasModelExplanation
  73. def modelName: Option[String]

    Permalink

    Identifies the model with a unique name in the context of the PMML file.

    Identifies the model with a unique name in the context of the PMML file. This attribute is not required. Consumers of PMML models are free to manage the names of the models at their discretion.

    Definition Classes
    HasWrappedModelAttributesHasModelAttributes
  74. val modelStats: Option[ModelStats]

    Permalink
    Definition Classes
    AssociationModelHasModelStats
  75. val modelVerification: Option[ModelVerification]

    Permalink
    Definition Classes
    AssociationModelHasModelVerification
  76. def multiTargets: Boolean

    Permalink
    Definition Classes
    HasTargetFields
  77. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  78. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  79. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  80. lazy val nullSeries: Series

    Permalink

    A series with all null values is returned when can not produce a result.

    A series with all null values is returned when can not produce a result.

    Definition Classes
    Model
  81. def numClasses(name: String): Int

    Permalink

    Returns the number of class labels of the specified target.

    Returns the number of class labels of the specified target.

    Definition Classes
    Model
  82. lazy val numClasses: Int

    Permalink

    The number of class labels in a classification model.

    The number of class labels in a classification model.

    Definition Classes
    Model
  83. def numberOfItems: Int

    Permalink

    The number of different items contained in the input data.

    The number of different items contained in the input data. This number may be greater than or equal to the number of items contained in the model. The value will be greater if any items in the input data are excluded from the model, as a consequence of not being referenced by the model.

    Definition Classes
    HasWrappedAssociationAttributesHasAssociationAttributes
  84. def numberOfItemsets: Int

    Permalink

    The number of itemsets contained in the model.

    The number of itemsets contained in the model.

    Definition Classes
    HasWrappedAssociationAttributesHasAssociationAttributes
  85. def numberOfRules: Int

    Permalink

    The number of rules contained in the model.

    The number of rules contained in the model.

    Definition Classes
    HasWrappedAssociationAttributesHasAssociationAttributes
  86. def numberOfTransactions: Int

    Permalink

    The number of transactions contained in the input data.

    The number of transactions contained in the input data.

    Definition Classes
    HasWrappedAssociationAttributesHasAssociationAttributes
  87. def opType(name: String): OpType

    Permalink

    Returns optype of the specified target.

    Returns optype of the specified target.

    Definition Classes
    Model
  88. lazy val opType: OpType

    Permalink

    When Target specifies optype then it overrides the optype attribute in a corresponding MiningField, if it exists.

    When Target specifies optype then it overrides the optype attribute in a corresponding MiningField, if it exists. If the target does not specify optype then the MiningField is used as default. And, in turn, if the MiningField does not specify an optype, it is taken from the corresponding DataField. In other words, a MiningField overrides a DataField, and a Target overrides a MiningField.

    Definition Classes
    Model
  89. val output: Option[Output]

    Permalink
    Definition Classes
    AssociationModelHasOutput
  90. def outputFields: Array[OutputField]

    Permalink
    Definition Classes
    HasOutput
  91. def outputIndex(feature: ResultFeature, value: Option[Any] = None): Int

    Permalink
    Definition Classes
    HasOutput
  92. def outputNames: Array[String]

    Permalink
    Definition Classes
    HasOutput
  93. def outputSchema: StructType

    Permalink

    The schema of final outputs.

    The schema of final outputs.

    Definition Classes
    Model
  94. var parent: Model

    Permalink

    The parent model.

    The parent model.

    Definition Classes
    AssociationModelHasParent
  95. def postClassification(name: String = null): (Any, Map[Any, Double])

    Permalink
    Attributes
    protected
    Definition Classes
    Model
  96. def postPredictedValue(outputs: MutablePredictedValue, name: String = null): MutablePredictedValue

    Permalink
    Attributes
    protected
    Definition Classes
    Model
  97. def postRegression(predictedValue: Any, name: String = null): Any

    Permalink
    Attributes
    protected
    Definition Classes
    Model
  98. def predict(values: Series): Series

    Permalink

    Predicts values for a given data series.

    Predicts values for a given data series.

    Definition Classes
    AssociationModelModelPredictable
  99. def predict(it: Iterator[Series]): Iterator[Series]

    Permalink
    Definition Classes
    Model
  100. def predict(json: String): String

    Permalink

    Predicts one or multiple records in json format, there are two formats supported:

    Predicts one or multiple records in json format, there are two formats supported:

    - ‘records’ : list like [{column -> value}, … , {column -> value}] - ‘split’ : dict like {‘columns’ -> [columns], ‘data’ -> [values]}

    json

    Records in json

    returns

    Results in json

    Definition Classes
    Model
  101. def predict(values: List[Any]): List[Any]

    Permalink
    Definition Classes
    Model
  102. def predict[T](values: Array[T]): Array[Any]

    Permalink

    Predicts values for a given Array, and the order of those values is supposed as same as the input fields list

    Predicts values for a given Array, and the order of those values is supposed as same as the input fields list

    Definition Classes
    Model
  103. def predict(values: (String, Any)*): Seq[(String, Any)]

    Permalink

    Predicts values for a given list of key/value pairs.

    Predicts values for a given list of key/value pairs.

    Definition Classes
    Model
  104. def predict(values: Map[String, Any]): Map[String, Any]

    Permalink

    Predicts values for a given data map of Java.

    Predicts values for a given data map of Java.

    Definition Classes
    Model
  105. def predict(values: Map[String, Any]): Map[String, Any]

    Permalink

    Predicts values for a given data map.

    Predicts values for a given data map.

    Definition Classes
    Model
  106. lazy val predictedValueIndex: Int

    Permalink
    Definition Classes
    HasOutput
  107. def prepare(series: Series): (Series, Boolean)

    Permalink

    Pre-process the input series.

    Pre-process the input series.

    Attributes
    protected
    Definition Classes
    Model
  108. def probabilitiesSupported: Boolean

    Permalink

    Tests if probabilities of categories of target can be produced by this model.

    Tests if probabilities of categories of target can be produced by this model.

    Definition Classes
    Model
  109. def result(series: Series, modelOutputs: ModelOutputs, fields: Array[OutputField] = Array.empty): Series

    Permalink
    Attributes
    protected
    Definition Classes
    Model
  110. def setOutputFields(outputFields: Array[OutputField]): AssociationModel.this.type

    Permalink
    Definition Classes
    HasOutput
  111. def setParent(parent: Model): AssociationModel.this.type

    Permalink
    Definition Classes
    HasParent
  112. def setSupplementOutput(value: Boolean): AssociationModel.this.type

    Permalink
    Definition Classes
    HasOutput
  113. def singleTarget: Boolean

    Permalink
    Definition Classes
    HasTargetFields
  114. def size: Int

    Permalink
    Definition Classes
    HasTargetFields
  115. var supplementOutput: Boolean

    Permalink

    A flag for whether to return those predefined output fields not exist in the output element explicitly.

    A flag for whether to return those predefined output fields not exist in the output element explicitly.

    Definition Classes
    HasOutput
  116. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  117. lazy val targetClasses: Map[String, Array[Any]]

    Permalink

    The class labels of all categorical targets.

    The class labels of all categorical targets.

    Definition Classes
    Model
  118. lazy val targetField: Field

    Permalink

    The first target field for the supervised model.

    The first target field for the supervised model.

    Definition Classes
    Model
  119. lazy val targetFields: Array[Field]

    Permalink

    All target fields in an array.

    All target fields in an array. Multiple target fields are allowed. It depends on the kind of the model whether prediction of multiple fields is supported.

    Definition Classes
    Model
  120. def targetFieldsOfResidual: Array[Field]

    Permalink

    Returns targets that are residual values to be computed, the input data must include target values.

    Returns targets that are residual values to be computed, the input data must include target values.

    Definition Classes
    HasOutput
  121. def targetName: String

    Permalink

    Name of the first target for the supervised model.

    Name of the first target for the supervised model.

    Definition Classes
    HasTargetFields
  122. lazy val targetNames: Array[String]

    Permalink

    All target names in an array.

    All target names in an array.

    Definition Classes
    ModelHasTargetFields
  123. def targetNamesOfResidual: Array[String]

    Permalink
    Definition Classes
    HasOutput
  124. val targets: Option[Targets]

    Permalink
    Definition Classes
    AssociationModelHasTargets
  125. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  126. def topCriteria: Map[(Algorithm, RankBasis, RankOrder), Int]

    Permalink
  127. def transformationDictionary: Option[TransformationDictionary]

    Permalink

    The optional transformation dictionary.

    The optional transformation dictionary.

    Definition Classes
    Model
  128. def unionCandidateOutputFields: Array[OutputField]

    Permalink
    Definition Classes
    HasOutput
  129. def unionOutputFields: Array[OutputField]

    Permalink
    Definition Classes
    HasOutput
  130. lazy val usedFields: Array[Field]

    Permalink

    Setup indices to retrieve data from series faster by index instead of name, the index is immutable when model is built because the model object could run in multiple threads, so it's important make sure the model object is totally immutable.

    Setup indices to retrieve data from series faster by index instead of name, the index is immutable when model is built because the model object could run in multiple threads, so it's important make sure the model object is totally immutable.

    Setup indices of targets that are usually not used by the scoring process, they are only used when residual values to be computed.

    Definition Classes
    Model
  131. lazy val usedSchema: StructType

    Permalink

    The schema of used fields.

    The schema of used fields.

    Definition Classes
    Model
  132. def version: String

    Permalink

    PMML version.

    PMML version.

    Definition Classes
    HasVersion
  133. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  134. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  135. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from HasAssociationAttributes

Inherited from Model

Inherited from PmmlElement

Inherited from Serializable

Inherited from Serializable

Inherited from HasExtensions

Inherited from HasModelVerification

Inherited from Predictable

Inherited from HasTargetFields

Inherited from ModelLocation

Inherited from FieldScope

Inherited from HasField

Inherited from HasLocalTransformations

Inherited from HasTargets

Inherited from HasModelExplanation

Inherited from HasModelStats

Inherited from HasOutput

Inherited from HasMiningSchema

Inherited from HasWrappedModelAttributes

Inherited from HasModelAttributes

Inherited from HasVersion

Inherited from HasParent

Inherited from AnyRef

Inherited from Any

Ungrouped