Prev Next plot_data_fit

@(@\newcommand{\B}[1]{ {\bf #1} } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\W}[1]{ \; #1 \; }@)@ This is dismod_at-20221105 documentation: Here is a link to its current documentation .
Plot The Data Fit By Integrand

Syntax
database
pdf_file
plot_title
max_plot
integrand_list
n_fit_dict
Plot Legend
     Data Table Hold Out
     Point Symbol
     Plus Symbol
     Green
     Red and Black
Example

Syntax

# n_fit_dict = plot_data_fit(
   database          = None,
   pdf_file          = None,
   plot_title        = None,
   max_plot          = None,
   integrand_list    = None,
# )

database
This str is the file name for an existing dismod_at database that contains the results of a fit_command . This argument can't be None.

pdf_file
This str is the location where the pdf file containing the plot will be placed. This argument can't be None.

plot_title
This str is extra text printed at the beginning of the title for each plot. If this argument is None, there is no extra text.

max_plot
This is a int specifying the maximum number of points to plot per integrand. If this argument is less that the number of values for an integrand, the values are randomly sub-sampled keeping the same order. The x-axis (data index) is the original index value before sub-sampling. If this argument is None no sub-sampling is done.

integrand_list
Each element of this list is a str containing an integrand_name that we are plotting the fit for. If this argument is None all of the integrands, except those with names that begin with mulcov_, are included.

n_fit_dict
This is a dictionary with keys that are the integrand names in integrand_list . (If integrand_list is None, the keys are all the integrand names that do not begin with mulcov_.) The value n_fit_dict[key] is the number of rows in the data_subset_table that correspond to this integrand and are not held out in the data table (see below). If this is less than 2, the corresponding integrand is not plotted.

Plot Legend

Data Table Hold Out
We use data table hold out to refer to values that have hold_out equal to one in the data table. This does not include hold outs created by the hold out command or hold outs created by the hold option. The data table hold out values are not included during the automatic choice of the plotting limits.

Point Symbol
Values that are within the automatically chosen plotting limits are plotted using the point character . .

Plus Symbol
Values that are outside the automatically chosen plotting limits are plotted using the point plus character +.

Green
Values that correspond to data that is held out in the data table are plotted using the color green.

Red and Black
Values that correspond to data that is not held out in the data table, and is not within (is within) the automatically chosen limits, are plotted using the color red (black).

Example
user_plot_data_fit.py .
Input File: python/dismod_at/plot_data_fit.py