tabensemb.data.datamodule.DataModule.cal_corr#

method

DataModule.cal_corr(method: str | Callable = 'pearson', imputed: bool = False, features_only: bool = False, select_by_value_kwargs: Dict | None = None) DataFrame[source]#

Calculate Pearson correlation coefficients among continuous features.

Parameters:
method

The argument of pd.DataFrame.corr. “pearson”, “kendall”, “spearman” or Callable.

imputed

Whether the imputed dataset should be considered. If False, some NaN values may exist for features that have missing values.

features_only

If False, the target is also considered.

select_by_value_kwargs

Arguments for select_by_value().

Returns:
pd.DataFrame

The correlation dataframe.