org.pmml4s.model

Model

abstract class Model extends HasParent with HasVersion with HasWrappedModelAttributes with HasMiningSchema with HasOutput with HasModelStats with HasModelExplanation with HasTargets with HasLocalTransformations with FieldScope with ModelLocation with HasTargetFields with Predictable with HasModelVerification with PmmlElement

Abstract class that represents a PMML model

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Model
  2. PmmlElement
  3. Serializable
  4. Serializable
  5. HasExtensions
  6. HasModelVerification
  7. Predictable
  8. HasTargetFields
  9. ModelLocation
  10. FieldScope
  11. HasField
  12. HasLocalTransformations
  13. HasTargets
  14. HasModelExplanation
  15. HasModelStats
  16. HasOutput
  17. HasMiningSchema
  18. HasWrappedModelAttributes
  19. HasModelAttributes
  20. HasVersion
  21. HasParent
  22. AnyRef
  23. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Model()

Abstract Value Members

  1. abstract def attributes: ModelAttributes

    Common attributes of this model

    Common attributes of this model

    Definition Classes
    HasWrappedModelAttributes
  2. abstract def createOutputs(): ModelOutputs

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

  3. abstract def localTransformations: Option[LocalTransformations]

    The optional local transformations.

    The optional local transformations.

    Definition Classes
    HasLocalTransformations
  4. abstract def miningSchema: MiningSchema

    Definition Classes
    HasMiningSchema
  5. abstract def modelElement: ModelElement

    Model element type.

  6. abstract def modelExplanation: Option[ModelExplanation]

    Definition Classes
    HasModelExplanation
  7. abstract def modelStats: Option[ModelStats]

    Definition Classes
    HasModelStats
  8. abstract def modelVerification: Option[ModelVerification]

    Definition Classes
    HasModelVerification
  9. abstract def output: Option[Output]

    Definition Classes
    HasOutput
  10. abstract val parent: Model

    The parent model.

    The parent model.

    Definition Classes
    HasParent
  11. abstract def predict(values: Series): Series

    Predicts values for a given data series.

    Predicts values for a given data series.

    Definition Classes
    ModelPredictable
  12. abstract def targets: Option[Targets]

    Definition Classes
    HasTargets

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def algorithmName: Option[String]

    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
  7. def anyMissing(series: Series): Boolean

    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
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def candidateOutputFields: Array[OutputField]

    Definition Classes
    HasOutput
  10. def candidateOutputSchema: StructType

    The schema of candidate outputs.

  11. def classes(name: String): Array[Any]

    Returns class labels of the specified target.

  12. lazy val classes: Array[Any]

    The class labels in a classification model.

  13. def clone(): AnyRef

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

    Definition Classes
    HasOutput
  15. def containInterResults: Boolean

    Definition Classes
    HasOutput
  16. var customOutputFields: Array[OutputField]

    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
  17. def dVersion: Double

    Returns PMML version as a double value

    Returns PMML version as a double value

    Definition Classes
    HasVersion
  18. def dataDictionary: DataDictionary

    The data dictionary of this model.

  19. def defaultOutputFields: Array[OutputField]

    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
  20. def encode(series: Series): DSeries

    Encodes the input series.

    Encodes the input series.

    Attributes
    protected
  21. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  23. def extensions: Seq[Extension]

    Definition Classes
    HasExtensions
  24. def field(name: String): Field

    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

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

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

  26. def finalize(): Unit

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

    Describe the kind of mining model, e.

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

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

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

    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
  30. def hasExtensions: Boolean

    Definition Classes
    HasExtensions
  31. def hasTarget: Boolean

    Definition Classes
    HasTargetFields
  32. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  33. def header: Header

    The header of this model.

  34. lazy val implicitInputDerivedFields: Array[Field]

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

  35. def importances: Map[String, Double]

    Returns importances of predictors.

  36. def inferClasses: Array[Any]

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

  37. lazy val inputDerivedFields: Array[Field]

    Referenced derived fields.

  38. lazy val inputFields: Array[Field]

    All input fields in an array.

  39. lazy val inputNames: Array[String]

    All input names in an array.

  40. lazy val inputSchema: StructType

    The schema of inputs.

  41. def isAssociationRules: Boolean

    Tests if this is a association rules model.

    Tests if this is a association rules model.

    Definition Classes
    HasModelAttributes
  42. def isBinary: Boolean

    Tests if the target is a binary field

  43. def isClassification(name: String): Boolean

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

  44. def isClassification: Boolean

    Tests if this is a classification model.

    Tests if this is a classification model.

    Definition Classes
    ModelHasModelAttributes
  45. def isClustering: Boolean

    Tests if this is a clustering model.

    Tests if this is a clustering model.

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

    Definition Classes
    Any
  47. def isMixed: Boolean

    Tests if this is a mixed model.

    Tests if this is a mixed model.

    Definition Classes
    HasModelAttributes
  48. def isOrdinal: Boolean

    Tests if the target is an ordinal field

  49. def isPredictionOnly: Boolean

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

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

  51. def isRegression: Boolean

    Tests if this is a regression model.

    Tests if this is a regression model.

    Definition Classes
    ModelHasModelAttributes
  52. def isScorable: Boolean

    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
  53. def isSequences: Boolean

    Tests if this is a sequences model.

    Tests if this is a sequences model.

    Definition Classes
    HasModelAttributes
  54. def isSubModel: Boolean

    Definition Classes
    ModelLocation
  55. def isTimeSeries: Boolean

    Tests if this is a time series model.

    Tests if this is a time series model.

    Definition Classes
    HasModelAttributes
  56. def isTopLevelModel: Boolean

    Definition Classes
    ModelLocation
  57. def modelName: Option[String]

    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
  58. def multiTargets: Boolean

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

    Definition Classes
    AnyRef
  60. final def notify(): Unit

    Definition Classes
    AnyRef
  61. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  62. lazy val nullSeries: Series

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

  63. def numClasses(name: String): Int

    Returns the number of class labels of the specified target.

  64. lazy val numClasses: Int

    The number of class labels in a classification model.

  65. def opType(name: String): OpType

    Returns optype of the specified target.

  66. lazy val opType: OpType

    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.

  67. def outputFields: Array[OutputField]

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

    Definition Classes
    HasOutput
  69. def outputNames: Array[String]

    Definition Classes
    HasOutput
  70. def outputSchema: StructType

    The schema of final outputs.

  71. def postClassification(name: String = null): (Any, Map[Any, Double])

    Attributes
    protected
  72. def postPredictedValue(outputs: MutablePredictedValue, name: String = null): MutablePredictedValue

    Attributes
    protected
  73. def postRegression(predictedValue: Any, name: String = null): Any

    Attributes
    protected
  74. def predict(it: Iterator[Series]): Iterator[Series]

  75. def predict(json: String): String

    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

  76. def predict(values: List[Any]): List[Any]

  77. def predict[T](values: Array[T]): Array[Any]

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

  78. def predict(values: (String, Any)*): Seq[(String, Any)]

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

  79. def predict(values: Map[String, Any]): Map[String, Any]

    Predicts values for a given data map of Java.

  80. def predict(values: Map[String, Any]): Map[String, Any]

    Predicts values for a given data map.

  81. lazy val predictedValueIndex: Int

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

    Pre-process the input series.

    Pre-process the input series.

    Attributes
    protected
  83. def probabilitiesSupported: Boolean

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

  84. def result(series: Series, modelOutputs: ModelOutputs, fields: Array[OutputField] = Array.empty): Series

    Attributes
    protected
  85. def setOutputFields(outputFields: Array[OutputField]): Model.this.type

    Definition Classes
    HasOutput
  86. def setParent(parent: Model): Model.this.type

    Definition Classes
    HasParent
  87. def setSupplementOutput(value: Boolean): Model.this.type

    Definition Classes
    HasOutput
  88. def singleTarget: Boolean

    Definition Classes
    HasTargetFields
  89. def size: Int

    Definition Classes
    HasTargetFields
  90. var supplementOutput: Boolean

    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
  91. final def synchronized[T0](arg0: ⇒ T0): T0

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

    The class labels of all categorical targets.

  93. lazy val targetField: Field

    The first target field for the supervised model.

  94. lazy val targetFields: Array[Field]

    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.

  95. def targetFieldsOfResidual: Array[Field]

    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
  96. def targetName: String

    Name of the first target for the supervised model.

    Name of the first target for the supervised model.

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

    All target names in an array.

    All target names in an array.

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

    Definition Classes
    HasOutput
  99. def toString(): String

    Definition Classes
    AnyRef → Any
  100. def transformationDictionary: Option[TransformationDictionary]

    The optional transformation dictionary.

  101. def unionCandidateOutputFields: Array[OutputField]

    Definition Classes
    HasOutput
  102. def unionOutputFields: Array[OutputField]

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

    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.

  104. lazy val usedSchema: StructType

    The schema of used fields.

  105. def version: String

    PMML version.

    PMML version.

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

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