(I have learned about polynomial linear regression, logistic regression, and neural networks.)

I have a binary logistic regression problem. I need to classify things to be true or false. What makes this hard for me to understand is that I only have y=1 training examples. Is it possible to get a decision boundary for this data set?

I simplified the problem by only thinking about 2 of my features.

training set

I experimented a little bit by placing fake y=0 training examples everywhere.

fake training set and decision boundary

Gradient descent with the real and fake training sets seems to fit the data ok. It is a bit underfit, taking into account that this is a degree 6 curve and regularization is turned off.

There has to be a better way to approach this problem. Heck, I could even calculate the convex hull! (Not sure how well that will work in 15+ dimensions.) Any advice?

  • $\begingroup$ What you're doing is called density estimation, and there are purpose-designed methods for the task. Clustering is related, and both fall under the purview of unsupervised learning. $\endgroup$
    – Hong Ooi
    Commented May 2, 2015 at 1:58

1 Answer 1


Do you have a test set with $y = 0$ examples? If not, it will be pretty hard to evaluate your classifier!

Anyway, logistic regression isn't the greatest tool for this, but there are other neat techniques that were designed for problems like this, usually falling under the umbrella term of one-class classification. I think the most commonly used is the one-class support vector machine.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.