Closed gse-cc-git closed 6 years ago
yPred has integer type, not numeric. The census and confusion matrices are decorated with the class labels, although not the inferred response. As you note, the inferred factor levels employ the same mapping as those used to train. The level-to-string mapping is available from the trained object, and should be applied when attempting to reconcile separately-trained cases. Perhaps we should consider offering the decorations automatically. FWIW, when performing inference with differing _predictor_factor levels, appropriate adjustments are made internally, with warnings issued when appropriate. Closing this, but please feel free to reopen if there is more to discuss.
Inferred and trained response now include the level decorations. Thank you for the suggestion.
Hello, I am wondering if it's the intended result, or have I misunderstood what yPred really is ? I was caught using yPred as the class label prediction which seems not to be the case, below a MRE
Training is made using column nr 5
Species
as target variable.Prediction returns numerics. From that, I understand that 1 corresponds to level setosa, 2 to level versicolor and 3 to virginica.
What if I encode the levels as numerics?
Class label "2" is missing from the training dataset and thus cannot be predicted.
But that's ok, I can get the predicted class label returned using
Thanks.