what-if-tool icon indicating copy to clipboard operation
what-if-tool copied to clipboard

Replacing model with predictions data

Open caitlinrs opened this issue 2 years ago • 1 comments

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.)?

caitlinrs avatar Jul 20 '22 23:07 caitlinrs

There are two approaches that would work:

  1. 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/

  2. 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.

jameswex avatar Jul 22 '22 16:07 jameswex