Remove Risk Factors
Remove or include data and record reasons in Modelscape
Use the Modelscape™ Remove Risk Factors task to remove or include variables from a data table and record the corresponding reasons. Not all the data in the table is necessarily usable for a statistical model. For example, randomized user identifiers (IDs) are often irrelevant, legally sensitive data such as ethnic origin or religious beliefs cannot be used, and some data can be of poor quality. The task automatically generates MATLAB® code for your live script. This task requires the Modelscape for MATLAB support package.
Using this task, you can:
Inspect summary statistics and histograms for variables in a data table.
Remove variables from a data table and record the corresponding reason for exclusion.
Record reasons for including variables in a data table.
Export the resulting subtables to MATLAB desktop.
For general information about Live Editor tasks, see Add Interactive Tasks to a Live Script.
Open the Remove Risk Factors
To add the Threshold Predictors task to a live script in the MATLAB Editor:
On the Live Editor tab, select Task > Remove Risk Factors.
In a code block in the script, type a relevant keyword, such as
Remove Risk Factorsfrom the suggested command completions.
Input table — Table of input data to inspect
table of input data containing variables to inspect
Input table must be a MATLAB table or a timetable. The columns of Input table contain the variables for different data points, for example, Residence Status or Customer ID.
Filtered table — Display table of filtered variables
check box to display subtable with excluded variables
Check the Filtered table check box to display the subtable after excluding the removed variables. The filtered table contains the columns from the Input table without the variables that you mark for exclusion.
Preview summary tables — Display tables of summary
check box to display two tables with summaries of variables and progress
Check the Preview summary tables check box to display two tables of additional information about the feature selection process. The exclusionSummaryPreview table includes all the data of the input table together with the exclusion flags and comments that you record in the task. The progressSummaryPreview table shows the total number of variables that are present, excluded, included, and commented against.
Introduced in R2021b