Data Mining SQL Scoring Functions

A set of specialized SQL functions provides the primary mechanism for scoring data in Oracle Data Mining. When called as single-row functions, the SQL Data Mining functions apply a user-supplied mining model to each row of input data.

In Oracle Database 12c, the functions can also be called as analytic functions, in which case the algorithmic processing is performed dynamically without a user-supplied mining model. The term predictive query refers to this mode of scoring.


Table 1-2 Data Mining SQL Scoring Functions

Function Name Function Description

CLUSTER_DETAILS

Returns cluster details for each row in the input data.

CLUSTER_DISTANCE

Returns the distance between each row and the centroid.

CLUSTER_ID

Returns the ID of the highest probability cluster for each row.

CLUSTER_PROBABILITY

Returns the highest probability cluster for each row.

CLUSTER_SET

Returns a set of cluster ID and probability pairs for each row.

FEATURE_DETAILS

Returns a set of feature and value paris for each row.

FEATURE_ID

Returns feature details for each row in the input data.

FEATURE_SET

Returns a set of feature ID and feature value pairs for each row.

FEATURE_VALUE

Returns the value of the highest value feature for each row

PREDICTION

Returns the prediction for each row in the input.

PREDICTION_BOUNDS

Returns the upper and lower bounds of prediction for each row (GLM only).

PREDICTION_COST

Returns a cost for each row.

PREDICTION_DETAILS

Returns prediction details for each row.

PREDICTION_PROBABILITY

Returns the probability of each prediction.

PREDICTION_SET

Returns the prediction or cost with probability for each row.