Description
Hi folks,
The documentation of decision_function in LinearClassifierMixin says that it 'Predicts confidence scores for samples' where 'the confidence score for a sample is the signed distance of that sample to the hyperplane'. A few lines later the scores are computed as the scalar product of each sample with each of the coefficients, plus the intercepts. The problem with this is that without normalizing the coefficients to each have unit norm, the resulting scores will not actually be distances to the corresponding hyperplanes.
For example, in a setting where the intercept is zero, if I double the coefficient vectors the corresponding hyperplanes remain unchanged so the distances of each sample to each hyperplane should also remain unchanged. However, the scores, as defined above, would be changed, doubled in fact.
Am I mistaken or is there a reason why the coefficients are unnormalized?
Thanks,
Sina