org.pmml4s.common

Type members

Classlikes

case class AboveInterval(leftMargin: Double, isOpen: Boolean) extends Interval
class AnyDistribution(val mean: Double, val variance: Double) extends ContinuousDistribution
class Application(val name: String, val version: Option[String]) extends PmmlElement

Describes the software application that generated the model.

Describes the software application that generated the model.

Value parameters:
name

The name of the application that generated the model.

version

The version of the application that generated this model.

object ArrayType extends Enumeration
case class BelowInterval(rightMargin: Double, isOpen: Boolean) extends Interval
class BooleanType extends DataType

The data type representing Boolean values.

The data type representing Boolean values.

Companion:
object
case object BooleanType extends BooleanType
Companion:
class
class CategoricalPredictor(val field: Field, val coefficient: Double, val value: Any) extends RegressionPredictor

Defines a categorical independent variable. The list of attributes comprises the name of the variable, the value attribute, and the coefficient by which the values of this variable must be multiplied.

Defines a categorical independent variable. The list of attributes comprises the name of the variable, the value attribute, and the coefficient by which the values of this variable must be multiplied.

trait Clearable
object Closure extends Enumeration
object CompareFunction extends Enumeration
  • absDiff: absolute difference c(x,y) = |x-y|

  • gaussSim: gaussian similarity c(x,y) = exp(-ln(2)zz/(s*s)) where z=x-y, and s is the value of attribute similarityScale (required in this case) in the ClusteringField

  • delta: c(x,y) = 0 if x=y, 1 else

  • equal: c(x,y) = 1 if x=y, 0 else

  • table: c(x,y) = lookup in similarity matrix

class ComparisonMeasure(val kind: ComparisonMeasureKind, val distance: Distance, val compareFunction: CompareFunction, val minimum: Option[Double], val maximum: Option[Double]) extends PmmlElement
object ComparisonMeasureKind extends Enumeration
Companion:
class
class CompoundPredicate(val booleanOperator: Value, val children: Array[Predicate]) extends Predicate

CompoundPredicate: an encapsulating element for combining two or more elements as defined at the entity PREDICATE. The attribute associated with this element, booleanOperator, can take one of the following logical (boolean) operators: and, or, xor or surrogate.

CompoundPredicate: an encapsulating element for combining two or more elements as defined at the entity PREDICATE. The attribute associated with this element, booleanOperator, can take one of the following logical (boolean) operators: and, or, xor or surrogate.

Companion:
object
object ContinuousDistributionType extends Enumeration
class ContrastMatrixFactorPredictor(val field: Field, val value: Any, val categories: Map[Any, Int], val matrix: Matrix) extends FactorPredictor
class Counts(val totalFreq: Double, val missingFreq: Option[Double], val invalidFreq: Option[Double], val cardinality: Option[Double]) extends PmmlElement

Carries counters for frequency of values with respect to their state of being missing, invalid, or valid. The counts can be non-integer if they are weighted.

Carries counters for frequency of values with respect to their state of being missing, invalid, or valid. The counts can be non-integer if they are weighted.

Value parameters:
cardinality

The number of unique, or distinct, values that the variable has.

invalidFreq

Counts the number of records with values other than valid. The total frequency includes the missing values and invalid values.

missingFreq

Counts the number of records where value is missing.

totalFreq

Counts all records, same as for statistics of all MiningFields.

class CovariatePredictor(val field: Field, val multiplicity: Double) extends RegressionPredictor
sealed abstract class DataType extends DataTypeLike

The base type of all PMML data types.

The base type of all PMML data types.

Companion:
object
object DataType
Companion:
class
trait DataTypeLike extends Serializable

A template trait for a data type.

A template trait for a data type.

case class DateDaySinceYearType(aYear: Int) extends DateType

