predictionio-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pat Ferrel <>
Subject Re: How to transform variables?
Date Fri, 20 Jan 2017 17:45:37 GMT
It would help to know what you are trying to implement.

The datasource and preparator are used only during the input part of train, they pass data
to the train method of your algorithm when you run `pio train`. The predict method does not
use them at all. It may get data from the EventStore, but not through those other classes.

If you need data to always be the log of some number you may want to take the log before it
is sent to the EventServer so it will always be a log, event when you get the Query or out
of the EventSever. 

On Jan 20, 2017, at 5:13 AM, Daniel Gabrieli <> wrote:


I am a new to PIO.

I have a variable called X that I would like take the log of during training and then during
prediction as well.  Where is the appropriate place to put the log function?

My guess is to override the "prepare" method; while I think the prepare method is called just
before training, I am not clear whether it is also called before prediction.

Do I call the log transformation again somewhere else so that it occurs during prediction?
 Possibly in the predict method?

Thank you,


View raw message