Model details describe model attributes, rules, statistics, and other information about the model. The DBMS_DATA_MINING package supports a separate GET_MODEL_DETAILS function for each algorithm. Global details are also available for Generalized Linear Models, Expectation Maximization, Singular Value Decompostion, and Association Rules.
Model details reverse the transformations applied to the attributes, thus enabling the information to be easily understood by a user. You can obtain the transformations embedded in the model by invoking the DBMS_DATA_MINING.GET_MODEL_TRANSFORMATIONS function.
The query in Example 5-3 returns the coefficients for several attribute values in a GLM regression model called GLMR_SH_Regr_sample. Additional details available for this algorithm include: standard error, test statistic, p value, standard coefficient, lower coefficient limit, and upper coefficient limit.
The query in Example 5-4 returns global details for the same model.
Example 5-3 Model Details for GLM Regression
SELECT attribute_name, attribute_value, coefficient
FROM TABLE(dbms_data_mining.get_model_details_glm('GLMR_SH_Regr_sample'))
WHERE attribute_name IN ('AFFINITY_CARD','BULK_PACK_DISKETTES','COUNTRY_NAME')
ORDER BY class, attribute_name, attribute_value;
ATTRIBUTE_NAME ATTRIBUTE_VALUE COEFFICIENT
-------------------- -------------------- -----------
AFFINITY_CARD -.58234968
BULK_PACK_DISKETTES -.99684665
COUNTRY_NAME Argentina -1.2032688
COUNTRY_NAME Australia .000541598
COUNTRY_NAME Brazil 5.29534224
COUNTRY_NAME Canada 4.02414761
COUNTRY_NAME China .878394982
COUNTRY_NAME Denmark -2.9852215
COUNTRY_NAME France -1.0946872
COUNTRY_NAME Germany -1.6345684
COUNTRY_NAME Italy -1.2749328
COUNTRY_NAME Japan -6.259627
COUNTRY_NAME New Zealand 5.07675762
COUNTRY_NAME Poland 2.20458524
COUNTRY_NAME Saudi Arabia .443146197
COUNTRY_NAME Singapore -4.9472244
COUNTRY_NAME South Africa .493327068
COUNTRY_NAME Spain -3.0895076
COUNTRY_NAME Turkey -5.9014625
COUNTRY_NAME United Kingdom 2.25154714
Example 5-4 Global Details for GLM Regression
SELECT *
FROM TABLE(dbms_data_mining.get_model_details_global('GLMR_SH_Regr_sample'))
ORDER BY global_detail_name;
GLOBAL_DETAIL_NAME GLOBAL_DETAIL_VALUE
------------------------------ -------------------
ADJUSTED_R_SQUARE .732
AIC 5943.057
COEFF_VAR 18.165
CORRECTED_TOTAL_DF 1499.000
CORRECTED_TOT_SS 278740.504
DEPENDENT_MEAN 38.892
ERROR_DF 1420.000
ERROR_MEAN_SQUARE 49.908
ERROR_SUM_SQUARES 70869.218
F_VALUE 52.291
GMSEP 52.722
HOCKING_SP .035
J_P 52.570
MODEL_CONVERGED 1.000
MODEL_DF 79.000
MODEL_F_P_VALUE .000
MODEL_MEAN_SQUARE 2609.739
MODEL_SUM_SQUARES 206169.407
NUM_PARAMS 80.000
NUM_ROWS 1500.000
ROOT_MEAN_SQ 7.065
R_SQ .746
SBIC 6368.114
VALID_COVARIANCE_MATRIX .000