com.ibm.iminer.scoring
Class Scorer

java.lang.Object
  |
  +--com.ibm.iminer.scoring.Scorer
Direct Known Subclasses:
RecordScorer

public abstract class Scorer
extends java.lang.Object

This Java Bean represents the base class for the scoring bean RecordScorer. It is used when a single data record is to be scored.


Field Summary
static int CLASSIFICATION_TYPE
          constant identifying the classification model type.
static int CLUSTER_ID
          identifies the cluster ID result field
static int CLUSTER_QUALITY
          identifies the cluster quality result field
static int CLUSTER_SCORE
          identifies the cluster score result field
static int CLUSTERING_TYPE
          constant identifying the clustering model type.
static int CONFIDENCE
          identifies the confidence result field
static int PREDICTED_CLASS
          identifies the predicted class result field
static int PREDICTED_VALUE
          identifies the predicted value result field
static int RBF_REGION_ID
          identifies the RBF region ID result field
static int REGRESSION_TYPE
          constant identifying the regression model type.
static int UNDEFINED_TYPE
          constant specifying that the model type is undefined
 
Constructor Summary
Scorer()
           
 
Method Summary
 java.lang.String[] getCategoricalFields()
          Returns the names of the categorical mining fields which are used by the mining model to do scoring.
 java.lang.String[] getFieldNames()
          Returns the names of the mining fields which are used by the mining model to do scoring.
 int getModelType()
          Returns the model type of the set mining model.
 java.lang.String[] getNumericalFields()
          Returns the names of the numerical mining fields which are used by the mining model to perform scoring.
 int[] getResultIdentifiers()
          Gets the identifiers of the result fields which are computed by scoring for the specified mining model.
 boolean isCategoricalField(java.lang.String fieldName)
          Checks if a field is a categorical field that is used by the mining model.
 boolean isField(java.lang.String fieldName)
          Checks if a field is an active mining field of the specified mining model.
 boolean isNumericalField(java.lang.String fieldName)
          Checks if a field is a numerical field that is used by the mining model.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIDENCE

public static final int CONFIDENCE
identifies the confidence result field

CLUSTER_ID

public static final int CLUSTER_ID
identifies the cluster ID result field

CLUSTER_QUALITY

public static final int CLUSTER_QUALITY
identifies the cluster quality result field

CLUSTER_SCORE

public static final int CLUSTER_SCORE
identifies the cluster score result field

PREDICTED_CLASS

public static final int PREDICTED_CLASS
identifies the predicted class result field

PREDICTED_VALUE

public static final int PREDICTED_VALUE
identifies the predicted value result field

RBF_REGION_ID

public static final int RBF_REGION_ID
identifies the RBF region ID result field

CLASSIFICATION_TYPE

public static final int CLASSIFICATION_TYPE
constant identifying the classification model type.

CLUSTERING_TYPE

public static final int CLUSTERING_TYPE
constant identifying the clustering model type.

REGRESSION_TYPE

public static final int REGRESSION_TYPE
constant identifying the regression model type.

UNDEFINED_TYPE

public static final int UNDEFINED_TYPE
constant specifying that the model type is undefined
Constructor Detail

Scorer

public Scorer()
Method Detail

getModelType

public int getModelType()
Returns the model type of the set mining model. The possible return values are defined by the constants CLUSTERING_TYPE, CLASSIFICATION_TYPE and REGRESSION_TYPE. If no mining model or a model with unknown model type is specified, the constant UNDEFINED_TYPE is returned.
Returns:
the identifier of the model type

getResultIdentifiers

public int[] getResultIdentifiers()
Gets the identifiers of the result fields which are computed by scoring for the specified mining model. To determine the concrete set of result identifiers, the mining model must be specified: If the model type is CLUSTERING_TYPE, the set consists of CLUSTER_ID, CLUSTER_QUALITY, CLUSTER_SCORE. If the model type is CLASSIFICATION_TYPE, the set consists of PREDICTED_CLASS and CONFIDENCE. For model type equal to REGRESSION_TYPE, there are PREDICTED_VALUE and RBF_REGION_ID computed.
Returns:
array containing the result field identifiers which can be computed by the scoring bean for the specified mining model; the identifiers are defined by the constants CLUSTER_ID, CLUSTER_QUALITY, PREDICTED_CLASS, PREDICTED_VALUE, CONFIDENCE; if no model is defined, an array of length 0 is returned.

getFieldNames

public java.lang.String[] getFieldNames()
Returns the names of the mining fields which are used by the mining model to do scoring.
Returns:
array of field names; if no model is specified, a String array of length 0 is returned.

getCategoricalFields

public java.lang.String[] getCategoricalFields()
Returns the names of the categorical mining fields which are used by the mining model to do scoring.
Returns:
array containing the names of the categorical fields; if no model is specified or no categorical fields are used by the mining model, a String array of length 0 is returned.

getNumericalFields

public java.lang.String[] getNumericalFields()
Returns the names of the numerical mining fields which are used by the mining model to perform scoring.
Returns:
array containing the names of the numerical fields; if no model is specified or no numerical fields are used by the mining model, a String array of length 0 is returned.

isCategoricalField

public boolean isCategoricalField(java.lang.String fieldName)
Checks if a field is a categorical field that is used by the mining model.
Parameters:
fieldName - Name of the field
Returns:
True if the field is a categorical field.

isNumericalField

public boolean isNumericalField(java.lang.String fieldName)
Checks if a field is a numerical field that is used by the mining model.
Parameters:
fieldName - Name of the field
Returns:
True if the field is a numerical field.

isField

public boolean isField(java.lang.String fieldName)
Checks if a field is an active mining field of the specified mining model.
Parameters:
fieldName - Name of the field
Returns:
True if a field is an active mining field


Record Scorer