icat.histogram.Histogram#
- class icat.histogram.Histogram(width=400, **params)#
Bases:
Viewer
Histogram to show the distribution of prediction outputs from the model on some set of the data. Anything above .5 is appropriate colored to orange for interesting.
This is done via a Vega pane.
- Parameters:
width (int) – How wide to render the histogram.
Methods
__init__
([width])Use altair to create the bar chart for the current data.
servable
([title, location, area, target])Serves the object or adds it to the configured pn.state.template if in a panel serve context, writes to the DOM if in a pyodide context and returns the Panel object to allow it to display itself in a notebook context.
set_data
(df, prediction_col)Re-generate the histogram given the passed data (which should already include the prediction values.)
show
([title, port, address, ...])Starts a Bokeh server and displays the Viewable in a new tab.
Attributes
param
- get_vega_graph()#
Use altair to create the bar chart for the current data.
- Return type:
Chart
- name = 'Histogram'#
- set_data(df, prediction_col)#
Re-generate the histogram given the passed data (which should already include the prediction values.)
- Parameters:
df (pd.DataFrame) – The dataset with a column of prediction outputs in it.
prediction_col (str) – The name of the column with prediction outputs.