diff --git a/docs/_build/.doctrees/environment.pickle b/docs/_build/.doctrees/environment.pickle index 7c698e5..7435204 100644 Binary files a/docs/_build/.doctrees/environment.pickle and b/docs/_build/.doctrees/environment.pickle differ diff --git a/docs/_build/genindex.html b/docs/_build/genindex.html index 266f896..9bd1d18 100644 --- a/docs/_build/genindex.html +++ b/docs/_build/genindex.html @@ -37,6 +37,7 @@

Index

C + | E | F | G | I @@ -55,6 +56,20 @@

C

+

E

+ + + +
+

F

- + + + @@ -112,14 +113,17 @@ results. - + +
    diff --git a/docs/_build/objects.inv b/docs/_build/objects.inv index f0411be..29f98ec 100644 Binary files a/docs/_build/objects.inv and b/docs/_build/objects.inv differ diff --git a/docs/_build/searchindex.js b/docs/_build/searchindex.js index 7c55d8f..9fe9d4e 100644 --- a/docs/_build/searchindex.js +++ b/docs/_build/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["about","docs","generated/mlconfound","index","install","quickstart"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.viewcode":1,nbsphinx:3,sphinx:56},filenames:["about.md","docs.md","generated/mlconfound.rst","index.rst","install.md","quickstart.rst"],objects:{"":{mlconfound:[2,0,0,"-"]},"mlconfound.plot":{plot_graph:[1,1,1,""],plot_null_dist:[1,1,1,""]},"mlconfound.simulate":{identity:[1,1,1,""],simulate_y_c_yhat:[1,1,1,""],sinh_arcsinh:[1,1,1,""]},"mlconfound.stats":{CptResults:[1,2,1,""],ResultsFullyConfounded:[1,2,1,""],ResultsPartiallyConfounded:[1,2,1,""],full_confound_test:[1,1,1,""],generalization_test:[1,1,1,""],partial_confound_test:[1,1,1,""]},"mlconfound.stats.CptResults":{null_distribution:[1,3,1,""],p:[1,3,1,""],p_ci:[1,3,1,""],r2_x_y:[1,3,1,""],r2_x_z:[1,3,1,""],r2_y_z:[1,3,1,""]},"mlconfound.stats.ResultsFullyConfounded":{null_distribution:[1,3,1,""],p:[1,3,1,""],p_ci:[1,3,1,""],r2_y_c:[1,3,1,""],r2_y_yhat:[1,3,1,""],r2_yhat_c:[1,3,1,""]},"mlconfound.stats.ResultsPartiallyConfounded":{null_distribution:[1,3,1,""],p:[1,3,1,""],p_ci:[1,3,1,""],r2_y_c:[1,3,1,""],r2_y_yhat:[1,3,1,""],r2_yhat_c:[1,3,1,""]},mlconfound:{plot:[1,0,0,"-"],simulate:[1,0,0,"-"],stats:[1,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","attribute","Python attribute"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:attribute"},terms:{"0":[1,4,5],"00":5,"00814":[0,3,5],"01":5,"017867":5,"027":5,"03":5,"031732":5,"03758519":1,"039042":5,"03955979":1,"03998411":1,"067903":5,"09613765":1,"1":[0,1,4,5],"100":[1,5],"1000":[1,5],"11":4,"17":4,"175":[0,1],"187028":5,"197":[0,1],"2":[0,1,4,5],"2009":1,"2020":[0,1],"2021":[0,3,5],"210914":5,"2111":[0,3,5],"22579272":1,"237854":5,"3":1,"30471708":1,"31057339":1,"32193037":1,"323":5,"35013318":1,"4":[1,4],"42":[1,5],"48801839":1,"5":[1,5],"50":[1,5],"50886059":1,"58it":5,"595":5,"6":1,"61":4,"64it":5,"7":1,"732287":5,"7504512":1,"76":5,"761":1,"770":1,"780":1,"786173":5,"82":[0,1],"83888754":1,"88854985":1,"8900947":1,"9":1,"95":1,"96":1,"case":5,"class":1,"default":[1,5],"export":0,"float":1,"function":[1,5],"import":3,"int":1,"null":[0,1,5],"return":[1,5],"true":[1,5],"while":1,A:[1,5],As:0,For:5,In:5,No:5,The:[0,1,5],To:1,_:[0,1],ab:0,about:[1,3,4],accord:5,accur:5,across:5,addit:1,adjust:5,affect:1,ag:5,against:5,al:1,alia:1,all:[1,5],allow:1,also:5,altern:5,an:[1,5],analyz:3,appli:5,applic:1,approach:1,ar:[0,1,5],arcsinh:1,argumnet:1,array_lik:1,arxiv:[0,3,5],associ:5,assumpt:0,attribut:1,avail:1,ax:1,b:[0,1],back:[0,1,4],bar:1,barber:0,base:[1,5],batch:1,being:5,berrett:[0,1],between:[1,5],bia:[0,1,3,5],bias:[0,5],bin_c:1,bin_i:1,bin_yhat:1,binomi:[1,5],biometrika:1,bool:1,build:0,built:5,c:[1,3,5],c_i:1,c_name:[1,5],callabl:1,can:[1,5],carlo:[1,5],cat_c:1,cat_i:1,cat_yhat:1,categor:1,center:1,chain:[1,5],chang:1,character:5,ci:5,classif:1,coeffici:1,com:[3,4],comparison:5,cond_dist_method:1,condit:[0,1,5],condition:5,confid:[1,5],confoudn:[0,1],confound:[0,3],confound_test_result:1,contain:1,contribut:[1,5],control:[0,1],core:4,cornel:0,correct:5,correl:1,could:5,counfound:3,cptresult:1,creat:5,custom:5,data:[1,5],datafram:5,dataset:5,de:0,decent:5,delta:1,depend:[1,5],depict:1,describ:1,detail:[1,3],determin:1,develop:0,dict:1,direct:5,directli:[1,5],discoveri:5,displai:0,distribut:[0,1,5],document:[0,4],doe:5,dot2tex:4,dot:1,driven:[1,5],e:[1,5],edu:0,effect:[0,1,3],entir:1,epsilon:1,especi:5,essen:0,estim:[1,5],et:1,evid:5,exampl:[1,5],expect:1,explain:[1,5],explicit:5,extens:1,extrem:5,f:[0,1],fals:[1,5],fdr:5,feedback:[0,1,4],field:[0,1],figur:1,file:1,flag:[1,5],follow:5,form:5,framework:0,from:[1,3,5],full:[0,5],full_confound_test:1,fulli:[0,1,5],g:[1,5],gam:1,gener:1,generaliz:0,generalization_test:1,germani:0,git:4,github:[0,4],give:[0,1,4],given:[1,5],graph:[1,5],graphic:5,graphviz:[1,4],h0:1,h0_c:5,h0_y:5,h0_yhat:5,h1_c:5,h1_y:5,h1_yhat:5,hamper:0,handl:1,hat:[1,5],have:5,here:5,high:0,histogram:[1,5],histplot:1,hood:1,hospit:0,howev:5,http:[0,3,4],hypothesi:[0,1,5],i:[1,5],ident:1,implement:0,impli:5,increas:5,independ:[0,1,5],independencewhil:0,index:1,indic:5,input:1,instal:0,interv:1,introduc:1,investig:5,involv:1,ipynb:1,iq:5,issu:[0,4],its:1,j:0,job:1,joblib:4,jone:1,journal:[0,1],kurtosi:1,kwarg:1,lab:[0,3,4],label:5,lack:0,lb:0,learn:[1,3,5],let:5,librari:0,limit:5,line:5,linear:1,logit:1,low:[1,5],lower:5,m:1,machin:[1,3,5],mailto:0,main:[0,1,4],mani:[0,5],markov:[1,5],mathcal:1,matplotlib:1,mcmc_step:1,mean:1,method:1,methodolog:[0,1],might:5,mlconfound:[4,5],model:[0,1,3,5],modul:3,mont:[1,5],more:[1,3,5],multinomi:1,multipl:5,must:[1,5],n:[1,5],n_job:[1,5],name:[1,5],namedtupl:1,ndarrai:1,necessarili:5,next:5,non:[0,1],none:1,nonlin_trf_fun:1,normal:[0,1],note:[1,5],notebook:1,now:5,null_distribut:1,num_perm:[1,5],number:[1,5],numer:1,numpi:1,object:1,observ:[1,5],often:[0,5],onli:1,option:[4,5],out:1,outfile_bas:[1,5],output:[0,1],p:[1,5],p_ci:[1,5],packag:0,page:[0,1,3,4],panda:5,parallel:1,param:1,paramet:1,parametr:[0,5],partial:0,partial_confound_test:[1,3,5],pass:1,path:1,pd:5,perform:[1,5],permut:[0,1,5],pewsei:1,pip:[3,4],plot:[4,5],plot_graph:[1,5],plot_null_dist:[1,5],pni:[0,3,4],posit:1,power:0,precis:1,predict:[0,1,3,5],prep:1,preprint:[0,3,5],pretti:5,print:[1,5],probabl:1,process:5,processor:1,progress:1,propos:[0,5],provid:5,purpos:[1,5],put:5,py:1,pypi:3,quantif:[0,3,5],quantifi:3,quickstart:[0,1,3,4],r2:5,r2_x_y:1,r2_x_z:1,r2_y_c:1,r2_y_yhat:1,r2_y_z:1,r2_yhat_c:1,r:[0,1,5],random:[1,5],random_st:[1,5],rate:5,recent:0,recommend:1,red:5,refer:1,relat:1,represent:5,reproduc:5,research:[0,5],respect:[0,5],result:[1,5],resultsfullyconfound:1,resultspartiallyconfound:1,ret:5,return_null_dist:[1,5],rigor:0,robust:0,royal:[0,1],s:[1,5],sampl:1,samworth:0,save:1,scale:1,seaborn:[1,4,5],search:[1,3],see:1,seed:5,seri:[0,1],set:[0,1,5],sex:1,should:1,show:5,shown:0,signal:1,signific:[1,5],significantli:0,sim:1,simpli:[1,5],simul:0,simulate_y_c_yhat:[1,5],sinh:1,sinh_archsin:1,sinh_arcsinh:1,skew:1,sn:5,so:5,societi:[0,1],sole:5,some:5,sourc:1,spisak:[0,1,3,5],squar:1,stat:[3,5],state:1,statist:[0,1,3,5],statsmodel:4,step:[1,5],still:5,str:1,stronger:5,t:0,tama:[0,1],target:[1,5],techniqu:5,teh:1,test:0,test_fully_confound:1,test_partially_confound:1,than:[1,5],thei:5,theoret:0,theori:0,therefor:1,thi:[1,5],third:1,thoma:1,tool:3,tqdm:4,transform:1,transfrom:1,tupl:1,two:5,uk:0,uncondit:5,undepend:1,under:1,unit:1,univers:0,unpermut:5,upper:5,us:[1,5],valid:[0,1],valu:[1,5],variabl:[1,3,5],varianc:1,w_:1,w_cyhat:[1,5],w_yc:[1,5],w_yyhat:[1,5],wang:0,we:5,weight:1,what:5,whether:[1,5],without:1,x:1,y:[0,1,3,5],y_i:1,y_name:[1,5],yhat:[1,3],yhat_nam:[1,5],zero:[1,5]},titles:["About mlconfound","Documentation ","mlconfound","Welcome to the docs of \u2018mlconfound\u2019! ","Install","Quickstart"],titleterms:{"import":5,about:0,also:[0,4],author:0,bleed:4,bug:[0,4],citat:3,confound:[1,5],contact:[0,4],content:1,doc:3,document:[1,3],edg:4,exampl:3,from:4,full:1,github:3,h0:5,h1:5,index:3,indic:1,instal:[3,4],mlconfound:[0,1,2,3],modul:1,navig:[1,3],necessari:5,packag:5,partial:[1,5],plot:1,pypi:4,quickstart:5,recommend:4,refer:[0,5],report:[0,4],requir:4,see:[0,4],simul:[1,5],sourc:3,stabl:4,star:3,stat:1,statu:1,test:[1,5],welcom:3}}) \ No newline at end of file +Search.setIndex({docnames:["about","docs","generated/mlconfound","index","install","quickstart"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.viewcode":1,nbsphinx:3,sphinx:56},filenames:["about.md","docs.md","generated/mlconfound.rst","index.rst","install.md","quickstart.rst"],objects:{"":{mlconfound:[2,0,0,"-"]},"mlconfound.plot":{plot_graph:[1,1,1,""],plot_null_dist:[1,1,1,""]},"mlconfound.simulate":{identity:[1,1,1,""],simulate_y_c_yhat:[1,1,1,""],sinh_arcsinh:[1,1,1,""]},"mlconfound.stats":{CptResults:[1,2,1,""],ResultsFullyConfounded:[1,2,1,""],ResultsPartiallyConfounded:[1,2,1,""],full_confound_test:[1,1,1,""],generalization_test:[1,1,1,""],partial_confound_test:[1,1,1,""]},"mlconfound.stats.CptResults":{expected_r2_x_y:[1,3,1,""],null_distribution:[1,3,1,""],p:[1,3,1,""],p_ci:[1,3,1,""],r2_x_y:[1,3,1,""],r2_x_z:[1,3,1,""],r2_y_z:[1,3,1,""]},"mlconfound.stats.ResultsFullyConfounded":{expected_r2_y_yhat:[1,3,1,""],null_distribution:[1,3,1,""],p:[1,3,1,""],p_ci:[1,3,1,""],r2_y_c:[1,3,1,""],r2_y_yhat:[1,3,1,""],r2_yhat_c:[1,3,1,""]},"mlconfound.stats.ResultsPartiallyConfounded":{expected_r2_yhat_c:[1,3,1,""],null_distribution:[1,3,1,""],p:[1,3,1,""],p_ci:[1,3,1,""],r2_y_c:[1,3,1,""],r2_y_yhat:[1,3,1,""],r2_yhat_c:[1,3,1,""]},mlconfound:{plot:[1,0,0,"-"],simulate:[1,0,0,"-"],stats:[1,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","attribute","Python attribute"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:attribute"},terms:{"0":[1,4,5],"00":5,"00814":[0,3,5],"01":5,"017867":5,"024":5,"027":5,"03":5,"031732":5,"03758519":1,"039042":5,"03955979":1,"03998411":1,"04":5,"044":5,"05":1,"059":5,"065":5,"067903":5,"09613765":1,"1":[0,1,4,5],"100":[1,5],"1000":[1,5],"11":4,"17":4,"175":[0,1],"187028":5,"197":[0,1],"2":[0,1,4,5],"2009":1,"2020":[0,1],"2021":[0,3,5],"210914":5,"2111":[0,3,5],"22579272":1,"237854":5,"3":1,"30471708":1,"31057339":1,"32193037":1,"323":5,"35013318":1,"4":[1,4],"42":[1,5],"48801839":1,"5":[1,5],"50":[1,5],"50886059":1,"58it":5,"595":5,"6":1,"61":4,"64it":5,"7":1,"732287":5,"7504512":1,"76":5,"761":1,"770":1,"780":1,"786173":5,"82":[0,1],"83888754":1,"88854985":1,"8900947":1,"9":1,"95":[1,5],"96":1,"case":5,"class":1,"default":[1,5],"export":0,"float":1,"function":[1,5],"import":3,"int":1,"null":[0,1,5],"return":[1,5],"true":[1,5],"while":1,A:[1,5],As:0,For:5,In:5,No:5,The:[0,1,5],To:1,_:[0,1],ab:0,about:[1,3,4],accord:5,accur:5,across:5,addit:1,adjust:5,affect:1,ag:5,against:5,al:1,alia:1,all:[1,5],allow:1,also:5,altern:5,an:[1,5],analyz:3,appli:5,applic:1,approach:1,ar:[0,1,5],arcsinh:1,argumnet:1,array_lik:1,arxiv:[0,3,5],associ:5,assumpt:0,attribut:1,avail:1,ax:1,b:[0,1],back:[0,1,4],bar:1,barber:0,base:[1,5],batch:1,being:5,berrett:[0,1],between:[1,5],bia:[0,1,3,5],bias:[0,5],bin_c:1,bin_i:1,bin_yhat:1,binomi:[1,5],biometrika:1,bool:1,build:0,built:5,c:[1,3,5],c_i:1,c_name:[1,5],callabl:1,can:[1,5],carlo:[1,5],cat_c:1,cat_i:1,cat_yhat:1,categor:1,center:1,chain:[1,5],chang:1,character:5,ci:5,classif:1,coeffici:[1,5],com:[3,4],comparison:5,cond_dist_method:1,condit:[0,1,5],condition:5,confid:[1,5],confoudn:[0,1],confound:[0,3],confound_test_result:1,contain:1,contribut:[1,5],control:[0,1],core:4,cornel:0,correct:5,correl:1,could:5,counfound:3,cptresult:1,creat:[],custom:5,data:[1,5],datafram:[],dataset:5,de:0,decent:5,delta:1,depend:[1,5],depict:1,describ:1,detail:[1,3],determin:[1,5],develop:0,dict:1,direct:5,directli:[1,5],discoveri:5,displai:0,distribut:[0,1,5],document:[0,4],doe:5,dot2tex:4,dot:1,driven:[1,5],e:[1,5],edu:0,effect:[0,1,3],entir:1,epsilon:1,especi:5,essen:0,estim:[1,5],et:1,evid:5,exampl:[1,5],expect:[1,5],expected_r2_x_i:1,expected_r2_y_yhat:1,expected_r2_yhat_c:1,explain:[1,5],explicit:5,extens:1,extrem:5,f:[0,1],fall:5,fals:[1,5],fdr:5,feedback:[0,1,4],field:[0,1],figur:1,file:1,flag:[1,5],follow:5,form:5,framework:0,from:[1,3,5],full:[0,5],full_confound_test:1,fulli:[0,1,5],g:[1,5],gam:1,gener:1,generaliz:0,generalization_test:1,germani:0,git:4,github:[0,4],give:[0,1,4],given:[1,5],graph:[1,5],graphic:5,graphviz:[1,4],h0:1,h0_c:5,h0_y:5,h0_yhat:5,h1_c:5,h1_y:5,h1_yhat:5,hamper:0,handl:1,hat:[1,5],have:5,here:5,high:0,histogram:[1,5],histplot:1,hood:1,hospit:0,howev:5,http:[0,3,4],hypothesi:[0,1,5],i:[1,5],ident:1,implement:0,impli:5,increas:5,independ:[0,1,5],independencewhil:0,index:1,indic:5,input:1,instal:0,interv:1,introduc:1,investig:5,involv:1,ipynb:1,iq:5,issu:[0,4],its:1,j:0,job:1,joblib:4,jone:1,journal:[0,1],kurtosi:1,kwarg:1,lab:[0,3,4],label:5,lack:0,lb:0,learn:[1,3,5],let:5,librari:0,limit:5,line:5,linear:1,logit:1,low:[1,5],lower:5,m:1,machin:[1,3,5],mailto:0,main:[0,1,4],mani:[0,5],markov:[1,5],mathcal:1,matplotlib:1,mcmc_step:1,mean:1,method:1,methodolog:[0,1],might:5,mlconfound:[4,5],model:[0,1,3,5],modul:3,mont:[1,5],more:[1,3,5],multinomi:1,multipl:5,must:[1,5],n:[1,5],n_job:[1,5],name:[1,5],namedtupl:1,ndarrai:1,necessarili:5,next:5,non:[0,1],none:1,nonlin_trf_fun:1,normal:[0,1],note:[1,5],notebook:1,now:5,null_distribut:1,num_perm:[1,5],number:[1,5],numer:1,numpi:1,object:1,observ:[1,5],often:[0,5],onli:1,option:[4,5],our:5,out:1,outfile_bas:[1,5],output:[0,1],outsid:5,p:[1,5],p_ci:[1,5],packag:0,page:[0,1,3,4],panda:5,parallel:1,param:1,paramet:1,parametr:[0,5],partial:0,partial_confound_test:[1,3,5],pass:1,path:1,pd:5,percentil:5,perform:[1,5],permut:[0,1,5],pewsei:1,pip:[3,4],plot:[4,5],plot_graph:[1,5],plot_null_dist:[1,5],pni:[0,3,4],posit:1,power:0,precis:1,predict:[0,1,3,5],prep:1,preprint:[0,3,5],pretti:[],print:1,probabl:1,process:5,processor:1,progress:1,propos:[0,5],provid:5,purpos:[1,5],put:5,py:1,pypi:3,quantif:[0,3,5],quantifi:3,quantil:1,quickstart:[0,1,3,4],r2:5,r2_x_y:1,r2_x_z:1,r2_y_c:1,r2_y_yhat:1,r2_y_z:1,r2_yhat_c:1,r:[0,1,5],random:[1,5],random_st:[1,5],rang:5,rate:5,recent:0,recommend:1,red:5,refer:1,reject:5,relat:1,represent:5,reproduc:5,research:[0,5],respect:[0,5],result:[1,5],resultsfullyconfound:1,resultspartiallyconfound:1,ret:5,return_null_dist:[1,5],rigor:0,robust:0,royal:[0,1],s:[1,5],sampl:1,samworth:0,save:1,scale:1,seaborn:[1,4,5],search:[1,3],see:1,seed:5,seri:[0,1],set:[0,1,5],sex:1,should:1,show:5,shown:0,signal:1,signific:[1,5],significantli:0,sim:1,simpli:[1,5],simul:0,simulate_y_c_yhat:[1,5],sinh:1,sinh_archsin:1,sinh_arcsinh:1,skew:1,sn:5,so:5,societi:[0,1],sole:5,some:5,sourc:1,spisak:[0,1,3,5],squar:1,stat:[3,5],state:1,statist:[0,1,3,5],statsmodel:4,step:[1,5],still:5,str:1,stronger:5,t:0,tama:[0,1],target:[1,5],techniqu:5,teh:1,test:0,test_fully_confound:1,test_partially_confound:1,than:[1,5],thei:5,theoret:0,theori:0,therefor:1,thi:[1,5],third:1,thoma:1,tool:3,tqdm:4,transform:1,transfrom:1,tupl:1,two:5,uk:0,uncondit:5,uncounfoudn:5,undepend:1,under:1,unit:1,univers:0,unpermut:5,upper:5,us:[1,5],valid:[0,1],valu:[1,5],variabl:[1,3,5],varianc:1,w_:1,w_cyhat:[1,5],w_yc:[1,5],w_yyhat:[1,5],wang:0,we:5,weight:1,well:5,what:5,whether:[1,5],within:5,without:1,x:1,y:[0,1,3,5],y_i:1,y_name:[1,5],yhat:[1,3],yhat_nam:[1,5],zero:[1,5]},titles:["About mlconfound","Documentation ","mlconfound","Welcome to the docs of \u2018mlconfound\u2019! ","Install","Quickstart"],titleterms:{"import":5,about:0,also:[0,4],author:0,bleed:4,bug:[0,4],citat:3,confound:[1,5],contact:[0,4],content:1,doc:3,document:[1,3],edg:4,exampl:3,from:4,full:1,github:3,h0:5,h1:5,index:3,indic:1,instal:[3,4],mlconfound:[0,1,2,3],modul:1,navig:[1,3],necessari:5,packag:5,partial:[1,5],plot:1,pypi:4,quickstart:5,recommend:4,refer:[0,5],report:[0,4],requir:4,see:[0,4],simul:[1,5],sourc:3,stabl:4,star:3,stat:1,statu:1,test:[1,5],welcom:3}}) \ No newline at end of file diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 20e111a..1e1a754 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -60,8 +60,7 @@ The random seed is set for reproducible results. The flag ``return_null_dist`` is set so that the full permutation-based null distribution is returned, e.g. for plotting purposes. -The pandas dataframe is solely created for “pretty-printing” the -results. + .. code:: ipython3 @@ -101,8 +100,10 @@ results.
