pandaspgs.performance.PerformanceMetric

An object that stores data of type PerformanceMetric. To understand the significance of each column of the DataFrame. Please visit "PerformanceMetric" in PGS Catalog Documentation for details.

Attributes:
  • raw_data

    list. Convert from obtained JSON data

  • performance_metrics

    DataFrame. It only exists if the parameter mode of constructor is Fat.

  • samples

    DataFrame. It only exists if the parameter mode of constructor is Fat.

  • cohorts

    DataFrame. It only exists if the parameter mode of constructor is Fat.

  • effect_sizes

    DataFrame. It only exists if the parameter mode of constructor is Fat.

  • class_acc

    DataFrame. It only exists if the parameter mode of constructor is Fat.

  • othermetrics

    DataFrame. It only exists if the parameter mode of constructor is Fat.

  • mode

    Fat or Thin. Specifies the mode of the returned object.

from pandaspgs.get_performance import get_performances

ch = get_performances(ppm_id='PPM000001')
ch
ch.raw_data
ch.mode
ch.performance_metrics
ch.samples
ch.cohorts
ch.effect_sizes
ch.class_acc
ch.othermetrics

Subset object s by either identifier or position

all_df = get_performance()
all_df[0].performance_metrics
all_df[0:3].performance_metrics
all_df['PPM000001'].performance_metrics
all_df[('PPM000001','PPM000002','PPM000003')].performance_metrics

Objects can be manipulated like sets in the mathematical sense.

one = get_performances(ppm_id='PPM000001')
two = get_performances(ppm_id='PPM000002')
three = get_performances(ppm_id='PPM000003')
one_and_two = one+two
two_and_three = two+three
only_one = one_and_two - two_and_three
only_two = one_and_two & two_and_three
one_and_two_and_three = one_and_two | two_and_three
one_and_three = one_and_two ^ two_and_three

__init__

__init__(data: list = [], mode: str = 'Fat')
Parameters:
  • data (list, default: [] ) –

    Raw JSON data.

  • mode (str, default: 'Fat' ) –

    Fat or Thin. Specifies the mode of the object.