-
Notifications
You must be signed in to change notification settings - Fork 3
/
table-comparison-med.tex
56 lines (45 loc) · 1.98 KB
/
table-comparison-med.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
% https://raw.githubusercontent.com/jirispilka/latex-tikz-table/master/latex_tikz_table.tex
% Jiri Spilka, 2013
% bio.felk.cvut.cz/~spilkaj
%
%\documentclass[a4paper,11pt,oneside]{report}
\documentclass{standalone}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx,color}
\usepackage[usenames,dvipsnames]{xcolor}
%\usepackage[top=2.5cm, bottom=2.5cm, right=2.5cm, left=3cm]{geometry}% set boundary
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage{microtype} % very small changes -- spacing etc
\usepackage{booktabs}
\usepackage{multirow} % multirow v tabulce
\usepackage{tikz}
\newcommand{\drawBox}[3]
{
\begin{tikzpicture}
\def\w{1.5} % width of a box
\def\x{#1/100*\w} % median value
\def\xl{#2/100*\w} % lower confidance interval
\def\xu{#3/100*\w} % upper confidance interval
\filldraw[fill=gray!#1!white!, draw=black] (0,0) rectangle (\x,0.2); % draw rectangle (black border)
\draw [gray] (0,0) rectangle (\w,0.2); % fill with the grey
\draw (\x,0.1) -- (\xu,0.1) -- (\xu,0.15) -- (\xu,0.05); % draw upper confidance interval
\draw (\x,0.1) -- (\xl,0.1) -- (\xl,0.15) -- (\xl,0.05); % draw confidance interval
\end{tikzpicture}
}
\newcommand{\boxNumberConf}[3]
{\drawBox{#1}{#2}{#3} & #1 (#2--#3)} % NOTICE the & for column separation
\begin{document}
\begin{tabular}{p{1.5cm} r lr lr lr}
\toprule
Feature set&[\%]& \multicolumn{2}{c}{NaiveBayes} & \multicolumn{2}{c}{SVM} & \multicolumn{2}{c}{C4.5 Tree}\\
\midrule
\multirow{4}{1.5cm}{HRV-based}
&SE & \boxNumberConf{53}{47}{63} & \boxNumberConf{53}{44}{60} & \boxNumberConf{47}{40}{60}\\
&SP & \boxNumberConf{74}{71}{77} & \boxNumberConf{76}{72}{79} & \boxNumberConf{75}{70}{79}\\
&PR & \boxNumberConf{21}{18}{24} & \boxNumberConf{21}{18}{24} & \boxNumberConf{19}{16}{23}\\
&F & \boxNumberConf{30}{27}{34} & \boxNumberConf{29}{25}{34} & \boxNumberConf{28}{23}{32}\\
\bottomrule
\end{tabular}
\end{document}