Counterfacutal Explanations Comperator
​
About
This is the README for the counterfactual explanations comperator system.
Usage
In this section we provide an explanation of how to use the application's features.
Add New Algorithm
In Order to add you own counterfactual algorithm, one's must support our algorithm interface as described below:
Algorithm Interface
1.initAlgo(model, arg_lst, feature_list) this function receives 3 arguments: 2.model - the actual ML model we would like to work with. NOTICE - model is guaranteed to have .predict method. 3.arg_lst - argument to the counterfactual algorithm, in a dictionary object. mapped as feature_list - model's data feature list ordered initAlgo should initiate and return an algorithm class object that supports the method: explain(self, model_input: returns an explanation for the given model with a given input - model_input results must return in the order of the feature_list initAlgo received for exmaple, for a given weather forecasting model with 3 features: humadity, temperature, date - model_input would be: [0.3, 25,25/12]
Algorithm Interface Implementation Example:
Add New Algorithm using the App​
To add new algorithm one must: 1.upload here algorithm code file (currently supports .py only) 2.add algorithm params - NOTICE - algorithm param names should be exaclty as expected in initAlgo. it is recommnded to give an explanation of the inputs and thier meaning. default value is optional and isn't a requirement 3.write a Description: write a short description of your algorithm to help others understand and learn from it. 4.write output exmaple description: Describe what is the expected output of the algorithm. 5.write additional info: here one should write informationfor who ever want to learn further of the algorithm, this is the place to write a github link, website url, email and more. 6.choose type to support, whether the algorithm supports classification models, regression models or both. 7.Click on the add button.
Run Algorithms
In order to run your algorithm: In the home screen click on the run algorithms button. Choose the algorithms you'd like to run Add parameters to each of the algorithms you chose Choose whether you want to limit the algorithm running time or not. if time is limited and couldn't finish in time, no results will be returned from the respective algorithm. Upload the model Upload model inputs as a json file including dictionary object including: { "names": , "values" : } 7.Click on the run button.
Edit Algorithms
In order to edit an algorithm:
-
In the home screen click on the edit algorithm button.
-
Choose the algorithm you would like to edit.
-
Fill the fields you would like to edit.
-
Click on the save button.