Is it possible to have missing values in scikit-learn ? How should they be represented? I couldn't find any documentation about that.
Missing values are simply not supported in scikit-learn. There has been discussion on the mailing list about this before, but no attempt to actually write code to handle them.
Whatever you do, don't use NaN to encode missing values, since many of the algorithms refuse to handle samples containing NaNs.
The above answer is outdated; the latest release of scikit-learn has a class Imputer
that does simple, per-feature missing value imputation. You can feed it arrays containing NaNs to have those replaced by the mean, median or mode of the corresponding feature.