The type dateDaysSince[aYear] is a variant of the type date where the values are represented as the number of days since aYear-01-01. The date aYear-01-01 is represented by the number 0. aYear-01-02 is represented by 1, aYear-02-01 is represented by 31, etc. Dates before aYear-01-01 are represented as negative numbers. For example, values of type dateDaysSince[1960] are the number of days since 1960-01-01. The date 1960-01-01 is represented by the number 0.

The type dateDaysSince[aYear] is a variant of the type date where the values are represented as the number of days since aYear-01-01. The date aYear-01-01 is represented by the number 0. aYear-01-02 is represented by 1, aYear-02-01 is represented by 31, etc. Dates before aYear-01-01 are represented as negative numbers. For example, values of type dateDaysSince[1960] are the number of days since 1960-01-01. The date 1960-01-01 is represented by the number 0.

Companion:
object
Companion:
class
case class DateTimeSecondSinceYearType(aYear: Int) extends DateTimeType

The type dateTimeSecondsSince[aYear] is a variant of the type date where the values are represented as the number of seconds since 00:00 on aYear-01-01. The datetime 00:00:00 on aYear-01-01 is represented by the number 0. The datetime 00:00:01 on aYear-01-01 is represented by 1, etc. Datetimes before aYear-01-01 are represented as negative numbers. For example, values of type dateTimeSecondsSince[1960] are the number of seconds since 00:00 on 1960-01-01. The datetime 00:00:00 on 1960-01-01 is represented by the number 0. The datetime 00:01:00 on 1960-01-01 is represented by 60.

The type dateTimeSecondsSince[aYear] is a variant of the type date where the values are represented as the number of seconds since 00:00 on aYear-01-01. The datetime 00:00:00 on aYear-01-01 is represented by the number 0. The datetime 00:00:01 on aYear-01-01 is represented by 1, etc. Datetimes before aYear-01-01 are represented as negative numbers. For example, values of type dateTimeSecondsSince[1960] are the number of seconds since 00:00 on 1960-01-01. The datetime 00:00:00 on 1960-01-01 is represented by the number 0. The datetime 00:01:00 on 1960-01-01 is represented by 60.

Companion:
object
Companion:
class
sealed abstract class DateTimeType extends NumericType

The base type of timestamp

The base type of timestamp

Companion:
object
case object DateTimeType extends DateTimeType
Companion:
class
sealed abstract class DateType extends NumericType

The base type of date

The base type of date

Companion:
object
case object DateType extends DateType
Companion:
class
class DenseMatrix(val values: Array[Array[Double]]) extends Matrix

Dense matrix

Dense matrix

class DenseVector[@specialized(Int, Long, Float, Double) V](val values: Array[V]) extends Vector[V]
class DiagonalMatrix(val values: Array[Double], val offDiagDefault: Option[Double]) extends Matrix

The content is just one array of numbers representing the diagonal values.

The content is just one array of numbers representing the diagonal values.

trait Distance extends PmmlElement
Companion:
object
object Distance
Companion:
class
class DoubleType extends NumericType

The data type representing Double values.

The data type representing Double values.

Companion:
object
case object DoubleType extends DoubleType
Companion:
class
trait Evaluator extends PmmlElement

A common super-trait that accepts a series, then evaluates a single value.

A common super-trait that accepts a series, then evaluates a single value.

case class Extension(extender: Option[String], name: Option[String], value: Option[Any], content: Option[Any]) extends Serializable
class FactorPredictor(val field: Field, val value: Any) extends CategoricalPredictor
object False extends Predicate

Identifies the boolean constant FALSE.

Identifies the boolean constant FALSE.

class FloatType extends NumericType

The data type representing Float values.

The data type representing Float values.

Companion:
object
case object FloatType extends FloatType
Companion:
class
class GaussianDistribution(val mean: Double, val variance: Double) extends ContinuousDistribution
case class GenericInterval(leftMargin: Double, rightMargin: Double, closure: Closure) extends Interval

The PMML schema contains a mechanism for extending the content of a model. Extension elements should be present as the first child in all elements and groups defined in PMML. This way it is possible to place information in the Extension elements which affects how the remaining entries are treated. The main element in each model should have Extension elements as the first and the last child for maximum flexibility.

