Open superichmann opened 11 months ago
@LittleLittleCloud Can you please take a look?
In your case, I would just remove NormalizeMinMax
on label column, as NormalizeMinMax
is a linear transformer I wonder if applying it on the label would make a difference on the training result.
If you still want to keep the transformer, you would need to scale the predicting label back manually
// y_min, y_max is the minimum and maxmium label value from your training dataset
y_normalized = (y - y_min) / (y_max - y_min)
y = y_normalized * (y_max - y_min) + y_min
TLDR: How can I do inverse transform using TransformerChain?
When applying a preFeaturizer on the target column
var logTransformer = mlContext.Transforms.NormalizeMinMax("Label",fixZero:true);
within a regression experiment, the predicted valuesIDataView preds = result.Model.Transform(predictMe);
are in the wrong scale.Original values: 10 22 33 12 6 6 5
Predictions without preFeaturizer: 8.593365 19.133606 19.094164 11.576735 11.040246 10.156776 9.546574
Predictions with preFeaturizer: 0.06661523 0.14832252 0.14801677 0.08974213 0.08558331 0.0787347 0.07400444
as you can see, the predictions with the preFeaturizer applied are in a totally different scale.
How can I actually get the predicted values in the scale of the original target column and not in the scale of the applied transformer?