Commit 21f5f943 authored by Louis Duchemin's avatar Louis Duchemin
Browse files

Calibration : multinomial + TDG09 + LMM pal histograms under Mutsel

parent 8092353c
......@@ -49,12 +49,13 @@ let _orthomam_echolocation () = {
ne_s = 4., 4. ;
}
let hist_pval (convergence_table : cpt file) : pdf file =
let hist_pval (convergence_table : cpt file) (pvalue_column:string): pdf file =
let f = fun%workflow dest ->
let cpt = Cpt.of_file_exn [%path convergence_table] in
let pvals =
Cpt.get_col_exn cpt Codepitk.Inhouse_lmm.cpt_tag
Cpt.get_col_exn cpt pvalue_column
|> Array.filter_opt
|> Array.map ~f:(fun p -> 1. -. p)
in
OCamlR_grDevices.pdf dest;
OCamlR_graphics.hist ~breaks:(`n 60) pvals
......@@ -66,13 +67,30 @@ module Under_mutsel = struct
module Pipeline = Codepi.Simulation_pipeline.Mutsel
let query ?(seed = 42) { tree = t ; ne_s ; branch_scale ; _ } =
let branch_scale = branch_scale *. 3. in
Pipeline.query ~seed ~tree:(NHX t) ~branch_scale ~ne_s
~profiles:"example/aa_fitness/263SelectedProfiles.tsv"
~n_h0:1000 ~n_ha:0 ()
let lmm d =
Pipeline.inhouse_lmm (query d)
|> hist_pval
let lmm dataset =
query dataset
|> Pipeline.inhouse_lmm
|> Fn.flip hist_pval Codepitk.Inhouse_lmm.cpt_tag
let multinomial dataset =
query dataset
|> Pipeline.multinomial_simulation_lrt
|> Fn.flip hist_pval "Multinomial_1mp"
let tdg09 dataset =
query dataset
|> Pipeline.tdg09
|> Fn.flip hist_pval "Tdg09_1MinusLRT"
let inhouse_tdg09 dataset =
query dataset
|> Pipeline.inhouse_tdg09
|> Fn.flip hist_pval "inhouse_tdg09_1mpval"
end
module Under_tdg09 = struct
......@@ -144,4 +162,7 @@ let target () =
let multinomial_under_tdg09 = Under_tdg09.uniformity_test tree `Multinomial in
let tdg09_under_tdg09 = Under_tdg09.uniformity_test tree `Tdg09 in
let lmm_under_mutsel_besnard2009 = Under_mutsel.lmm besnard2009 in
let multinomial_under_mutsel_besnard2009 = Under_mutsel.multinomial besnard2009 in
let tdg09_under_mutsel_besnard2009 = Under_mutsel.tdg09 besnard2009 in
let inhouse_tdg09_under_mutsel_besnard2009 = Under_mutsel.inhouse_tdg09 besnard2009 in
Report.pdflatex [%include_script "notes/calibration.tex"]
\documentclass{beamer}
\title{}
\title{Detection models calibration}
\begin{document}
......@@ -20,4 +20,16 @@
\includegraphics[width=0.75\textwidth]{<<<Report.pdfdep lmm_under_mutsel_besnard2009>>>}
\end{frame}
\begin{frame}{Multinomial under Mutsel simulations}
\includegraphics[width=0.75\textwidth]{<<<Report.pdfdep multinomial_under_mutsel_besnard2009>>>}
\end{frame}
\begin{frame}{Tdg09 under Mutsel simulations}
\includegraphics[width=0.75\textwidth]{<<<Report.pdfdep tdg09_under_mutsel_besnard2009>>>}
\end{frame}
\begin{frame}{Tdg09@LBBE under Mutsel simulations}
\includegraphics[width=0.75\textwidth]{<<<Report.pdfdep inhouse_tdg09_under_mutsel_besnard2009>>>}
\end{frame}
\end{document}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment