Machine Learning - Diagnostic - Prediction-Accuracy Table extension
Jump to navigation
Jump to search
Creates a table showing the observed and predicted values, as a heatmap. This is also referred to as a confusion matrix, classification-accuracy, and hit-miss table.
This blog post includes an example of a prediction-accuracy table.
Example
The footer of the table firstly describes the data that were used to fit the model. In this example there were 149 cases in the 70% of data used for training, of which only 116 were used after removing cases with missing values. It then gives the accuracy for the prediction data and a count of the number of predictions that are paired with observations (after accounting for missing values in the prediction data).
Code
var __webpack_modules__ = ({});
// The module cache
var __webpack_module_cache__ = {};
// The require function
function __webpack_require__(moduleId) {
// Check if module is in cache
var cachedModule = __webpack_module_cache__[moduleId];
if (cachedModule !== undefined) {
return cachedModule.exports;
}
// Create a new module (and put it into the cache)
var module = (__webpack_module_cache__[moduleId] = {
exports: {}
});
// Execute the module function
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
// Return the exports of the module
return module.exports;
}
// webpack/runtime/rspack_version
(() => {
__webpack_require__.rv = () => ("1.7.2")
})();
// webpack/runtime/rspack_unique_id
(() => {
__webpack_require__.ruid = "bundler=rspack@1.7.2";
})();
includeWeb("QScript R Output Functions");
const menu_location = "Machine Learning > Diagnostic > Prediction-Accuracy Table";
errorIfExtensionsUnavailableInQVersion(menu_location);
createDiagnosticROutputFromSelection(menu_location);