Attribute

class Attribute(val reasonCode: Option[String], val partialScore: Option[Double], val predicate: Predicate, val complexPartialScore: Option[ComplexPartialScore]) extends Predicate with PmmlElement

Defines input attributes for each scorecard characteristic are defined in terms of predicates. For numeric characteristics, predicates are used to implement the mapping from a range of continuous values to a partial score . For example, age range 20 to 29 may map to partial score "15". For categorical characteristics, predicates are used to implement the mapping of categorical values to partial scores. Note that while predicates will not (typically) overlap, the Scoring Procedure requires the ordering of Attributes to be respected, and that the first matching Attribute shall determine the partial scored value.

Value parameters:
complexPartialScore

Used to implement complex point allocation of the score points awarded to the Attribute . To be used in lieu of attribute partialScore. If both are defined, element ComplexPartialScore takes precedence over attribute partialScore for computing the score points awarded to the Attribute. Whenever element ComplexPartialScore is used, the actual partial score is the value returned by the EXPRESSION (see Transformations for more information).

partialScore

Defines the score points awarded to the Attribute. Note that attribute partialScore is optional. A partial score is required though to be specified for every Attribute. Either it needs to be defined through the partialScore attribute or through the ComplexPartialScore element as defined below.

predicate

The condition upon which the mapping between input attribute and partial score takes place. For more details on PREDICATE see the section on predicates in TreeModel for an explanation on how predicates are described and evaluated. In scorecard models, all the predicates defining the Attributes for a particular Characteristic must all reference a single field.

reasonCode

Defines the attribute's reason code. If the reasonCode attribute is used in this level, it takes precedence over the reasonCode attribute associated with the Characteristic element.

trait Predicate
trait Serializable
class Object
trait Matchable
class Any

Value members

Concrete methods

override def eval(series: Series): Predication

Evaluates the predicate.

Evaluates the predicate.

Definition Classes
def score(series: Series): Double

Inherited methods

Inherited from:
HasExtensions
def hasExtensions: Boolean
Inherited from:
HasExtensions

Concrete fields

val partialScore: Option[Double]
val reasonCode: Option[String]