Forms predictions from a radial basis function model fitted by RBFIT.
Option
PRINT = strings |
Controls fitted output (description, predictions); default desc, pred |
|---|
Parameters
X = pointers |
X-values at which to predict |
|---|---|
PREDICTIONS = variates |
Predictions |
SAVE = pointers |
Details of the fitted model |
Description
RBPREDICT forms predictions using radial basis function model fitted by RBFIT. Details of the the model and the estimated parameters are supplied using the SAVE parameter. This must have been saved using the SAVE parameter of RBFIT. If this is not set, the output is from the most recent model fitted by RBFIT. The values of the x-variates at which to predict are supplied, in a pointer, using the X parameter. The variates in the pointer must be in exactly the same order as the equivalent variates in the pointer defined for the X parameter in the original RBFIT command.
The output is controlled by the PRINT option, with settings:
description |
a description of the model, |
|---|---|
predictions |
predicted values. |
Option: PRINT.
Parameters: X, PREDICTIONS, SAVE.
Method
RBPREDICT uses the function nagdmc_predict_RBF from the Numerical Algorithms Group’s library of Data Mining Components (DMCs).
Action with RESTRICT
You can restrict the set of units used for the prediction by applying a restriction to any of the x-variates. If several of these are restricted, they must all be restricted to the same set of units.
See also
Commands for: Data mining.
Example
CAPTION 'RBPREDICT example',\
'Predicting the grape cultivar from 13 wine attributes'; STYLE=meta,plain
SPLOAD '%Data%/WinesTrain.gsh'; ISAVE=pData
POINTER [VALUES=pData[2...14]] Attributes
GROUPS Wine; FACTOR=Cultivar
TABULATE [CLASS=Cultivar] Attributes[]; MEANS=Mn[1...13]
RBFIT [PRINT=*; RBTYPE=linear; LAMBDA=10] Y=Wine; X=Attributes; \
CENTRES=Mn; SAVE=RBSave
"Predictions for wines from unknown cultivars from fitted model"
SPLOAD '%Data%/WinesPred.gsh'; ISAVE=TestAttr
RBPREDICT X=TestAttr; PREDICTIONS=Fit; SAVE=RBSave
"Predicted class is closest integer 1...3"
VARIATE Prediction; VALUES = 1 + (Fit > 1.5) + (Fit > 2.5)
GROUPS Prediction; Pred_Cultivar
TABULATE [CLASS=Pred_Cultivar; PRINT=counts]