bacpipe.embedding_evaluation.visualization.visualize_predictions
Functions
|
Load the task results into a dict and return them. |
|
|
|
Save model specific classification results in the model specific plot path, displayed as horizontal bars. |
|
Visualization of per class results. |
|
Load a linear probe that was previously trained and saved. |
|
Apply a previously trained linear probe to data. |
Classes
|
The top level container for all the plot elements. |
|
PurePath subclass that can make system calls. |
|
|
|
- class bacpipe.embedding_evaluation.visualization.visualize_predictions.PredictionsLoader(vis_loader, path_func, models, panel_selection, progress_bar, loading_pane, thresh=0.5)[source]
Bases:
object
- bacpipe.embedding_evaluation.visualization.visualize_predictions.load_results(path_func, task, model_list)[source]
Load the task results into a dict and return them. For classification multiple subtasks exist, so do them seperately.
- Parameters:
path_func (function) – returns model specific tasks when model is given
task (str) – name of task
model_list (list) – list of models
- Returns:
performance for different tasks and models
- Return type:
dict
- bacpipe.embedding_evaluation.visualization.visualize_predictions.plot_classification_heatmap(event, predictions_loader, model, accumulate_by, threshold, species=None, **kwargs)[source]
- bacpipe.embedding_evaluation.visualization.visualize_predictions.plot_classification_results(task_name, paths=None, metrics=None, return_fig=False, path_func=None, model_name=None)[source]
Save model specific classification results in the model specific plot path, displayed as horizontal bars.
- Parameters:
task_name (str) – name of task
paths (SimpleNamespace object) – path to store plots
metrics (dict) – classification performance
return_fig (bool) – if True the figure will be returned, by default False
path_func (function) – function to return the paths when model name is given
model_name (str) – name of model, by default None
- Returns:
figure handle
- Return type:
plt object
- bacpipe.embedding_evaluation.visualization.visualize_predictions.plot_per_class_metrics(plot_path, task_name, model_list, metrics)[source]
Visualization of per class results. Resulting figure is stored in plot path. Models are sorted by the value of the first entry.
- Parameters:
plot_path (pathlib.Path object) – path to store plot in
task_name (str) – name of task
model_list (list) – list of models
metrics (dict) – performance dictionary