org.pmml4s.model

SupportVectorMachineModel

class SupportVectorMachineModel extends Model with HasWrappedSupportVectorMachineAttributes

Support Vector Machine models for classification and regression are considered. A Support Vector Machine is a function f which is defined in the space spanned by the kernel basis functions K(x,xi) of the support vectors xi: f(x) = Sum_(i=1)n αi*K(x,xi) + b.

Here n is the number of all support vectors, αi are the basis coefficients and b is the absolute coefficient. In an equivalent interpretation, n could also be considered as the total number of all training vectors xi. Then the support vectors are the subset of all those vectors xi whose coefficients αi are greater than zero. The term Support Vector (SV) has also a geometrical interpretation because these vectors really support the discrimination function f(x) = 0 in the mechanical interpretation.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SupportVectorMachineModel
  2. HasWrappedSupportVectorMachineAttributes
  3. HasSupportVectorMachineAttributes
  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
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SupportVectorMachineModel(parent: Model, attributes: SupportVectorMachineAttributes, miningSchema: MiningSchema, kernelType: KernelType, vectorDictionary: VectorDictionary, supportVectorMachines: Array[SupportVectorMachine], output: Option[Output] = scala.None, targets: Option[Targets] = scala.None, localTransformations: Option[LocalTransformations] = scala.None, modelStats: Option[ModelStats] = scala.None, modelExplanation: Option[ModelExplanation] = scala.None, modelVerification: Option[ModelVerification] = scala.None, extensions: Seq[Extension] = ...)

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. val alternateTargetCategoryInferred: Option[Any]

  8. val alternateTargetCategoryRequired: Boolean

  9. 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
    Definition Classes
    Model
  10. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  11. val attributes: SupportVectorMachineAttributes

    Common attributes of this model

    Common attributes of this model

    Definition Classes
    SupportVectorMachineModelHasWrappedSupportVectorMachineAttributesHasWrappedModelAttributes
  12. def candidateOutputFields: Array[OutputField]

    Definition Classes
    HasOutput
  13. def candidateOutputSchema: StructType

    The schema of candidate outputs.

    The schema of candidate outputs.

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

    Returns class labels of the specified target.

    Returns class labels of the specified target.

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

    The class labels in a classification model.

    The class labels in a classification model.

    Definition Classes
    Model
  16. def classificationMethod: SVMClassificationMethod

    Defines which method is to be used in case of multi-class classification tasks.

    Defines which method is to be used in case of multi-class classification tasks. It can be either OneAgainstAll or OneAgainstOne. This attribute is not required for binary classification or regression.

    Definition Classes
    HasWrappedSupportVectorMachineAttributesHasSupportVectorMachineAttributes
  17. def clone(): AnyRef

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

    Definition Classes
    HasOutput
  19. def containInterResults: Boolean

    Definition Classes
    HasOutput
  20. def createOutputs(): SVMOutputs

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

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

    Definition Classes
    SupportVectorMachineModelModel
  21. 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
  22. def dVersion: Double

    Returns PMML version as a double value

    Returns PMML version as a double value

    Definition Classes
    HasVersion
  23. def dataDictionary: DataDictionary

    The data dictionary of this model.

    The data dictionary of this model.

    Definition Classes
    Model
  24. 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
  25. def encode(series: Series): DSeries

    Encodes the input series.

    Encodes the input series.

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

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

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

  29. 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

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

    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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  32. 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
  33. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  34. 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
  35. def hasExtensions: Boolean

    Definition Classes
    HasExtensions
  36. def hasTarget: Boolean

    Definition Classes
    HasTargetFields
  37. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  38. def header: Header

    The header of this model.

    The header of this model.

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

    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
  40. def importances: Map[String, Double]

    Returns importances of predictors.

    Returns importances of predictors.

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

    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
  42. lazy val inputDerivedFields: Array[Field]

    Referenced derived fields.

    Referenced derived fields.

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

    All input fields in an array.

    All input fields in an array.

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

    All input names in an array.

    All input names in an array.

    Definition Classes
    Model
  45. lazy val inputSchema: StructType

    The schema of inputs.

    The schema of inputs.

    Definition Classes
    Model
  46. def isAssociationRules: Boolean

    Tests if this is a association rules model.

    Tests if this is a association rules model.

    Definition Classes
    HasModelAttributes
  47. def isBinary: Boolean

    Tests if the target is a binary field

    Tests if the target is a binary field

    Definition Classes
    Model
  48. val isBinaryWithOnlyOneSupportVectorMachine: Boolean

  49. def isClassification(name: String): Boolean

    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

    Tests if this is a classification model.

    Tests if this is a classification model.

    Definition Classes
    ModelHasModelAttributes
  51. def isClustering: Boolean

    Tests if this is a clustering model.

    Tests if this is a clustering model.

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

    Definition Classes
    Any
  53. def isMixed: Boolean

    Tests if this is a mixed model.

    Tests if this is a mixed model.

    Definition Classes
    HasModelAttributes
  54. def isOrdinal: Boolean

    Tests if the target is an ordinal field

    Tests if the target is an ordinal field

    Definition Classes
    Model
  55. def isPredictionOnly: Boolean

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

    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

    Tests if this is a regression model.

    Tests if this is a regression model.

    Definition Classes
    ModelHasModelAttributes
  58. 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
  59. def isSequences: Boolean

    Tests if this is a sequences model.

    Tests if this is a sequences model.

    Definition Classes
    HasModelAttributes
  60. def isSubModel: Boolean

    Definition Classes
    ModelLocation
  61. def isTimeSeries: Boolean

    Tests if this is a time series model.

    Tests if this is a time series model.

    Definition Classes
    HasModelAttributes
  62. def isTopLevelModel: Boolean

    Definition Classes
    ModelLocation
  63. val kernelType: KernelType

  64. val localTransformations: Option[LocalTransformations]

    The optional local transformations.

    The optional local transformations.

    Definition Classes
    SupportVectorMachineModelHasLocalTransformations
  65. def maxWins: Boolean

    Used for classification models only.

    Used for classification models only. It determines if the target category corresponding to the highest value of a Support Vector machine is the winner. Default value is false, meaning the target category with the lowest SVM value wins, consistent with previous PMML versions. This attribute also affects the comparisons with threshold value, see below for details.

    Definition Classes
    HasWrappedSupportVectorMachineAttributesHasSupportVectorMachineAttributes
  66. val miningSchema: MiningSchema

  67. def modelElement: ModelElement

    Model element type.

    Model element type.

    Definition Classes
    SupportVectorMachineModelModel
  68. val modelExplanation: Option[ModelExplanation]

  69. 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
  70. val modelStats: Option[ModelStats]

  71. val modelVerification: Option[ModelVerification]

  72. def multiTargets: Boolean

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

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

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

    Definition Classes
    AnyRef
  76. lazy val nullSeries: Series

    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
  77. def numClasses(name: String): Int

    Returns the number of class labels of the specified target.

    Returns the number of class labels of the specified target.

    Definition Classes
    Model
  78. lazy val numClasses: Int

    The number of class labels in a classification model.

    The number of class labels in a classification model.

    Definition Classes
    Model
  79. def opType(name: String): OpType

    Returns optype of the specified target.

    Returns optype of the specified target.

    Definition Classes
    Model
  80. 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.

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

    Definition Classes
    SupportVectorMachineModelHasOutput
  82. def outputFields: Array[OutputField]

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

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

    Definition Classes
    HasOutput
  85. def outputSchema: StructType

    The schema of final outputs.

    The schema of final outputs.

    Definition Classes
    Model
  86. var parent: Model

    The parent model.

    The parent model.

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

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

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

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

    Predicts values for a given data series.

    Predicts values for a given data series.

    Definition Classes
    SupportVectorMachineModelModelPredictable
  91. def predict(it: Iterator[Series]): Iterator[Series]

    Definition Classes
    Model
  92. 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

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

    Definition Classes
    Model
  94. 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

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

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

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

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

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

    Predicts values for a given data map of Java.

    Predicts values for a given data map of Java.

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

    Predicts values for a given data map.

    Predicts values for a given data map.

    Definition Classes
    Model
  98. lazy val predictedValueIndex: Int

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

    Pre-process the input series.

    Pre-process the input series.

    Attributes
    protected
    Definition Classes
    Model
  100. def probabilitiesSupported: Boolean

    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
    SupportVectorMachineModelModel
  101. def result(series: Series, modelOutputs: ModelOutputs, fields: Array[OutputField] = Array.empty): Series

    Attributes
    protected
    Definition Classes
    Model
  102. def setOutputFields(outputFields: Array[OutputField]): SupportVectorMachineModel.this.type

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

    Definition Classes
    HasParent
  104. def setSupplementOutput(value: Boolean): SupportVectorMachineModel.this.type

    Definition Classes
    HasOutput
  105. def singleTarget: Boolean

    Definition Classes
    HasTargetFields
  106. def size: Int

    Definition Classes
    HasTargetFields
  107. 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
  108. val supportVectorMachines: Array[SupportVectorMachine]

  109. def svmRepresentation: SVMRepresentation

    Defines whether the SVM function is defined via support vectors or via the coefficients of the hyperplane for the case of linear kernel functions.

    Defines whether the SVM function is defined via support vectors or via the coefficients of the hyperplane for the case of linear kernel functions.

    Definition Classes
    HasWrappedSupportVectorMachineAttributesHasSupportVectorMachineAttributes
  110. final def synchronized[T0](arg0: ⇒ T0): T0

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

    The class labels of all categorical targets.

    The class labels of all categorical targets.

    Definition Classes
    Model
  112. lazy val targetField: Field

    The first target field for the supervised model.

    The first target field for the supervised model.

    Definition Classes
    Model
  113. 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.

    Definition Classes
    Model
  114. 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
  115. def targetName: String

    Name of the first target for the supervised model.

    Name of the first target for the supervised model.

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

    All target names in an array.

    All target names in an array.

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

    Definition Classes
    HasOutput
  118. val targets: Option[Targets]

    Definition Classes
    SupportVectorMachineModelHasTargets
  119. def threshold: Double

    Defines a discrimination boundary to be used in case of binary classification or whenever attribute classificationMethod is defined as OneAgainstOne for multi-class classification tasks.

    Defines a discrimination boundary to be used in case of binary classification or whenever attribute classificationMethod is defined as OneAgainstOne for multi-class classification tasks.

    Definition Classes
    HasWrappedSupportVectorMachineAttributesHasSupportVectorMachineAttributes
  120. def toString(): String

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

    The optional transformation dictionary.

    The optional transformation dictionary.

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

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

    Definition Classes
    HasOutput
  124. 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.

    Definition Classes
    Model
  125. lazy val usedSchema: StructType

    The schema of used fields.

    The schema of used fields.

    Definition Classes
    Model
  126. val vectorDictionary: VectorDictionary

  127. def version: String

    PMML version.

    PMML version.

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

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