TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to build a table like this:

enter image description here

I have tried a code but it doesn't work properly:

\caption{The temporal outlier detection accuracy of hourly mean values with respect to the Mos in 2007-09-30}
Node ID   & \multicolumn{2}{c|}{Density-based} & \multicolumn{2}{c|}{Mahalanobis distance-based}    & \multicolumn{2}{c|}{Running average-based} \\ 
    & DR\%  &  FPR\%     & DR\%  &  FPR\%      & DR\%  &  FPR\% \\ \hline
25   & 100    & 14            & 100    & 14           & 66   & 20      \\ \hline

share|improve this question

closed as too localized by doncherry, Werner, Guido, T. Verron, Stefan Kottwitz Feb 1 '13 at 7:04

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

You got too many `\\`. – Yiannis Lazarides Jan 25 '13 at 1:05
@YiannisLazarides, I have tried the code by omitting the two first "\\" of each row. Still it doesn't appear properly. – ali amidi Jan 25 '13 at 1:16
Please post a minimal with only one line of data with corrections. – Yiannis Lazarides Jan 25 '13 at 1:17
@YiannisLazarides The question is updated. – ali amidi Jan 25 '13 at 1:20
@HarishKumar It is updated, but there is problem with first row. – ali amidi Jan 25 '13 at 1:25

You had too many mistakes with \\, \cline and \hline try this:

Node ID   & \multicolumn{2}{c|}{Density-based} & \multicolumn{2}{c|}{Mahalanobis distance-based}    & \multicolumn{2}{c|}{Running average-based} \\ 
     & DR\%   &  FPR\%      & DR\%   &  FPR\%     & DR\%   &  FPR\% \\ \hline 
25   & 100    & 71          & 100    & 71         & 100    & 60      \\ \hline

Also it is always easier to post a full MWe including documentclass etc, as I did.

share|improve this answer
The line below the running average and Mahalanobis-distance and Density-based is missed. – ali amidi Jan 25 '13 at 1:42
Prints fine on my computer. Try adding some more data and getting a bit more familiar with tables. – Yiannis Lazarides Jan 25 '13 at 1:52
I have updated the question, and new problem. – ali amidi Jan 25 '13 at 2:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.