I would rather use decision_function(X).ravel() to be more robust.