ci lower ci upper R2(y,c)R2(y^,c) R2(y,y^)Expected R2(y^,c)Observed R2(y^,c)
0.732287 0.786173 0.1870280.031732 0.210914[0.024, 0.04, 0.059]0.031732
+The p-value provides no evidence to reject our null-hypothesis of uncounfoudned model. +The observed coefficient-of-determination is well within the expected range (given by 5%, 50% and 95% percentiles). Let’s use the built-in plot functions of the package ``mlconfound`` for a graphical representation of the results. @@ -198,8 +202,9 @@ confounded model. ci lower ci upper R2(y,c) - R2(y^,c) R2(y,y^) + Expected R2(y^,c) + Observed R2(y^,c) @@ -209,8 +214,10 @@ confounded model. 0.017867 0.039042 0.187028 - 0.067903 0.237854 + [0.027, 0.044, 0.065] + 0.067903 + @@ -238,6 +245,8 @@ confounded model. The low p-value provides evidence against the null hypothesis of :math:`y` being conditionally independent on :math:`c` given :math:`y` and indicates that the model predictions are biased. +The observed coefficient-of-determination falls outside of the expected range (given by 5%, 50% and 95% percentiles). + +-----------------------------------------------------------------------+ | Note | diff --git a/mlconfound/stats.py b/mlconfound/stats.py index 1210f40..edae046 100755 --- a/mlconfound/stats.py +++ b/mlconfound/stats.py @@ -206,8 +206,9 @@ def _generate_X_CPT_MC(nstep, log_lik_mat, Pi, random_state=None): CptResults = namedtuple('CptResults', ['r2_x_z', - 'r2_x_y', 'r2_y_z', + 'r2_x_y', + 'expected_r2_x_y', 'p', 'p_ci', 'null_distribution']) @@ -238,25 +239,28 @@ def workhorse(_random_state): with tqdm_joblib(tqdm(desc='Permuting', total=num_perms, disable=not progress)): r2_xpi_y = np.array(Parallel(n_jobs=n_jobs)(delayed(workhorse)(i) for i in random_sates)) + expected_x_y = np.quantile(r2_xpi_y, (0.05, 0.5, 0.95)) p = np.sum(r2_xpi_y >= r2_x_y) / len(r2_xpi_y) - ci = _binom_ci(len(r2_xpi_y) * p, len(r2_xpi_y)) + ci_p = _binom_ci(len(r2_xpi_y) * p, len(r2_xpi_y)) if not return_null_dist: r2_xpi_y = None return CptResults( r2_x_z, - r2_x_y, r2_y_z, + r2_x_y, + expected_x_y, p, - ci, + ci_p, r2_xpi_y ) ResultsFullyConfounded = namedtuple('ResultsFullyConfounded', ['r2_y_c', - 'r2_y_yhat', 'r2_yhat_c', + 'r2_y_yhat', + 'expected_r2_y_yhat', 'p', 'p_ci', 'null_distribution']) @@ -273,7 +277,7 @@ def full_confound_test(y, yhat, c, num_perms=1000, Notes ----- - Performs the 'full confounder test', a statistical test described in [1]_, based + Performs the 'full confounder test', a statistical test described in [1]_, based on the conditional permutation test for independence [2]_, using a linear or a general additive model (for numerical y, based on the parameter `cond_dist_method`) and a multinomial logit model (for categorical y, undependent on cond_dist_method) to estimate the y|c conditional distribution. @@ -320,9 +324,11 @@ def full_confound_test(y, yhat, c, num_perms=1000, - "r2_y_c": coefficient-of-determination between y and c, + - "r2_yhat_c": coefficient-of-determination between yhat and c, + - "r2_y_yhat": coefficient-of-determination between y and yhat, - - "r2_yhat_c": coefficient-of-determination between yhat and c, + - "expected_r2_y_yhat": expected (0.05, 0.5, 0.95) quantiles of the coefficient-of-determination between y and yhat (given c), - "p": p-value, @@ -367,8 +373,9 @@ def full_confound_test(y, yhat, c, num_perms=1000, ResultsPartiallyConfounded = namedtuple('ResultsPartiallyConfounded', ['r2_y_c', - 'r2_yhat_c', 'r2_y_yhat', + 'r2_yhat_c', + 'expected_r2_yhat_c', 'p', 'p_ci', 'null_distribution']) @@ -432,9 +439,12 @@ def partial_confound_test(y, yhat, c, num_perms=1000, - "r2_y_c": coefficient-of-determination between y and c, + - "r2_y_yhat": coefficient-of-determination between y and yhat, + - "r2_yhat_c": coefficient-of-determination between yhat and c, - - "r2_y_yhat": coefficient-of-determination between y and yhat, + - "expected_r2_yhat_c": expected (0.05, 0.5, 0.95) quantiles of the coefficient-of-determination between yhat + and c (given y), - "p": p-value, diff --git a/notebooks/quickstart.ipynb b/notebooks/quickstart.ipynb old mode 100755 new mode 100644 index a519bca..f703943 --- a/notebooks/quickstart.ipynb +++ b/notebooks/quickstart.ipynb @@ -33,18 +33,22 @@ "##### Import the necessary packages" ], "metadata": { - "collapsed": false + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } } }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 6, "outputs": [], "source": [ "from mlconfound.stats import partial_confound_test\n", "from mlconfound.simulate import simulate_y_c_yhat\n", "from mlconfound.plot import plot_null_dist, plot_graph\n", "\n", + "import numpy as np\n", "import pandas as pd\n", "import seaborn as sns\n", "sns.set_style(\"whitegrid\")" @@ -65,12 +69,15 @@ "For the H0 simulation, the direct contribution of the confounder to the predicted values (`w_cyhat`) is set to zero." ], "metadata": { - "collapsed": false + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } } }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 7, "outputs": [], "source": [ "H0_y, H0_c, H0_yhat = simulate_y_c_yhat(w_yc=0.5,\n", @@ -101,7 +108,10 @@ "The pandas dataframe is solely created for \"pretty-printing\" the results." ], "metadata": { - "collapsed": false + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } } }, { @@ -112,13 +122,13 @@ "name": "stderr", "output_type": "stream", "text": [ - "Permuting: 100%|██████████| 1000/1000 [00:03<00:00, 323.64it/s]\n" + "Permuting: 100%|██████████| 1000/1000 [00:01<00:00, 529.63it/s]\n" ] }, { "data": { - "text/plain": " p ci lower ci upper R2(y,c) R2(y^,c) R2(y,y^)\n0 0.76 0.732287 0.786173 0.187028 0.031732 0.210914", - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
pci lowerci upperR2(y,c)R2(y^,c)R2(y,y^)
00.760.7322870.7861730.1870280.0317320.210914
\n
" + "text/plain": " p ci lower ci upper R2(y,c) R2(y,y^) Expected R2(y^,c) \\\n0 0.761 0.733321 0.787133 0.187028 0.210914 [0.024, 0.04, 0.059] \n\n R2(y^,c) \n0 0.031732 ", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
pci lowerci upperR2(y,c)R2(y,y^)Expected R2(y^,c)R2(y^,c)
00.7610.7333210.7871330.1870280.210914[0.024, 0.04, 0.059]0.031732
\n
" }, "execution_count": 9, "metadata": {}, @@ -134,8 +144,9 @@ " 'ci lower' : [ret.p_ci[0]],\n", " 'ci upper' : [ret.p_ci[1]],\n", " 'R2(y,c)' : [ret.r2_y_c],\n", - " 'R2(y^,c)' : [ret.r2_yhat_c],\n", " 'R2(y,y^)' : [ret.r2_y_yhat],\n", + " 'Expected R2(y^,c)': [np.round(ret.expected_r2_yhat_c, 3)],\n", + " 'R2(y^,c)' : [ret.r2_yhat_c]\n", "})\n" ], "metadata": { @@ -151,7 +162,10 @@ "Let's use the built-in plot functions of the package `mlconfound` for a graphical representation of the results." ], "metadata": { - "collapsed": false + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } } }, { @@ -169,7 +183,7 @@ { "data": { "text/plain": "
", - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEWCAYAAACJ0YulAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAiKElEQVR4nO3deVyUdeIH8M9wDEGeuDCoqyVEOukGKKaspgmiIKcY6+4WeW1oKYaam2a2ZUpLay1phyJWVuvWZogImAdiWKFpKG7u5JGZaDEUoqjjzDDD8/vD+P4kAQeY0/m8X69e+cw8x2fGwQ/P9R2ZJEkSiIiIALjYOgAREdkPlgIREQksBSIiElgKREQksBSIiEhgKRARkcBSoFvWokWL8M9//hMAsH//fowaNcrkZVNSUvDRRx8BAPLz8zF9+nSz5YqJicH+/fsBAKtXr8aTTz5ptnWvWbMGS5YsMdv6yP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T0tLSkJ2djT59+iAjI6PN6yciorYxqxQakslkGDduHN555x288MILbdqoXC5HTk7OPfO3bNnSpvUREZF1mFUKe/fuFV+bTCZ888038PLyslkoIiJyDLNKobCwUHzt5uaGvn374r333rNZKCIicgyzSuGNN96wdQ4iInICZl3RXFFRgfnz50OhUEChUCA1NRUVFRW2zkZERHZmViksX74cUVFROHToEA4dOoTIyEgsX77c1tmIiMjOzCqFa9euYdq0aXB3d4e7uzsSExNx7do1W2cjIiI7M6sUfH19sWPHDhiNRhiNRuzYsQO+vr42jkZERPZmVimkp6dj9+7dGDVqFEaPHo09e/bgj3/8o62zERGRnZl19tH69euxdu1a8dCbmpoarF27lmclERF1MGbtKZw+fbrRU9B8fX1d6razRERkHrNKwWQy4fr162K6pqam0bOaiYioYzDr8NHs2bMxffp0TJo0CQDw2WefYd68eTYNRkRE9mdWKSQkJGDIkCE4fPgwAOCdd97Bgw8+aNNgRERkf2bfJfXBBx9kERARdXBmfaZARESdA0uBiIgElgIREQksBSIiElgKREQksBSIiEhgKRARkcBSICIigaVAREQCS4GIiASWAhERCSwFIiISWApERCSwFIiISHBYKRiNRiQkJGDu3LkAgPLyciQlJWH8+PFIS0uDXq93VDQiok7LYaXw0UcfISQkREyvW7cOM2fOxL59+9C9e3dkZ2c7KhoRUaflkFKoqKjAwYMH8eSTTwIAJEnC4cOHMXHiRADA1KlToVQqHRGNiKhTM/vJa9aUnp6OpUuX4tatWwCA6upqdO/eHe7ud+IEBQVBrVa3uh6dTgeVSiWmtVpto2lnZ+28crkcGo3G4nGWjDGZTGL5huOMRqNZ67J1vrvHNMxr621Za0xTmfUGEzzdLf8bTqPV47sL31o8zhKu9nsHuF5me+a1eykUFhbCz88PQ4YMQUlJSbvW5eXlBblcLqZVKlWjaWdni7w+Pj42HaPRaMTyDce5ubmZtS5b57t7TMO8tt6WtcY0ldnTvQt+nVls8Xa2pShs/jvhar93gOtltnbelgrG7qVQWlqKAwcOoKioCDqdDjdv3sSaNWtQW1sLg8EAd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BYArXTxD1JK23OaCt8ZwTg69zUVn4eneBb/OLL5nfktX225LUdg6FpHVNPcebwnf486JewpERCSwFIiISGApEBGRwFIgIiKBpUBERAJLwUI8jY7IOngaq3PiKakW4ql3RNbB3yXnxD0FIiISWApERCSwFIiISGApEBGRwFIgIiKBpUBERAJLgYhcRluvU+D1DebjdQpE5DLacm0DwOsbLME9BSIiElgKREQksBSIiEhgKRARkcBSICIigaVARB3e3aekyuVyi8e0ZTuuiKekElGHd/eprBqNBj4+Pi2O2Zai6JS39u60ewododGJiKzNqfYUioqKsGbNGphMJiQlJSElJcVm2+JFMERE93KaPQWj0YhVq1YhKysL+fn5yMvLw7lz5xwdi4jIpsw5atHUZyC2OtrhNHsKJ06cwM9+9jP069cPABATEwOlUokHH3zQwcmIiGzHnKMWTX0GYqujFjJJkiSbrNlCn332GQ4dOoQ1a9YAAHJzc3HixAm88sorzY45fvw4vLy87BWRiKhD0Ol0CAsLa/J7TrOn0BbNvSgiImobp/lMITAwEBUVFWJarVYjMDDQgYmIiDofpymFX/ziF7h48SLKy8uh1+uRn5+PqKgoR8ciIupUnObwkbu7O1555RX87ne/g9FoxLRp0zBgwABHxyIi6lSc5oNmIiJyPKc5fERERI7HUiAiIsElSqGoqAgTJ07E+PHjkZmZec/39Xo90tLSMH78eCQlJeHy5csAgOrqasyYMQPh4eFYtWqVS2T+4osvkJiYiNjYWCQmJqK42PJbcdgz74kTJxAfH4/4+HjExcVh3759dsnbnsz1vv/+e4SHh2Pz5s1Onffy5ct45JFHxM+5pWt3nCUzAJw6dQrTp09HTEwMYmNjodPpnDbvzp07xc83Pj4egwYNgkqlsnne9mSuq6vDiy++iNjYWEyePBnvv/++dQJJTs5gMEjR0dHSpUuXJJ1OJ8XGxkpnz55ttMzHH38srVy5UpIkScrLy5Oef/55SZIk6datW9KRI0ekrVu3Sq+99ppLZD558qRUUVEhSZIknT59Who9erRT59VoNFJdXZ0kSZKkVqulkSNHimlnzVwvNTVVSk1NlbKyspw6b3l5uRQ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fFPQXqtOo/UygsLIQkSeIzBQC4efMm5s6di0WLFiEsLEzM9/LyavRYyaSkJOTk5CAnJweJiYlWy1Z/k7bU1NRG08CdxzM6863JybWxFKjT8/b2xssvv4wPP/wQBoMBer0e8+fPR3x8PCZNmtRo2ZCQEFy6dElMh4aGoqKiAnl5eZgyZYrZ2/z444/F7boVCgW2bt0K4M6hrKY+d6hXXV2Nnj17wsPDw5KXSGQ2lgIRgIcffhgDBw5EXl4edu/ejaNHj2L79u3iQe71D3EfO3asuF1xvcmTJ2Po0KHo0aOH2ds7f/68eErWihUrUFJSgtjYWCQmJuLcuXPNjispKcHjjz9u8esjMhfvkkpkAa1Wi2eeeQb/+Mc/xDOH586di5kzZ1r0VLG5c+diw4YNFj9qdcGCBViyZAn69+9v0Tgic7EUiCx06NAhhISEoGvXrkhKSsLAgQOxfv16m29Xr9ejoKAACQkJNt8WdV4sBSIiEviZAhERCSwFIiISWApERCSwFIiISGApEBGR8P8ApmkCFpJRYycAAAAASUVORK5CYII=\n" }, "metadata": {}, "output_type": "display_data" @@ -193,7 +207,10 @@ "i.e. we have no evidence against the null ($p=0.76$)." ], "metadata": { - "collapsed": false + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } } }, { @@ -202,7 +219,7 @@ "outputs": [ { "data": { - "text/plain": "", + "text/plain": "", "image/svg+xml": "\n\n\n\n\n\n%3\n\n\n\nc\n\nc\n\n\n\ny\n\ny\n\n\n\nc--y\n\n0.187\n\n\n\nyhat\n\n\n\n\n\nc--yhat\n\n0.032 (p=0.76)\n\n\n\ny--yhat\n\n0.211\n\n\n\n" }, "execution_count": 11, @@ -226,7 +243,10 @@ "The graph shows the unconditional $R^2$ values across the target $y$, confounder $c$ and predictions $\\hat{y}$." ], "metadata": { - "collapsed": false + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } } }, { @@ -237,26 +257,29 @@ "No let's apply the partial confounder test for H1, that is for a confounded model." ], "metadata": { - "collapsed": false + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } } }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 13, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "Permuting: 100%|██████████| 1000/1000 [00:01<00:00, 595.58it/s]\n" + "Permuting: 100%|██████████| 1000/1000 [00:01<00:00, 524.01it/s]\n" ] }, { "data": { - "text/plain": " p ci lower ci upper R2(y,c) R2(y^,c) R2(y,y^)\n0 0.027 0.017867 0.039042 0.187028 0.067903 0.237854", - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
pci lowerci upperR2(y,c)R2(y^,c)R2(y,y^)
00.0270.0178670.0390420.1870280.0679030.237854
\n
" + "text/plain": " p ci lower ci upper R2(y,c) R2(y,y^) Expected R2(y^,c) \\\n0 0.027 0.017867 0.039042 0.187028 0.237854 [0.027, 0.044, 0.065] \n\n R2(y^,c) \n0 0.067903 ", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
pci lowerci upperR2(y,c)R2(y,y^)Expected R2(y^,c)R2(y^,c)
00.0270.0178670.0390420.1870280.237854[0.027, 0.044, 0.065]0.067903
\n
" }, - "execution_count": 12, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -274,8 +297,9 @@ " 'ci lower' : [ret.p_ci[0]],\n", " 'ci upper' : [ret.p_ci[1]],\n", " 'R2(y,c)' : [ret.r2_y_c],\n", - " 'R2(y^,c)' : [ret.r2_yhat_c],\n", " 'R2(y,y^)' : [ret.r2_y_yhat],\n", + " 'Expected R2(y^,c)': [np.round(ret.expected_r2_yhat_c, 3)],\n", + " 'R2(y^,c)' : [ret.r2_yhat_c]\n", "})" ], "metadata": { @@ -339,7 +363,10 @@ "machine learning models, in prep, 2021.*" ], "metadata": { - "collapsed": false + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } } } ], diff --git a/pyproject.toml b/pyproject.toml index d6c8114..5eef7e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "mlconfound" -version = "0.20.1" +version = "0.21.0" description = "Tools for analyzing and quantifying effects of counfounder variables on machine learning model predictions." authors = ["Tamas Spisak "] license = "GPL-3.0-or-later"