core.plot package

Submodules

core.plot.plot_feature module

core.plot.plot_feature.plot_feature_correlation(dataset, occupied_color='#009250', unoccupied_color='#920000', density_color='#00009250', unit={}, file_name=None)[source]

Plot the correlation figure for each features in dataset across all rooms. The plot will only identify two clusters, one for zero occupancy, and one for more than zero occupancy

Parameters
  • dataset (core.data.dataset.Dataset) – Dataset object that wants to show correlations

  • occupied_color (#rgba) – the color for more than zero occupancy data

  • unoccupied_color (#rgba) – the color for zero occupancy data

  • density_color (#rgba) – the color for density distribution plot

  • unit (dict(str, str)) – a dictionary that have feature name correspond to user-defined unit

  • file_name (str) – the file name of function’s figure. if None, then do not write figure to a file. Otherwise, write figure to file_name

Returns

None

core.plot.plot_occupancy_perc module

core.plot.plot_occupancy_perc.plot_occupancy_distribution(datasets, bin_size=600, orientation='horizontal', room_level=False, file_name=None, skip_calculation=False, size=1.5, x_label='', y_label='', swarm=False)[source]

Plot the distribution of when the room is occupied over a day (averaged) using histogram or swarmplot. Each Dataset in datasets have one distribution plot, and are shown in the same figure

Parameters
  • datasets (dict(str, core.data.dataset.Dataset)) – a set of Dataset corresponds to its name

  • bin_size (int) – number of seconds for each bin

  • orientation (str) – the direction or the plot. Selection of 'vertical' or 'horizontal'

  • room_level (bool) – decide the result is separate for each room in each Dataset or combine each dataset together

  • skip_calculation (bool) – if datasets is a set of list contains only times, then function can skip calculation

  • size (float) – the size of the dot in swarmplot

  • x_label (str) – text label on x_axis

  • y_label (str) – text label on y_axis

  • swarm (bool) – decide whether use histogram or swarmplot

  • file_name (str) – the file name of function’s figure. if None, then do not write figure to a file. Otherwise, write figure to file_name

Returns

None

core.plot.plot_result module

core.plot.plot_result.plot_result(result, threshold=None, group_by=0, dataset=None, model=None, metric=None, fixed_category='auto', x_label='', y_label='', y_range=None, add_label=True, font_size=12, file_name=None, bar_size=2, add_line=False, **kwargs)[source]

Plot the 2D result bar plot for the experimental result. The dimension with only one selected name is the dimension to flat

Parameters
  • result (core.evaluation.superclass.Result) – the 3D result from the experiments

  • threshold (float) – maximum score show in this figure

  • group_by (int) – indicate using which dimension as the x-axis. Selection of 0 and 1

  • dataset (str or list(str)) – select the name of datasets want to present in this figure

  • model (str or list(str)) – select the name of models want to present in this figure

  • metric (str or list(str)) – select the name of metrics want to present in this figure

  • fixed_category (str) – find which asix only have one value in order to create 2D result. If 'auto' then it will automatically find the dimension with only one value. Value must be 'auto', 'dataset', 'model', or 'metric'

  • y_range (None or list(float)) – the range of the y-axis. If None, then use best fit range

  • x_label (str) – text label on x_axis

  • y_label (str) – text label on y_axis

  • add_label (float) – decide whether add labels to the x-axis

  • font_size – the font size for all elements in the figure

  • bar_size (float) – the width of the bar

  • add_line (bool) – decide whether add trend line on histogram

  • file_name (str) – the file name of function’s figure. if None, then do not write figure to a file. Otherwise, write figure to file_name

  • **kwarg – other arguments for the matplotlib.pyplot.bar

Returns

None

core.plot.plot_start_end module

core.plot.plot_start_end.plot_start_end_distribution(start, end, bin_size=600, orientation='horizontal', file_name='output.png', size=1.5, x_label='', y_label='', swarm=False)[source]

Plot the distribution of when the room becomes occupied at the first time over a day (averaged) and the distribution of when the room starts unoccupied at the last time over a day (averaged) using histogram or swarmplot. Each Dataset in datasets have one distribution plot, and are shown in the same figure

Parameters
  • start (list(int)) – a set of list contains only the time of first occupied in seconds

  • end (list(int)) – a set of list contains only the time of last unoccupied in seconds

  • orientation (str) – the direction or the plot. Selection of 'vertical' or 'horizontal'

  • size (float) – the size of the dot in swarmplot

  • x_label (str) – text label on x_axis

  • y_label (str) – text label on y_axis

  • swarm (bool) – decide whether use histogram or swarmplot

  • file_name (str) – the file name of function’s figure. if None, then do not write figure to a file. Otherwise, write figure to file_name

Returns

None

Module contents