The PMML schema contains a mechanism for extending the content of a model. Extension elements should be present as the first child in all elements and groups defined in PMML. This way it is possible to place information in the Extension elements which affects how the remaining entries are treated. The main element in each model should have Extension elements as the first and the last child for maximum flexibility.

Holds common attributes of a PMML model.

Holds common attributes of a PMML model.

trait HasOpType
trait HasParent
class Header(val copyright: Option[String], val description: Option[String], val modelVersion: Option[String], val application: Option[Application]) extends PmmlElement
case object InfinityInterval extends Interval
class InlineTable(val rows: Array[Row]) extends Table
class IntegerType extends NumericType

The data type representing Int or Long values.

The data type representing Int or Long values.

Companion:
object
case object IntegerType extends IntegerType
Companion:
class
sealed abstract class Interval extends PmmlElement

Defines a range of numeric values.

Defines a range of numeric values.

Companion:
object
object Interval
Companion:
class
case class MatCell(row: Int, col: Int, value: Double)
trait Matrix extends PmmlElement

Trait for a matrix.

Trait for a matrix.

object MatrixKind extends Enumeration
object MiningFunction extends Enumeration
class ModelAttributes(val functionName: MiningFunction, val modelName: Option[String], val algorithmName: Option[String], val isScorable: Boolean) extends HasModelAttributes with Serializable

Class represents common attributes of a PMML model.

Class represents common attributes of a PMML model.

Model Explanation

Model Explanation

class ModelStats extends PmmlElement

Provides a basic framework for representing variable statistics.

Provides a basic framework for representing variable statistics.

Provides a dataset of model inputs and known results that can be used to verify accurate results are generated, regardless of the environment.

Provides a dataset of model inputs and known results that can be used to verify accurate results are generated, regardless of the environment.

class NumericInfo(val quantiles: Array[Quantile], val minimum: Option[Double], val maximum: Option[Double], val mean: Option[Double], val standardDeviation: Option[Double], val median: Option[Double], val interQuartileRange: Option[Double]) extends PmmlElement

The values for mean, minimum, maximum and standardDeviation are defined as usual. median is calculated as the 50% quantile; interQuartileRange is calculated as (75% quantile - 25% quantile).

The values for mean, minimum, maximum and standardDeviation are defined as usual. median is calculated as the 50% quantile; interQuartileRange is calculated as (75% quantile - 25% quantile).

class NumericPredictor(val field: Field, val coefficient: Double, val exponent: Int) extends RegressionPredictor

Defines a numeric independent variable. The list of valid attributes comprises the name of the variable, the exponent to be used, and the coefficient by which the values of this variable must be multiplied. Note that the exponent defaults to 1, hence it is not always necessary to specify. Also, if the input value is missing, the result evaluates to a missing value.

Defines a numeric independent variable. The list of valid attributes comprises the name of the variable, the exponent to be used, and the coefficient by which the values of this variable must be multiplied. Note that the exponent defaults to 1, hence it is not always necessary to specify. Also, if the input value is missing, the result evaluates to a missing value.

sealed abstract class NumericType extends DataType

Numeric data types.

Numeric data types.

sealed trait OpType

Indicates which operations are defined on the values.

Indicates which operations are defined on the values.

Companion:
object
object OpType
Companion:
class
object Operator extends Enumeration

Pre-defined comparison operators.

Pre-defined comparison operators.

class Partition(val name: String, val partitionFieldStats: Array[PartitionFieldStats], val size: Option[Double]) extends PmmlElement

A Partition contains statistics for a subset of records, for example it can describe the population in a cluster. The content of a Partition mirrors the definition of the general univariate statistics. That is, each Partition describes the distribution per field. For each field there can be information about frequencies, numeric moments, etc.

