Let's consider logistic regression for binary classification, with label 0 or 1. The loss function is -ylog(x) - (1-y)log(1-x), where x is predicted probability for label 1 and y is the label. In sklearn, logistic regression only take discrete labels. Why can't y be a continuous value between [0, 1]? Theoretically, Is there any mathematical problem if I label my samples like 0.75 being label 1 and 0.25 chance being label 0?
The question is mostly inspired by the implementation of logistic regression in sklearn, which does not take continuous input. For continuous input, every distinct number is considered as a class https://github.com/scikit-learn/scikit-learn/blob/0d378913b/sklearn/linear_model/_logistic.py#L1517.