Answers for "how to remove correlated features"

0

how to remove correlated features

for i in range(len(correlation_matrix .columns)):
    for j in range(i):
        if abs(correlation_matrix.iloc[i, j]) > 0.8:
            colname = correlation_matrix.columns[i]
            correlated_features.add(colname)
Posted by: Guest on October-19-2020

Browse Popular Code Answers by Language