text: Search.setIndex({docnames:["dice_ml","dice_ml.data_interfaces","dice_ml.dice_interfaces","dice_ml.model_interfaces","dice_ml.utils","includeme","index","modules"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.todo":2,"sphinx.ext.viewcode":1,nbsphinx:1,sphinx:56},filenames:["dice_ml.rst","dice_ml.data_interfaces.rst","dice_ml.dice_interfaces.rst","dice_ml.model_interfaces.rst","dice_ml.utils.rst","includeme.rst","index.rst","modules.rst"],objects:{"":{dice_ml:[0,0,0,"-"]},"dice_ml.data":{Data:[0,1,1,""],decide:[0,3,1,""]},"dice_ml.data.Data":{decide_implementation_type:[0,2,1,""]},"dice_ml.data_interfaces":{private_data_interface:[1,0,0,"-"],public_data_interface:[1,0,0,"-"]},"dice_ml.data_interfaces.private_data_interface":{PrivateData:[1,1,1,""]},"dice_ml.data_interfaces.private_data_interface.PrivateData":{de_normalize_data:[1,2,1,""],from_dummies:[1,2,1,""],get_data_params:[1,2,1,""],get_decimal_precisions:[1,2,1,""],get_decoded_data:[1,2,1,""],get_dev_data:[1,2,1,""],get_encoded_categorical_feature_indexes:[1,2,1,""],get_indexes_of_features_to_vary:[1,2,1,""],get_mads:[1,2,1,""],get_minx_maxx:[1,2,1,""],normalize_data:[1,2,1,""],one_hot_encode_data:[1,2,1,""],prepare_df_for_encoding:[1,2,1,""],prepare_query_instance:[1,2,1,""]},"dice_ml.data_interfaces.public_data_interface":{PublicData:[1,1,1,""]},"dice_ml.data_interfaces.public_data_interface.PublicData":{de_normalize_data:[1,2,1,""],from_dummies:[1,2,1,""],get_data_params:[1,2,1,""],get_data_type:[1,2,1,""],get_decimal_precisions:[1,2,1,""],get_decoded_data:[1,2,1,""],get_dev_data:[1,2,1,""],get_encoded_categorical_feature_indexes:[1,2,1,""],get_features_range:[1,2,1,""],get_indexes_of_features_to_vary:[1,2,1,""],get_mads:[1,2,1,""],get_minx_maxx:[1,2,1,""],get_quantiles_from_training_data:[1,2,1,""],normalize_data:[1,2,1,""],one_hot_encode_data:[1,2,1,""],prepare_df_for_encoding:[1,2,1,""],prepare_query_instance:[1,2,1,""],split_data:[1,2,1,""]},"dice_ml.dice":{Dice:[0,1,1,""],decide:[0,3,1,""]},"dice_ml.dice.Dice":{decide_implementation_type:[0,2,1,""]},"dice_ml.dice_interfaces":{dice_pytorch:[2,0,0,"-"],dice_tensorflow:[2,0,0,"-"]},"dice_ml.dice_interfaces.dice_pytorch":{DicePyTorch:[2,1,1,""]},"dice_ml.dice_interfaces.dice_tensorflow":{DiceTensorFlow:[2,1,1,""]},"dice_ml.dice_interfaces.dice_tensorflow.DiceTensorFlow":{compute_dist:[2,2,1,""],compute_first_part_of_loss:[2,2,1,""],compute_fourth_part_of_loss:[2,2,1,""],compute_second_part_of_loss:[2,2,1,""],compute_third_part_of_loss:[2,2,1,""],do_cf_initializations:[2,2,1,""],do_loss_initializations:[2,2,1,""],do_optimizer_initializations:[2,2,1,""],dpp_style:[2,2,1,""],find_counterfactuals:[2,2,1,""],generate_counterfactuals:[2,2,1,""],initialize_CFs:[2,2,1,""],predict_fn:[2,2,1,""],round_off_cfs:[2,2,1,""],scipy_optimizers:[2,2,1,""],stop_loop:[2,2,1,""],tensorflow_optimizers:[2,2,1,""],update_hyperparameters:[2,2,1,""]},"dice_ml.diverse_counterfactuals":{CounterfactualExamples:[0,1,1,""]},"dice_ml.diverse_counterfactuals.CounterfactualExamples":{convert_to_dataframe:[0,2,1,""],convert_to_dataframe_sparse:[0,2,1,""],visualize_as_dataframe:[0,2,1,""],visualize_as_list:[0,2,1,""]},"dice_ml.model":{Model:[0,1,1,""],decide:[0,3,1,""]},"dice_ml.model.Model":{decide_implementation_type:[0,2,1,""]},"dice_ml.model_interfaces":{keras_tensorflow_model:[3,0,0,"-"],pytorch_model:[3,0,0,"-"]},"dice_ml.model_interfaces.keras_tensorflow_model":{KerasTensorFlowModel:[3,1,1,""]},"dice_ml.model_interfaces.keras_tensorflow_model.KerasTensorFlowModel":{get_gradient:[3,2,1,""],get_output:[3,2,1,""],load_model:[3,2,1,""]},"dice_ml.model_interfaces.pytorch_model":{PyTorchModel:[3,1,1,""]},"dice_ml.model_interfaces.pytorch_model.PyTorchModel":{get_gradient:[3,2,1,""],get_output:[3,2,1,""]},"dice_ml.utils":{helpers:[4,0,0,"-"]},"dice_ml.utils.helpers":{get_adult_data_info:[4,3,1,""],get_adult_income_modelpath:[4,3,1,""],load_adult_income_dataset:[4,3,1,""]},dice_ml:{data:[0,0,0,"-"],data_interfaces:[1,0,0,"-"],dice:[0,0,0,"-"],dice_interfaces:[2,0,0,"-"],diverse_counterfactuals:[0,0,0,"-"],model:[0,0,0,"-"],model_interfaces:[3,0,0,"-"],utils:[4,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:function"},terms:{"boolean":2,"case":6,"class":[0,1,2,3,5],"default":[2,4,5],"final":5,"float":2,"function":[1,2,4],"import":5,"new":5,"public":[0,1],"return":2,"true":[0,1,2],"try":5,Being:5,CFs:2,For:5,One:1,The:[0,6],Used:2,Using:5,With:5,about:[0,1],absolut:[1,2,5],access:[0,5],accuraci:5,acknowledg:5,across:5,action:5,activ:5,actual:5,adam:[2,5],add:[2,5],adding:5,addit:5,addition:5,adopt:5,adult:4,adversari:5,after:1,age:5,aggreg:5,agre:5,agreement:5,aim:5,algorithm:[2,5],all:[0,1,2,5],allow:5,also:5,altern:5,amit:5,analysi:4,ani:5,ann_model:5,appli:5,appropri:[0,5],approv:5,approxim:5,archiv:4,arxiv:5,assess:5,assign:[2,5],assoc:5,automat:5,avail:0,avg_dist:2,bachelor:5,balanc:5,bar:5,base:[0,1,2,3,4,5],been:5,being:5,between:[2,5],binari:2,binary_crossentropi:5,blue:5,bot:5,both:5,can:[0,2,5],cannot:5,categor:[0,1,2,5],categorical_penalti:2,causal:5,cfs_preds_spars:0,chanc:5,chang:5,changeabl:5,check:[2,5],chenhao:5,choos:5,cla:5,class_weight:5,classif:2,classifi:5,close:2,closer:5,code:5,col:1,collar:5,colleg:5,column:[1,5],com:[4,5],comment:5,compani:5,compil:5,complement:5,comput:[1,2,5],compute_dist:2,compute_first_part_of_loss:2,compute_fourth_part_of_loss:2,compute_second_part_of_loss:2,compute_third_part_of_loss:2,condit:2,conduct:5,conserv:2,consid:5,constraint:[2,5],construct:1,contact:5,contain:[0,1,3],containt:4,content:[6,7],continu:[0,1,2,5],continuous_featur:5,contribut:6,contributor:5,converg:2,convert_to_datafram:0,convert_to_dataframe_spars:0,core:5,correspond:2,could:5,counterfactu:[0,1,2,6],counterfactualexampl:[0,2],creat:5,credit:5,crimin:5,critic:5,current:2,cython:5,data:[1,4,5,6,7],data_interfac:[0,2,7],datafram:5,dataset:[4,5],de_normalize_data:1,debug:5,decid:[0,5],decide_implementation_typ:0,decis:5,declar:[2,5],decor:5,defin:[1,2],degre:5,dens:5,depend:5,descent:2,desir:[2,5],desired_class:[1,2,5],deta:4,detail:5,determin:[2,5],dev:1,develop:5,deviat:[1,5],devid:2,dice:1,dice_exp:5,dice_interfac:[0,7],dice_ml:[5,6,7],dice_pytorch:[0,7],dice_tensorflow:[0,7],dicepytorch:2,dicetensorflow:2,dictionari:2,differ:[0,2,5],difficult:5,difficulti:5,display_sparse_df:0,distanc:[2,5],distribut:5,divers:[2,6],diverse_counterfactu:[2,6,7],diversecf:2,diversity_loss_typ:2,diversity_weight:[2,5],divid:5,divorc:5,do_cf_initi:2,do_loss_initi:2,do_optimizer_initi:2,doc:5,doctor:5,doe:5,domain:5,done:5,dpp:2,dpp_style:2,due:5,dummi:1,each:5,eas:5,edu:4,educ:5,either:2,emploi:5,enabl:5,encod:1,end:5,english:5,enhanc:2,enough:5,ensur:[2,5],epoch:5,equal:2,especi:5,evalu:5,even:5,exampl:5,exp:5,explain:5,explan:[0,2,6],explanationsbas:2,explor:5,extract:1,face:5,facilit:1,fair:5,fall:1,fals:[1,2,4],faq:5,feasibl:6,featur:[0,1,2,5],feature_weight:[2,5],features_to_vari:[1,2,5],femal:5,few:0,filter_threshold:1,final_cf:0,final_cfs_pr:0,final_cfs_spars:0,financ:5,financi:5,find:[1,2,5],find_counterfactu:2,first:2,fit:5,flip:5,folder:5,follow:5,form:1,framework:[0,2],from:[1,2,4,5],from_dummi:1,full:5,futur:[2,3,5],gender:5,gener:[2,5],generate_counterfactu:[2,5],get:[1,4,6],get_adult_data_info:4,get_adult_income_modelpath:[4,5],get_data_param:1,get_data_typ:1,get_decimal_precis:1,get_decoded_data:1,get_dev_data:1,get_encoded_categorical_feature_index:1,get_features_rang:1,get_gradi:3,get_indexes_of_features_to_vari:1,get_mad:1,get_minx_maxx:1,get_output:3,get_quantiles_from_training_data:1,get_test_input:1,given:5,govern:5,grad:5,gradient:[0,2],graident:2,grant:5,h5py:5,h_zhu:4,harder:5,hardli:5,has:5,have:5,healthcar:5,help:5,helper:[0,5,7],henc:0,here:5,high:5,higher:5,highlight:5,hinge_loss:2,histori:5,hoc:2,hold:2,hot:1,hour:5,hours_per_week:5,how:5,howev:5,http:[4,5],hyperparamet:2,ics:4,idea:5,ideal:5,implement:[0,5],imposs:5,improv:5,includ:5,incom:[4,5],incorpor:5,index:[1,6],indic:2,individu:5,infer:1,inform:[0,1,5],init_near_query_inst:2,initi:2,initialize_cf:2,input:[1,3,5],input_inst:2,input_shap:5,input_tensor:3,instal:6,instanc:5,instruct:5,interactivesess:5,interest:[2,5],interfac:[0,1,3],intermedi:2,intern:5,interpret:5,interv:2,intial:2,invers:2,inverse_dist:2,inverse_mad:2,invok:5,iter:2,itr:2,its:5,judg:5,jupyt:5,justic:5,kei:2,kera:[3,5],keras_tensorflow_model:[0,7],kerastensorflowmodel:3,kernel_regular:5,kind:5,l2_loss:2,label:5,languag:5,larger:2,law:5,layer:5,lead:5,learn:[2,5],learning_r:2,level:[0,1,2,5],licens:5,linear:[2,5],list:[2,5],live:5,load:4,load_adult_income_dataset:[4,5],load_model:3,loan:5,loc:5,log_loss:2,loss:[2,5],loss_converge_maxit:2,loss_diff:2,loss_diff_thr:2,low:5,lower:5,machin:5,mad:[2,5],made:5,mai:5,make:[1,5],maker:5,male:5,mani:2,manual:5,marital_statu:5,marri:5,master:5,matrix:2,max:[1,2,5],max_it:2,maximum:2,mead:2,mean:5,measur:5,median:[1,2,5],meta:[0,1,4],metadata:5,method:[0,2,5],metric:[2,5],microsoft:5,min:[1,2,5],min_it:2,minimum:2,mode:5,model:[3,5,6,7],model_interfac:[0,1,2,7],model_path:[0,3,5],modul:[6,7],more:[2,5],most:5,mothil:5,multipl:5,name:[0,1,2],need:5,nelder:2,network:5,neural:5,next:5,none:[0,3],normal:1,normalize_data:[1,5],notebook:5,now:5,number:2,numpi:5,object:[0,1,2,3],occup:5,off:2,onc:5,one:[1,2,5],one_hot_encode_data:1,one_hot_encoded_data:5,onli:[0,2,5],open:5,opencod:5,oper:2,opposit:[2,5],optim:[2,5],option:[2,5],origin:[1,5],other:5,our:5,out:5,outcom:[2,5],outcome_nam:5,output:[0,5],packag:[5,6,7],page:6,panda:5,paper:[2,5],param:[0,1,4],paramet:[0,2,5],part:[1,2],particular:5,peopl:5,per:5,person:5,perturb:5,pip:5,plan:5,point:[0,2],poor:5,posit:2,possibl:5,post:2,posthoc_sparsity_param:[0,2],potenti:5,practic:5,pre:5,precis:1,predict:[2,5],predict_fn:2,prefix_sep:1,prepar:[1,4],prepare_df_for_encod:1,prepare_query_inst:1,print:2,privat:[0,1,5],private_data_interfac:[0,7],privatedata:1,probabl:2,probe:5,problem:5,problemat:5,process:5,prof:5,profession:5,profil:5,project:[2,5],project_it:2,promis:6,properti:5,provid:5,proxim:5,proximity_weight:[2,5],public_data_interfac:[0,7],publicdata:1,pull:5,python:5,pytorch:[0,2,3,5],pytorch_model:[0,7],pytorchmodel:3,quantil:1,query_inst:[1,2,5],question:5,race:5,ramaravind:5,randominitcf:2,rang:[0,1,5],rate:2,raw:1,rc1:5,receiv:5,recent:5,recours:5,reflect:5,regular:5,reject:5,rel:5,relat:1,relu:5,repo:5,request:5,requir:[0,1,2,5],research:5,result:[0,2],right:5,roadmap:6,round:2,round_off_cf:2,rpub:4,run:[2,5],sale:5,same:5,save:4,save_intermedi:4,school:5,scikit:5,scipy_optim:2,search:6,second:2,see:[2,5],select:5,self:5,sens:1,sensit:5,separ:5,sequenti:5,servic:5,sess:5,set:[2,5],setup:5,shape:5,sharma:5,should:5,show:5,sigmoid:5,similar:5,simpl:5,simpli:5,singl:5,societ:5,some:5,soon:5,sourc:[0,1,2,3,4,5],sparsiti:2,specifi:[0,5],split_data:[1,5],stakehold:5,start:6,step:5,stop:2,stop_loop:2,stopping_threshold:2,store:[0,2],string:2,subject:5,submethod:2,submit:5,submodul:[6,7],subpackag:[6,7],success:2,suggest:5,sum:2,support:[2,3,6],system:5,tabl:5,take:2,tan:5,target:2,tensorflow:[0,2,3,5],tensorflow_optim:2,test:[1,2,5],test_inst:0,test_pr:0,than:5,thei:5,them:1,therefor:5,thi:[2,4,5],third:2,those:5,three:5,threshold:2,through:5,thu:5,tie_random:2,too:5,top:5,total:2,total_cf:[2,5],train:[0,1,2,3,5],transform:[1,4],trust:5,truth:5,tunabl:5,two:2,txt:5,type:[0,1],typic:5,uci:4,uncov:5,understand:5,unknown:5,updat:2,update_hyperparamet:2,use:6,used:[0,5],useful:5,user:[1,5],using:5,util:[0,5,7],validation_split:5,valu:[1,2,5],vari:[2,5],variabl:2,vector:2,verbos:[2,5],version:5,visit:5,visual:[0,2,5],visualize_as_datafram:[0,5],visualize_as_list:0,wai:5,week:5,weight:[2,5],welcom:5,well:5,what:5,when:5,where:2,whether:5,which:1,white:5,who:5,whose:0,why:5,wide:5,widow:5,word:5,work:5,workclass:5,world:5,would:5,x_hat:2,x_train:5,y_train:5,yet:5,yloss_typ:2,you:5,your:5},titles:["dice_ml package","dice_ml.data_interfaces package","dice_ml.dice_interfaces package","dice_ml.model_interfaces package","dice_ml.utils package","Diverse Counterfactual Explanations (DiCE) for ML","Welcome to DiCE\u2019s documentation!","DiCE"],titleterms:{"case":5,The:5,content:[0,1,2,3,4],contribut:5,counterfactu:5,data:0,data_interfac:1,dice:[0,5,6,7],dice_interfac:2,dice_ml:[0,1,2,3,4],dice_pytorch:2,dice_tensorflow:2,divers:5,diverse_counterfactu:0,document:6,explan:5,feasibl:5,get:5,helper:4,indic:6,instal:5,keras_tensorflow_model:3,model:0,model_interfac:3,modul:[0,1,2,3,4],packag:[0,1,2,3,4],private_data_interfac:1,promis:5,public_data_interfac:1,pytorch_model:3,roadmap:5,setup:[],start:5,submodul:[0,1,2,3,4],subpackag:0,support:5,tabl:6,use:5,util:4,welcom:6}})