Redundante features verwijderen

Preprocessing voor Machine Learning in Python

James Chapman

Curriculum Manager, DataCamp

Redundante features

  • Ruisgevoelige features verwijderen
  • Gecorreleerde features verwijderen
  • Gedupliceerde features verwijderen
Preprocessing voor Machine Learning in Python

Scenario's voor handmatig verwijderen

city state lat long
hico tx 31.982778 -98.033333
mackinaw city mi 45.783889 -84.727778
winchester ky 37.990000 -84.179722
Preprocessing voor Machine Learning in Python

Gecorreleerde features

  • Statistisch gecorreleerd: features bewegen samen in dezelfde richting
  • Lineaire modellen veronderstellen onafhankelijke features
  • Pearson-correlatiecoëfficiënt
Preprocessing voor Machine Learning in Python

Gecorreleerde features

print(df)
        A     B     C
0    3.06  3.92  1.04
1    2.76  3.40  1.05
2    3.24  3.17  1.03
...
print(df.corr())
          A         B         C
A  1.000000  0.787194  0.543479
B  0.787194  1.000000  0.565468
C  0.543479  0.565468  1.000000
Preprocessing voor Machine Learning in Python

Laten we oefenen!

Preprocessing voor Machine Learning in Python

Preparing Video For Download...