sierra.core.graphs.summary_line_graph

Linegraph for summarizing the results of a batch experiment in different ways.

class sierra.core.graphs.summary_line_graph.SummaryLineGraph(stats_root: Path, input_stem: str, output_fpath: Path, title: str, xlabel: str, ylabel: str, xticks: List[float], xtick_labels: Optional[List[str]] = None, large_text: bool = False, legend: List[str] = ['Empirical Data'], logyscale: bool = False, stats: str = 'none', model_root: Optional[Path] = None)[source]

Generates a linegraph from a Summary .csv.

Possibly shows the 95% confidence interval or box and whisker plots, according to configuration.

stats_root

The absolute path to the statistics/ directory for the batch experiment.

input_stem

Stem of the Summary .csv file to generate a graph from.

output_fpath

The absolute path to the output image file to save generated graph to.

title

Graph title.

xlabel

X-label for graph.

ylabel

Y-label for graph.

xticks

The xticks for the graph.

xtick_labels

The xtick labels for the graph (can be different than the xticks; e.g., if the xticxs are 1-10 for categorical data, then then labels would be the categories).

large_text

Should the labels, ticks, and titles be large, or regular size?

legend

Legend for graph.

logyscale

Should the Y axis be in the log2 domain ?

stats

The type of statistics to include on the graph (from --dist-stats).

model_root

The absolute path to the models/ directory for the batch experiment.

Inheritance

Inheritance diagram of SummaryLineGraph
__dict__ = mappingproxy({'__module__': 'sierra.core.graphs.summary_line_graph', '__doc__': 'Generates a linegraph from a :term:`Summary .csv`.\n\n    Possibly shows the 95% confidence interval or box and whisker plots,\n    according to configuration.\n\n    Attributes:\n\n        stats_root: The absolute path to the ``statistics/`` directory for the\n                    batch experiment.\n\n        input_stem: Stem of the :term:`Summary .csv` file to generate a graph\n                    from.\n\n        output_fpath: The absolute path to the output image file to save\n                      generated graph to.\n\n        title: Graph title.\n\n        xlabel: X-label for graph.\n\n        ylabel: Y-label for graph.\n\n        xticks: The xticks for the graph.\n\n        xtick_labels: The xtick labels for the graph (can be different than the\n                      xticks; e.g., if the xticxs are 1-10 for categorical data,\n                      then then labels would be the categories).\n\n        large_text: Should the labels, ticks, and titles be large, or regular\n                    size?\n\n        legend: Legend for graph.\n\n        logyscale: Should the Y axis be in the log2 domain ?\n\n        stats: The type of statistics to include on the graph (from\n               ``--dist-stats``).\n\n        model_root: The absolute path to the ``models/`` directory for the batch\n                     experiment.\n\n    ', 'kLineStyles': ['-', '--', '.-', ':', '-', '--', '.-', ':'], 'kMarkStyles': ['o', '^', 's', 'x', 'o', '^', 's', 'x'], '__init__': <function SummaryLineGraph.__init__>, 'generate': <function SummaryLineGraph.generate>, '_plot_lines': <function SummaryLineGraph._plot_lines>, '_plot_stats': <function SummaryLineGraph._plot_stats>, '_plot_conf95_stats': <function SummaryLineGraph._plot_conf95_stats>, '_plot_bw_stats': <function SummaryLineGraph._plot_bw_stats>, '_plot_ticks': <function SummaryLineGraph._plot_ticks>, '_plot_legend': <function SummaryLineGraph._plot_legend>, '_read_stats': <function SummaryLineGraph._read_stats>, '_read_conf95_stats': <function SummaryLineGraph._read_conf95_stats>, '_read_bw_stats': <function SummaryLineGraph._read_bw_stats>, '_read_models': <function SummaryLineGraph._read_models>, '__dict__': <attribute '__dict__' of 'SummaryLineGraph' objects>, '__weakref__': <attribute '__weakref__' of 'SummaryLineGraph' objects>, '__annotations__': {}})
__doc__ = 'Generates a linegraph from a :term:`Summary .csv`.\n\n    Possibly shows the 95% confidence interval or box and whisker plots,\n    according to configuration.\n\n    Attributes:\n\n        stats_root: The absolute path to the ``statistics/`` directory for the\n                    batch experiment.\n\n        input_stem: Stem of the :term:`Summary .csv` file to generate a graph\n                    from.\n\n        output_fpath: The absolute path to the output image file to save\n                      generated graph to.\n\n        title: Graph title.\n\n        xlabel: X-label for graph.\n\n        ylabel: Y-label for graph.\n\n        xticks: The xticks for the graph.\n\n        xtick_labels: The xtick labels for the graph (can be different than the\n                      xticks; e.g., if the xticxs are 1-10 for categorical data,\n                      then then labels would be the categories).\n\n        large_text: Should the labels, ticks, and titles be large, or regular\n                    size?\n\n        legend: Legend for graph.\n\n        logyscale: Should the Y axis be in the log2 domain ?\n\n        stats: The type of statistics to include on the graph (from\n               ``--dist-stats``).\n\n        model_root: The absolute path to the ``models/`` directory for the batch\n                     experiment.\n\n    '
__init__(stats_root: Path, input_stem: str, output_fpath: Path, title: str, xlabel: str, ylabel: str, xticks: List[float], xtick_labels: Optional[List[str]] = None, large_text: bool = False, legend: List[str] = ['Empirical Data'], logyscale: bool = False, stats: str = 'none', model_root: Optional[Path] = None) None[source]
__module__ = 'sierra.core.graphs.summary_line_graph'
__weakref__

list of weak references to the object (if defined)

_plot_bw_stats(ax, xticks, data_dfy: DataFrame, stat_dfs: Dict[str, DataFrame]) None[source]
_plot_conf95_stats(xticks, data_dfy: DataFrame, stat_dfs: Dict[str, DataFrame]) None[source]
_plot_legend(model: Tuple[DataFrame, List[str]]) None[source]
_plot_lines(data_dfy: DataFrame, model: Tuple[DataFrame, List[str]]) None[source]
_plot_stats(ax, xticks, data_dfy: DataFrame, stat_dfs: Dict[str, DataFrame]) None[source]

Plot statistics for all lines on the graph.

_plot_ticks(ax) None[source]
_read_bw_stats() Dict[str, List[DataFrame]][source]
_read_conf95_stats() Dict[str, List[DataFrame]][source]
_read_models() Tuple[DataFrame, List[str]][source]
_read_stats() Dict[str, List[DataFrame]][source]
generate() None[source]
kLineStyles = ['-', '--', '.-', ':', '-', '--', '.-', ':']
kMarkStyles = ['o', '^', 's', 'x', 'o', '^', 's', 'x']