bluecast.preprocessing.remove_collinearity

Module Contents

Functions

remove_correlated_columns(df[, threshold])

Remove collinear columns from a given DataFrame.

bluecast.preprocessing.remove_collinearity.remove_correlated_columns(df: pandas.DataFrame, threshold: float = 0.9)

Remove collinear columns from a given DataFrame.

Parameters:
  • df – Pandas DataFrame holding all columns.

  • threshold – Float indicating the correlation threshold. If the correlation is above or equal this value, one of the columns will be dropped.

Returns:

DataFrame with reduced number of columns.