rmsd

hhpy.ds.rmsd(x: str, df: pandas.core.frame.DataFrame, group: str, return_df_paired: bool = False, agg_func: str = 'median', standardize: bool = False, to_abs: bool = False) → Union[float, pandas.core.frame.DataFrame][source]

calculated the weighted root mean squared difference for a reference columns x by a specific group. For a multi group DataFrame see df_rmsd(). For a plot see hhpy.plotting.rmsdplot()

Parameters:
  • x – name of the column to calculate the rmsd for
  • df – pandas DataFrame
  • group – groups for which to calculate the rmsd
  • return_df_paired – whether to return the paired DataFrame
  • agg_func – which aggregation to use for the group value, passed to pd.DataFrame.agg
  • standardize – whether to apply Standardization before calculating the rmsd
  • to_abs – whether to cast x to abs before calculating the rmsd
Returns:

if return_df_paired pandas DataFrame, else rmsd as float

Examples

Check out the example notebook