actableai.stats.Stats¶Bases: object
Class handling calculation of correlation and decorrelation of features.
corr(df: pandas.core.frame.DataFrame, target_col: str, target_value: Optional[str] = None, p_value: float = 0.05, categorical_columns: Optional[List] = None, gen_categorical_columns: Optional[List] = None) list¶Calculate correlation between target and all other columns.
ValueError – If target_col is not in df.columns or (target_col is categorical and target_value is not in df[target_col].unique()).
List containing the correlation between the target and all
list
decorrelate(df, target_col, control_col, target_value=None, control_value=None, kde_steps='auto', corr_max=0.05, pval_max=0.05, kde_steps_=10) list¶Re-sample df to de-correlate target_col and control_col.
Sampled indices.
list