How to use prediction() in formula?
Hi again,
How do you use the predictions of a model in a subsequent FeatureGeneration formula to transform the values?
I've developed a model that predicts the log-odds of an event, but I want to transform it back to a probability so I can plot it on a scale that is more familiar.
e.g. LinearRegression of y on x, then use Model Applier to get prediction(y)
I can use FeatureGenerator to convert the dependent to a probability:
prob_y = exp(y) / (1+exp(y))
... which in RM would be written as:
/(exp(y),+(const[1](), exp(y))
However, when I try to do the same thing with the predicted values, which are named by the ModelApplier node as "prediction(y)", the parentheses in the name cause errors:
/(exp(prediction(y)),+(const[1](), exp(prediction(y)))
I've tried it with single or double quotes, without success:
/(exp('prediction(y)'),+(const[1](), exp('prediction(y)'))
/(exp("prediction(y)"),+(const[1](), exp("prediction(y)"))
Is there a way to reference a feature name that contains a special character (like parens), or do you have to rename the feature to something "safer"?
Thanks,
Keith