A Partition contains statistics for a subset of records, for example it can describe the population in a cluster. The content of a Partition mirrors the definition of the general univariate statistics. That is, each Partition describes the distribution per field. For each field there can be information about frequencies, numeric moments, etc.

The attribute name identifies the Partition. The attribute size is the number of records. All aggregates in PartitionFieldStats must have size = totalFrequency in Counts if specified.

class PartitionFieldStats(val field: Field, val frequencies: Array[Double], val weighted: Boolean, val counts: Option[Counts], val numericInfo: Option[NumericInfo], val sumValues: Option[Array[Double]], val sumSquaredValues: Option[Array[Double]]) extends PmmlElement

field references to (the name of) a MiningField for background statistics. The sequence of NUM-ARRAYs is the same as for ContStats. For categorical fields there is only one array containing the frequencies; for numeric fields, the second and third array contain the sums of values and the sums of squared values, respectively. The number of values in each array must match the number of categories or intervals in UnivariateStats of the field.

field references to (the name of) a MiningField for background statistics. The sequence of NUM-ARRAYs is the same as for ContStats. For categorical fields there is only one array containing the frequencies; for numeric fields, the second and third array contain the sums of values and the sums of squared values, respectively. The number of values in each array must match the number of categories or intervals in UnivariateStats of the field.

trait PmmlElement extends HasExtensions with Serializable

The base trait for all elements of PMML

The base trait for all elements of PMML

case class PointInterval(x: Double) extends Interval
class PoissonDistribution(val mean: Double) extends ContinuousDistribution
trait Predicate extends PmmlElement
Companion:
object
object Predicate
Companion:
class
object Predication extends Enumeration
class PredictorTerm(val name: Option[String], val coefficient: Double, val fields: Array[FieldRef]) extends RegressionPredictor

Contains one or more fields that are combined by multiplication. That is, this element supports interaction terms. The type of all fields referenced within PredictorTerm must be continuous. Note that if the input value is missing, the result evaluates to a missing value.

Contains one or more fields that are combined by multiplication. That is, this element supports interaction terms. The type of all fields referenced within PredictorTerm must be continuous. Note that if the input value is missing, the result evaluates to a missing value.

object Property extends Enumeration
  • Valid value: A value which is neither missing nor invalid.
  • Invalid value: The input value is not missing but it does not belong to a certain value range. The range of valid values can be defined for each field.
  • Missing value: Input value is missing, for example, if a database column contains a null value. It is possible to explicitly define values which are interpreted as missing values.
class Quantile(val quantileLimit: Double, val quantileValue: Double) extends PmmlElement
Value parameters:
quantileLimit

A percentage number between 0 and 100

quantileValue

The corresponding value in the domain of field values.

class RealType extends NumericType

The data type representing Float or Double values, the Real is an extended type beyond PMML

The data type representing Float or Double values, the Real is an extended type beyond PMML

Companion:
object
case object RealType extends RealType
Companion:
class
class RegressionParameter(val factors: Array[FactorPredictor], val covariates: Array[CovariatePredictor]) extends RegressionPredictor
Companion:
object
Companion:
class
class RegressionTable(val predictors: Array[RegressionPredictor], val intercept: Double, val targetCategory: Option[Any]) extends RegressionPredictor

Lists the values of all predictors or independent variables. If the model is used to predict a numerical field, then there is only one RegressionTable and the attribute targetCategory may be missing. If the model is used to predict a categorical field, then there are two or more RegressionTables and each one must have the attribute targetCategory defined with a unique value.

Lists the values of all predictors or independent variables. If the model is used to predict a numerical field, then there is only one RegressionTable and the attribute targetCategory may be missing. If the model is used to predict a categorical field, then there are two or more RegressionTables and each one must have the attribute targetCategory defined with a unique value.

class Row(val elements: Map[String, Any]) extends PmmlElement
class ScoreDistribution(val value: Any, val recordCount: Double, val confidence: Option[Double], val probability: Option[Double]) extends PmmlElement

