Run
Run
lets you:
- Run your own Python scripts against the data in one or more datasets in your current session.
- Run a Durbin Watson test on a dataset using a trained model.
- Run Principal Component Analysis (PCA) on a dataset.
When Run
begins, a temporary directory is created which holds the script and the specified datasets. The temporary directory is removed when the script finishes.
Format
Run
uses the following utterances:
Run the script <script> on the dataset <datasets> (with paramters <parameters>) (for alert <alert>)
Run the Durbin Watson test using model <model> (on the dataset <dataset>)
Run PCA extracting <number> components (excluding <columns> | setting identifier as <target column> | using <columns>)
Parameters
Scripts
The following parameters are available:
script
(required). The Python script to run against the specified datasets.datasets
(required). The datasets to use with the script.parameters
(optional). The values to use for your scripts parameters. These parameters should use the format<variable name>, <value>
. For example, if your script used a Boolean variable called "save_difference" and you wanted to set that variable to true when running your script, entersave_difference, True
.alert
(optional). The alert associated with the script.
Durbin Watson Test
The following parameters are available:
model
(required). The regression model whose errors to analyze. This must be a regression model, such as a linear regression model.dataset
(optional). The dataset to use as part of the analysis. If the model you select was trained with a testing dataset, this parameter can be excluded.
Principal Component Analysis
The following parameters are available:
number
(required). The number of components to extract from the dataset.columns
(optional). The columns to include or exclude from the analysis.target column
(optional). The column to use as the primary identifier.
Output
Scripts
If the script runs successfully, the script’s output becomes [datasets]_RunScript.
Otherwise, an error message is shown in the chat history.
Durbin Watson Test
If the test is successful, a new dataset appears in the display panel. The dataset contains the Durbin-Watson statistical value, which indicates whether the test detected positive, negative, or no correlation between the model's residuals. The value ranges from zero to four, with a value of two indicating no correlation. A value substantially higher than two indicates a negative correlation and a value substantially lower than two indicates a positive correlation.
Otherwise, an error message is shown in the chat history.
Principal Component Analysis
If the analysis is successful, a new dataset is shown in the display panel containing the values of the extracted components. A hybrid bar-line chart is also shown containing the explained and cumulative variance ratios. You can then hover over the contents of the chart to see more information about each component, such as the:
- Top three features that make up that component.
- Explained variance value and ratio.
- Number of singular values included in the component.
- Cumulative variance ratio.
Examples
If you wanted to run the script ExampleScript.py on the dataset titanic
, first load the titanic dataset into your session and enter Run the script ExampleScript.py on the dataset Titanic
.
To run a Durbin-Watson test after training a linear regression model called Model1 on a dataset called Titanic, enter Run the Durbin Watson test using Model1 on the dataset Titanic.
To run a PCA on the Titanic dataset and extract two components from it while excluding the Survived column, enter Run PCA extracting 2 components excluding Survived
.