OCDocker.OCScore.Utils.SimpleConsensus module

Simple consensus calculation for score datasets.

Usage:

import OCDocker.OCScore.Utils.SimpleConsensus as ocsimple

OCDocker.OCScore.Utils.SimpleConsensus.perform_simple_consensus(df_path, threshold=1.2, metrics=['mean', 'median', 'max', 'min', 'std', 'variance', 'sum', 'range', 'quantile_25', 'quantile_75', 'iqr', 'skewness', 'kurtosis'], verbose=False)[source]

Perform the simple consensus calculation for the given dataset.

Parameters:
  • df_path (str) – The path to the DataFrame.

  • threshold (float, optional) – The threshold to filter the results. Default is 1.2.

  • metrics (list[str], optional) – The list of metrics to calculate. Default is [‘mean’, ‘median’, ‘max’, ‘min’, ‘std’, ‘variance’, ‘sum’, ‘range’, ‘quantile_25’, ‘quantile_75’, ‘iqr’, ‘skewness’, ‘kurtosis’]. If empty, all metrics will be calculated.

  • verbose (bool, optional) – Whether to print the results. Default is False.

Returns:

The DataFrame containing the AUC and Error values

Return type:

pd.DataFrame

OCDocker.OCScore.Utils.SimpleConsensus.simple_consensus(data, score_columns)[source]

Perform the consensus calculation for the given dataset. The metrics are: mean, median, max, min, std, variance, sum, range, 25th and 75th percentiles, kurtoisis, skewness.

Parameters:
  • data (pd.DataFrame) – The DataFrame containing the dataset.

  • score_columns (list[str]) – The list of columns containing the scores.

Returns:

The DataFrame containing the combined metrics.

Return type:

pd.DataFrame