Kydavra ICAReducer for reducing the dimensionality of your data
What is ICAReducer?
ICAReducer works as follows, it reduces the highly correlated features between them to one column. Is quite similar to PCAReducer, although it’s using the Fast ICA algorithm, which separates a mixed signal into additive subcomponents.
Further, we will use ICAReducer to simplify a classification or regression dataset in order to better fit our predictive model.
Using Kydavra ICAReducer.
Let’s first install kydavra by typing the following line. (Ensure that you have the 0.3 version).
Now, import the filter:
Please take into account that ICAReducer has the following parameters:
- min_corr (float, between 0 and 1, default=0.5) the minimal value of the correlation coefficient to be selected for reduction.
- max_corr (float, between 0 and 1, default=0.8) the maximal value of the correlation coefficient to be selected for reduction.
- correlation_type(str, default=’pearson’)
Next, let’s create an object to apply to the Hearth Disease UCI dataset.
df = pd.read_csv('heart.csv')
icar = ICAReducer(min_corr=0.4, max_corr=0.7)
new_df = icar.reduce(df, 'target')
X = new_df.drop(columns=['target'])
y = new_df['target']
Below, you can see the accuracy_score before and after we applied ICAReducer:
Also, we recommend trying other reducers from kydavra to have higher accuracy.
Made with ❤ by Sigmoid.
Follow us on Facebook, Instagram and LinkedIn: