wallaroo.assays_v2.preview_result


This module features classes related to an assay v2 result that help with analysis and visualization for an interactive run.

class PreviewResult:

This class implements the IAssayAnalysis interface that offers a number of methods for analyzing and visualizing assay results from an interactive run.

Attributes: - raw: The raw MLOpsPreviewResult object. - window_end: The end time of the window. - scores: The scores of the window. - summaries: The summaries of the window.

PreviewResult( result: wallaroo.wallaroo_ml_ops_api_client.models.preview_result.PreviewResult, builder: wallaroo.assays_v2.assay_v2_builder.AssayV2Builder)

Initializes the PreviewResult object.

def chart(self, show_scores: bool = True) -> None:

Create a chart showing the bins, values and scores of a preview result. show_scores will also label each bin with its final weighted (if specified) score.

Parameters
  • show_scores: Whether to show the scores for each bin.
def compare_basic_stats(self) -> pandas.core.frame.DataFrame:

Compare basic stats between baseline and window.

Returns

A dataframe including stats, start and end times for the window against the baseline.

def compare_bins(self) -> pandas.core.frame.DataFrame:

Compare bins between baseline and window.

Returns

A dataframe including edges, labels and values for the window against the baseline.

def to_df_row(self) -> Dict[str, Any]:

Convert the preview result to a dataframe row.

Returns

A dataframe row.

class PreviewResultList(typing.List[wallaroo.assays_v2.preview_result.PreviewResult]):

This class implements the IAssayAnalysisList interface that offers a number of methods for analyzing and visualizing a list of assay results from an interactive run.

Attributes: - parent_assay: The AssayV2 object that this result belongs to.

Initializes the PreviewResultList object.

def chart_iopaths( self, labels: Optional[List[str]] = None, selected_labels: Optional[List[str]] = None, nth_x_tick: Optional[int] = None) -> None:

Create a basic chart of the scores for each unique iopath of a PreviewResultList.

Parameters
  • labels: Custom labels for each unique iopath. If provided, these labels will be used in chart titles instead of raw iopath values.
  • selected_labels: Labels to filter which iopaths to chart. If provided, only iopaths with labels in this list will be charted.
  • nth_x_tick: Controls the density of x ticks. Every nth x tick will be used for the chart.
def chart_scores( self, title: Optional[str] = None, nth_x_tick: Optional[int] = 4, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None) -> None:

Create a chart of the scores from a dataframe representation of a PreviewResultList.

Parameters
  • title: The title of the chart.
  • nth_x_tick: Controls the density of x ticks. Every nth x tick will be used for the chart.
  • start: The start time of the chart. Both start and end have to be provided to be used.
  • end: The end time of the chart. Both start and end have to be provided to be used.
def to_dataframe(self) -> pandas.core.frame.DataFrame:

Convert a PreviewResultList to a dataframe.

Returns

A dataframe representation of the list of preview results.

def to_full_dataframe(self) -> pandas.core.frame.DataFrame:

Convert a PreviewResultList to a full dataframe.

Returns

A dataframe representation of the list of preview results.

Inherited Members
builtins.list
clear
copy
append
insert
extend
pop
remove
index
count
reverse
sort