scikit-learn-contrib / DESlib

A Python library for dynamic classifier and ensemble selection
BSD 3-Clause "New" or "Revised" License
479 stars 106 forks source link

Forgot scaling in example #134

Closed PhilipMay closed 5 years ago

PhilipMay commented 5 years ago

Hi, in this example here: https://deslib.readthedocs.io/en/latest/auto_examples/example_heterogeneous.html

You forgot to scale the data.

You say here: https://deslib.readthedocs.io/en/latest/user_guide/tutorial.html#preparing-the-dataset

Another important aspect is to normalize the data so that it has zero mean and unit variance, which is a common requirement for many machine learning algorithms. This step can be easily done using the StandardScaler class from scikit-learn. Note that the StandardScaler transform should be fitted using the training and DSEL data only. Then, it can be applied for the test data.

Also see here: https://github.com/scikit-learn/scikit-learn/issues/12982

You need to center and normalize your input data before applying an SVM

Thanks Philip

Menelau commented 5 years ago

@PhilipMay You are right, we forgot about normalizing the data. Thanks for pointing out this error!

I just fixed it on PR #135