Comprises a method to list predicted values in a classification trees structure.

Comprises a method to list predicted values in a classification trees structure.

class ScoreDistributions(val scoreDistributions: Array[ScoreDistribution]) extends PmmlElement
class SimplePredicate(val field: Field, val operator: Operator, val value: Double) extends Predicate

Defines a rule in the form of a simple boolean expression. The rule consists of field, operator (booleanOperator) for binary comparison, and value.

Defines a rule in the form of a simple boolean expression. The rule consists of field, operator (booleanOperator) for binary comparison, and value.

Companion:
class
class SimpleSetPredicate(val field: Field, val booleanOperator: Value, val values: Set[Double]) extends Predicate

Checks whether a field value is element of a set. The set of values is specified by the array.

Checks whether a field value is element of a set. The set of values is specified by the array.

Companion:
object
class SparseMatrix(val nbRows: Int, val nbCols: Int, val colPtrs: Array[Int], val rowIndices: Array[Int], val values: Array[Double], val diagDefault: Option[Double], val offDiagDefault: Option[Double]) extends Matrix

Column-major sparse matrix.

Column-major sparse matrix.

Companion:
object
Companion:
class
class SparseVector[@specialized(Int, Long, Float, Double) V](val size: Int, val indices: Array[Int], val values: Array[V], val default: V) extends Vector[V]
class StringType extends DataType

The data type representing String values.

The data type representing String values.

Companion:
object
case object StringType extends StringType
Companion:
class
case class StructField(name: String, dataType: DataType)

A field inside a StructType.

A field inside a StructType.

Value parameters:
dataType

The data type of this field.

name

The name of this field.

case class StructType(fields: Array[StructField]) extends DataType with Seq[StructField]

StructType defines a type for a [Series]

StructType defines a type for a [Series]

Companion:
object
object StructType
Companion:
class
class SymmetricMatrix(val values: Array[Array[Double]]) extends Matrix

The content must be represented by Arrays. The first array contains the matrix element M(0,0), the second array contains M(1,0), M(1,1), and so on (that is the lower left triangle). Other elements are defined by symmetry.

The content must be represented by Arrays. The first array contains the matrix element M(0,0), the second array contains M(1,0), M(1,1), and so on (that is the lower left triangle). Other elements are defined by symmetry.

sealed trait Table extends PmmlElement
Companion:
object
object Table
Companion:
class
class TableLocator extends Table

The type timeSeconds is a variant of the type time where the values are represented as the number of seconds since 00:00, that is, since midnight. The time 00:00 is represented by the number 0. No negative values are allowed.

The type timeSeconds is a variant of the type time where the values are represented as the number of seconds since 00:00, that is, since midnight. The time 00:00 is represented by the number 0. No negative values are allowed.

Companion:
object
case object TimeSecondsType extends TimeSecondsType
Companion:
class
class TimeType extends NumericType

The data type representing Time values.

The data type representing Time values.

Companion:
object
case object TimeType extends TimeType
Companion:
class

Abstract class for transformers that transform one series into another.

Abstract class for transformers that transform one series into another.

object True extends Predicate

Identifies the boolean constant TRUE.

Identifies the boolean constant TRUE.

class UniformDistribution(val lower: Double, val upper: Double) extends ContinuousDistribution
case object UnresolvedDataType extends DataType
class Value(val value: String, val displayValue: Option[String], val property: Property) extends PmmlElement
Companion:
object
object Value
Companion:
class
trait Vector[@specialized(Int, Long, Float, Double) V] extends Serializable
class binarySimilarity(val c00: Double, val c01: Double, val c10: Double, val c11: Double, val d00: Double, val d01: Double, val d10: Double, val d11: Double) extends Distance
object chebychev extends Distance
object cityBlock extends Distance
object euclidean extends Distance
object jaccard extends Distance
class minkowski(val p: Double) extends Distance
object simpleMatching extends Distance
object squaredEuclidean extends Distance
object tanimoto extends Distance