what-if-tool
what-if-tool copied to clipboard
Replacing model with predictions data
Is there a way to get the What-if Widget to work without using a model? My project does not have a model, but what I do have is prediction data. Is there a way to substitute the model with using label and prediction data instead of a model while still being able to get all the features (i.e. optimization strategy, ROC curve, PR curve, etc.)?
There are two approaches that would work:
-
Have the datapoints contain the prediction outputs directly with specially named fields. See the note at the bottom of https://pair-code.github.io/what-if-tool/learn/tutorials/notebooks/
-
Write a custom prediction function that looks like the pre-calculated prediction data for each example instead of having it call the model (https://pair-code.github.io/what-if-tool/learn/tutorials/custom-prediction/)
Note that in either of these cases, some features (partial dependence plots, for example) won't work as expected as there is no way to get predictions for newly created datapoints.