DiCE
DiCE copied to clipboard
Support for non-numeric classes
Currently, it seems that DiCE only supports numeric classes. Are you planning to support non numeric classes as well?
@shreyakhandelwal07 could you elaborate more on numeric classes bit?
Regards,
For instance, my dataset has 3 classes - 'Car', 'Truck', 'Bike'. DiCE expects the desired class for the counterfactuals to be numeric.
elif isinstance(desired_class_input, int): if desired_class_input >= 0 and desired_class_input < num_output_nodes: target_class = desired_class_input return target_class else: raise UserConfigValidationException("Desired class not present in training data!") else: raise UserConfigValidationException("The target class for {0} could not be identified".format( desired_class_input))
So when I choose my desired class as 'Car', I get an error that the target class for Car could not be identified
Thanks for raising this @shreyakhandelwal07 Agree, this can be a useful feature for classification models. However, it may require specific logic for handling strings in many places. We will look to support it in a future release.