what-if-tool
what-if-tool copied to clipboard
Multiclass classification
Hi Team,
I see that there is one demo prepared for the multiclass classification of Iris dataset. I was trying to do the same, and added the option of .set_multi_class(True)
in the WitConfigBuilder.
But in my output report I am seeing the page as below:
This output does not see right. Is there something that I am missing. Below is the adjust_prediction function i am using:
def adjust_prediction(x):
x_df = pd.DataFrame(x, columns=data.columns.tolist())
return bst.predict_proba(x_df)
Is there any sample notebook running behind Iris demo?
I believe your problem will be solved if you provide WIT with a label vocab that converts the class indicies for your prediction lists into readable names. See the last cell in https://colab.sandbox.google.com/github/pair-code/what-if-tool/blob/master/WIT_Model_Comparison.ipynb#scrollTo=NUQVro76e38Q for example.
You will call something like .set_label_vocab(['Setosa', 'Versicolor', 'Verginica'])
when constructing the wit widget.