spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From diplomatic Guru <diplomaticg...@gmail.com>
Subject Fwd: [Spark + MLlib] How to prevent negative values in Linear regression?
Date Tue, 21 Jun 2016 13:03:55 GMT
Hello Sean,

Absolutely, there is nothing wrong with predicting negative values but for
my scenario I do not want to predict any negative value (also, all the data
that is fed into the model is positive). Is there any way I could stop
predicting negative values. I assume it is not possible but wanted to find
out.

Thanks.


On 21 June 2016 at 13:55, Sean Owen <sowen@cloudera.com> wrote:

> There's nothing inherently wrong with a regression predicting a
> negative value. What is the issue, more specifically?
>
> On Tue, Jun 21, 2016 at 1:38 PM, diplomatic Guru
> <diplomaticguru@gmail.com> wrote:
> > Hello all,
> >
> > I have a job for forecasting using linear regression, but sometimes I'm
> > getting a negative prediction. How do I prevent this?
> >
> > Thanks.
> >
>

Mime
View raw message