OCDocker.OCScore.Utils.Plotting module

Set of functions to manage plotting operations in OCDocker in the context of scoring functions.

Usage:

import OCDocker.OCScore.Utils.Plotting as ocscoreplot

OCDocker.OCScore.Utils.Plotting.plot_correlation_similarity(df1, df2, columns=[], annot=True, fontsize=None, normalize=True)[source]

Plots the similarity of correlation matrices from two DataFrames.

Parameters:
  • df1 (pd.DataFrame) – The first DataFrame.

  • df2 (pd.DataFrame) – The second DataFrame.

  • columns (list, optional) – List of columns to compare. If empty, all columns except metadata are used.

  • annot (bool, optional) – If True, write the data value in each cell. If False, don’t write the data value.

  • fontsize (int, optional) – The size of the font for the data value annotations.

  • normalize (bool, optional) – If True, normalize the correlation matrices after calculating the similarity.

Return type:

None

OCDocker.OCScore.Utils.Plotting.plot_roc_curves(df, feature_cols, labels, title='ROC')[source]

Plots ROC curves for a DataFrame.

Parameters:
  • df (pd.DataFrame) – DataFrame containing the features to plot the ROC curves for.

  • feature_cols (list) – List of feature columns to plot ROC curves for.

  • labels (pd.Series) – Series containing the labels for the ROC curves.

  • title (str, optional) – Title of the plot. Default is “ROC”.

Return type:

None