{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2021-05-25T17:15:13.199052Z", "start_time": "2021-05-25T17:15:11.642731Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "emat 0.5.2, plotly 4.14.3\n" ] } ], "source": [ "import emat\n", "emat.versions()" ] }, { "cell_type": "raw", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ ".. _methodology-splom:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Scatter Plot Matrix" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Once a series of experiments has been conducted for a core model, it\n", "is suggested that an analyst review the results to confirm that the \n", "model is behaving as expected. TMIP-EMAT provides some visualization\n", "tools to review results in a graphical manner, which is a generally \n", "convenient method to review this experimental data.\n", "\n", "To demonstrate these tools, we will use the Road Test example model included\n", "in TMIP-EMAT. We can quickly construct and run a design of experiments\n", "to exercise this model and populate some results to visualize:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2021-05-25T17:15:13.924930Z", "start_time": "2021-05-25T17:15:13.200653Z" } }, "outputs": [], "source": [ "import emat.examples\n", "scope, db, model = emat.examples.road_test()\n", "design = model.design_experiments()\n", "results = model.run_experiments(design)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Given this set of experimental results, we can display a scatter plot matrix\n", "to see the results. This is a collection of two-dimensional plots, each\n", "showing a contrast between two factors, typically an input parameter (i.e. \n", "an uncertainty or a policy lever) and an output performance measure, although\n", "it is also possible to plot inputs against inputs or outputs against outputs." ] }, { "cell_type": "raw", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ ".. _methodology-display-experiments:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The `display_experiments` function in the `emat.analysis` sub-package can \n", "automatically create a scatter plot matrix that crosses every parameter with\n", "every measure, simply by providing the scope and the results. By default, \n", "plots that display levers are shown in blue, plots that show uncertainties\n", "are in red. " ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2021-05-25T17:15:18.319146Z", "start_time": "2021-05-25T17:15:13.927132Z" } }, "outputs": [ { "data": { "text/html": [ "