Machine Learning - Save Variable(s) - Predicted Values
Jump to navigation
Jump to search
Extensions
Q Technical Reference
Q Technical Reference
Q Technical Reference > Setting Up Data > Creating New Variables
Q Technical Reference > Updating and Automation > Automation Online Library
Q Technical Reference > Updating and Automation > JavaScript > QScript > QScript Examples Library > QScript Online Library
R Online Library
User Interface > Create Classifier
User Interface > Create Machine Learning
Creates a new variable containing predicted values for each case in the data from a model (e.g., from Machine Learning - Random Forest ). Observations with missing values in the predictors are predicted as NA.
Example
A table of categorical predictions.
Technical details
Uses the predict method from R. Unlike the defaults in most R packages, this implementation assigns predicted values for observations not in the estimation sample. Categorical variables are predicted as discrete.
Code
includeWeb('QScript R Output Functions');
saveVariables('Predicted values', 'Machine Learning, MachineLearningEnsemble or Regression',
'predict(', ')', null, null, 'pred.val', ['MachineLearning', 'MachineLearningEnsemble', 'Regression']);
Extensions
Q Technical Reference
Q Technical Reference
Q Technical Reference > Setting Up Data > Creating New Variables
Q Technical Reference > Updating and Automation > Automation Online Library
Q Technical Reference > Updating and Automation > JavaScript > QScript > QScript Examples Library > QScript Online Library
R Online Library
User Interface > Create Classifier
User Interface > Create Machine Learning