You could normalize the outputs (e.g., via min-max scaling). However, I think 
the more intuitive way would be to clip the predictions. E.g., say you are 
predicting house prices, it probably makes no sense to have a negative 
prediction, so you would clip the output at some value  >0$

PS: -820 and -800 sounds a bit extreme if your training data is in a -5 to -9 
range. Is your training data from a different population then the one you use 
for testing/making predictions? Or maybe it's just an extreme case of 
overfitting.

Best,
Sebastian


> On Sep 10, 2017, at 3:13 PM, Thomas Evangelidis <teva...@gmail.com> wrote:
> 
> Greetings,
> 
> Is there any way to force the MLPRegressor to make predictions in the same 
> value range as the training data? For example, if the training data range 
> between -5 and -9, I don't want the predictions to range between -820 and 
> -800. In fact, some times I get anti-correlated predictions, for example 
> between 800 and 820 and I have to change the sign in order to calculate 
> correlations with experimental values. Is there a way to control the value 
> range explicitly or implicitly (by post-processing the predictions)?
> 
> thanks
> Thomas
> 
> 
> -- 
> ======================================================================
> Dr Thomas Evangelidis
> Post-doctoral Researcher
> CEITEC - Central European Institute of Technology
> Masaryk University
> Kamenice 5/A35/2S049, 
> 62500 Brno, Czech Republic 
> 
> email: tev...@pharm.uoa.gr
>               teva...@gmail.com
> 
> website: https://sites.google.com/site/thomasevangelidishomepage/
> 
> 
> _______________________________________________
> scikit-learn mailing list
> scikit-learn@python.org
> https://mail.python.org/mailman/listinfo/scikit-learn

_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn

Reply via email to