%\documentclass{sig-alternate}
\documentclass{svjour3}                     % onecolumn (standard format)
\usepackage{times}
\usepackage{cite}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{multirow}
\usepackage{rotating}
\usepackage{subfigure}


%\usepackage[none]{hyphenat} 
\newenvironment{smallitem}
 {\setlength{\topsep}{0pt}
  \setlength{\partopsep}{0pt}
  \setlength{\parskip}{0pt}
  \begin{itemize}
  \setlength{\leftmargin}{.2in}
  \setlength{\parsep}{0pt}
  \setlength{\parskip}{0pt}
  \setlength{\itemsep}{0pt}}
 {\end{itemize}}

\newenvironment{smallenum}
 {\setlength{\topsep}{0pt}
  \setlength{\partopsep}{0pt}
  \setlength{\parskip}{0pt}
  \begin{enumerate}
  \setlength{\leftmargin}{.2in}
   \setlength{\parsep}{0pt}
  \setlength{\parskip}{0pt}
  \setlength{\itemsep}{0pt}}
 {\end{enumerate}}


\usepackage[table]{xcolor}
\usepackage{url,graphicx}
\newcommand{\G}{\cellcolor[rgb]{0.8,0.8,0.8}}
\newcommand{\fig}[1]{Figure~\ref{fig:#1}}
\newcommand{\eq}[1]{Equation~\ref{eq:#1}}
\newcommand{\hyp}[1]{Hypothesis~\ref{hyp:#1}}
\newcommand{\tion}[1]{\S\ref{sec:#1}}

\newcommand{\bi}{\begin{smallitem}}
\newcommand{\ei}{\end{smallitem}}
\newcommand{\be}{\begin{smallenum}}
\newcommand{\ee}{\end{smallenum}}
\newcommand{\bd}{\begin{description}}
\newcommand{\ed}{\end{description}}


\begin{document}

\title{Cross-Company and Within-Company Features for Software Effort Estimation}
\subtitle{Analysis of features to define cross-company projects}

\maketitle

\begin{figure}
\small
\begin{tabular}{l | l | l | r}
\textbf{Dataset} & \textbf{Criterion} & \textbf{Subsets} & \textbf{Subsets Size}\\[1ex]\hline\hline
cocomo81 & project type & cocomo81e &	28  \\
  & & cocomo81o   & 	24  \\
  & & cocomo81s   & 	11	  \\\hline
  nasa93 & development center & nasa93\_center\_1   & 	12  \\
  & & nasa93\_center\_2   & 	37  \\
  & & nasa93\_center\_5   & 	39  \\\hline	
  desharnais & language type & desharnaisL1   & 	46  \\
  & & desharnaisL2   & 	25  \\
  & & desharnaisL3   & 	10  \\\hline
%finnish & application area $\star$ & finnishAppArea2 & 5 \\
% &  & finnishAppArea7 & 7 \\
% &  & finnishAppArea10 & 7 \\\hline
finnish & application type & finnishAppType1 & 17 \\
 &  & finnishAppType2345 & 18 \\\hline
kemerer & hardware & kemererHardware1 & 7 \\
 &  & kemererHardware23456 & 8 \\\hline
maxwell & application type & maxwellAppType1 & 10 \\
 &  & maxwellAppType2 & 29 \\
 &  & maxwellAppType3 & 18 \\\hline
maxwell & hardware & maxwellHardware2 & 37 \\
 &  & maxwellHardware3 & 16 \\
 &  & maxwellHardware5 & 7 \\\hline
maxwell & source & maxwellSource1 & 8 \\
 &  & maxwellSource2 & 54 \\
\end{tabular}\caption{Selected datasets, their division criterion and the size of the subsets.}
\label{fig:cc-selection}
\end{figure}


\begin{figure}
\begin{sideways}
\small
\begin{tabular}{l | l l l | l l | l l l | l l | l l l | l l | l l l | l l }
\textbf{Dataset} & \multicolumn{5}{c |}{\textbf{MAR}} & \multicolumn{5}{c |}{\textbf{MMRE}} & \multicolumn{5}{c |}{\textbf{MdMRE}} & \multicolumn{5}{c}{\textbf{Pred(30)}}  \\\hline
        & \textbf{W} & \textbf{T} & \textbf{L}  & \textbf{WC}  & \textbf{CC} & \textbf{W} & \textbf{T} & \textbf{L}  & \textbf{WC}  & \textbf{CC} & \textbf{W} & \textbf{T} & \textbf{L}  & \textbf{WC}  & \textbf{CC} & \textbf{W} & \textbf{T} & \textbf{L}  & \textbf{WC}  & \textbf{CC} \\
\input{winTieLossFileAll}
\end{tabular}
\end{sideways}
\caption{Comparison of performance between cross-company and within-company datasets w.r.t. 4 different performance measures (MAR, MMRE, MdMRE, Pred(30)). \textbf{\textit{W, T, L}} statistics are for within-company and the gray colored rows are those in which within-company data wins more than half the time. Under the columns of \textbf{\textit{WC}}, \textbf{\textit{CC}}, the actual performance values associated with within and cross-company datasets -respectively- are given.}
\label{fig:cc-selection}
\end{figure}

\begin{figure}
\scriptsize
\begin{tabular}{l | l | l | l | l }
\textbf{Test Set} & \textbf{Prediction Zone} & \textbf{From S1} & \textbf{From S2}& \textbf{From S3} \\[1ex]\hline\hline
\input{resultsFile}
\end{tabular}
\caption{The amount of instances selected from within and cross company datasets. In parenthesis the percentage of selected instances out of the actual within company dataset is given. The diagonal entries that are highlighted with gray are the within company selection amounts and percentages.}
\label{fig:cc-selection}
\end{figure}

%\begin{figure}
%\includegraphics[width=0.75\textwidth]{lib/teakWCCCPercentages.pdf}
%\caption{Sorted percentages of cross-company and within-company.}
%\label{fig:percentage-percentile}
%\end{figure}
%
%\begin{figure}
%\includegraphics[width=0.5\textwidth]{lib/teakWCCCPercentiles.pdf}
%\caption{The percentiles of sorted percentages of instances from within and cross company datasets.}
%\label{fig:percentage-percentile}
%\end{figure}

\begin{figure}[th!]
  \centering                
  \subfigure[Percentages]{\label{fig:teak-percentage}\includegraphics[width=0.6\textwidth]{lib/teakWCCCPercentages.pdf}}
  \subfigure[Percentiles]{\label{fig:teak-percentile}\includegraphics[width=0.38\textwidth]{lib/teakWCCCPercentiles.pdf}}
  \caption{Percentages and percentiles of instances selected by TEAK from WC and CC datasets.}
  \label{fig:teak}
\end{figure}\clearpage


%\begin{figure}
%\scriptsize
%\begin{tabular}{l | l | l | l | l }
%\textbf{Test Set} & \textbf{Prediction Zone} & \textbf{From S1} & \textbf{From S2}& \textbf{From S3} \\[1ex]\hline\hline
%\input{resultsFileKNN}
% \hline 
%\end{tabular}
%\caption{The amount of instances selected from within and cross company datasets for ABE0 with k=2,4,best. In parenthesis the percentage of selected instances out of the actual within company dataset is given.}
%\label{fig:cc-selection}
%\end{figure}

%\begin{figure}
%\scriptsize
%\begin{tabular}{l | l | l | l | l }
%\textbf{Test Set} & \textbf{Prediction Zone} & \textbf{From S1} & \textbf{From S2}& \textbf{From S3} \\[1ex]\hline\hline
%\input{resultsFileKNNLog}
% \hline 
%\end{tabular}
%\caption{The amount of instances selected from within and cross company datasets for log+ABE0 with k=2,4,best. In parenthesis the percentage of selected instances out of the actual within company dataset is given.}
%\label{fig:cc-selection}
%\end{figure}

\begin{figure}[th!]
  \centering                
  \subfigure[Percentages]{\label{fig:2k-percentage}\includegraphics[width=0.6\textwidth]{lib/2kWCCCPercentages.pdf}}
  \subfigure[Percentiles]{\label{fig:2k-percentile}\includegraphics[width=0.38\textwidth]{lib/2kWCCCPercentiles.pdf}}
  \caption{Percentages and percentiles of instances selected by ABE0 from WC and CC datasets for \textit{k=2}.}
  \label{fig:2k}
\end{figure}

\begin{figure}[th!]
  \centering                
  \subfigure[Percentages]{\label{fig:4k-percentage}\includegraphics[width=0.6\textwidth]{lib/4kWCCCPercentages.pdf}}
  \subfigure[Percentiles]{\label{fig:4k-percentile}\includegraphics[width=0.38\textwidth]{lib/4kWCCCPercentiles.pdf}}
  \caption{Percentages and percentiles of instances selected by ABE0 from WC and CC datasets for \textit{k=4}.}
  \label{fig:4k}
\end{figure}

\begin{figure}[th!]
  \centering                
  \subfigure[Percentages]{\label{fig:bestk-percentage}\includegraphics[width=0.6\textwidth]{lib/bestkWCCCPercentages.pdf}}
  \subfigure[Percentiles]{\label{fig:bestk-percentile}\includegraphics[width=0.38\textwidth]{lib/bestkWCCCPercentiles.pdf}}
  \caption{Percentages and percentiles of instances selected by ABE0 from WC and CC datasets for \textit{k=best}.}
  \label{fig:bestk}
\end{figure} \clearpage

\begin{figure}[th!]
  \centering                
  \subfigure[Percentages]{\label{fig:log2k-percentage}\includegraphics[width=0.6\textwidth]{lib/log2kWCCCPercentages.pdf}}
  \subfigure[Percentiles]{\label{fig:log2k-percentile}\includegraphics[width=0.38\textwidth]{lib/log2kWCCCPercentiles.pdf}}
  \caption{Percentages and percentiles of instances selected by log+ABE0 from WC and CC datasets for \textit{k=2}.}
  \label{fig:log2k}
\end{figure}

\begin{figure}[th!]
  \centering                
  \subfigure[Percentages]{\label{fig:log4k-percentage}\includegraphics[width=0.6\textwidth]{lib/log4kWCCCPercentages.pdf}}
  \subfigure[Percentiles]{\label{fig:log4k-percentile}\includegraphics[width=0.38\textwidth]{lib/log4kWCCCPercentiles.pdf}}
  \caption{Percentages and percentiles of instances selected by log+ABE0 from WC and CC datasets for \textit{k=4}.}
  \label{fig:log4k}
\end{figure}

\begin{figure}[th!]
  \centering                
  \subfigure[Percentages]{\label{fig:logbestk-percentage}\includegraphics[width=0.6\textwidth]{lib/logbestkWCCCPercentages.pdf}}
  \subfigure[Percentiles]{\label{fig:logbestk-percentile}\includegraphics[width=0.38\textwidth]{lib/logbestkWCCCPercentiles.pdf}}
  \caption{Percentages and percentiles of instances selected by log+ABE0 from WC and CC datasets for \textit{k=best}.}
  \label{fig:logbestk}
\end{figure}


\begin{figure}
\scriptsize
\begin{tabular}{l | l l l | l l l | l l l | l l l }
\textbf{Dataset} & \multicolumn{3}{c |}{\textbf{MAR}} & \multicolumn{3}{c |}{\textbf{MMRE}} & \multicolumn{3}{c |}{\textbf{MdMRE}} & \multicolumn{3}{c}{\textbf{Pred(30)}}  \\\hline\hline
        & \textbf{\textit{k}=2} & \textbf{\textit{k}=4} & \textbf{\textit{k}=best}  & \textbf{\textit{k}=2} & \textbf{\textit{k}=4} & \textbf{\textit{k}=best} & \textbf{\textit{k}=2} & \textbf{\textit{k}=4} & \textbf{\textit{k}=best} & \textbf{\textit{k}=2} & \textbf{\textit{k}=4} & \textbf{\textit{k}=best} \\\hline
\input{winTieLossKNN}
\end{tabular}
\caption{Performance comparison between cross-company and within-company datasets w.r.t. 4 different performance measures (MAR, MMRE, MdMRE, Pred(30)) under different \textit{``log+ABE0''} methods. Note that in this setting a \textit{``log''} pre-processor was applied to the datasets prior to estimation with ABE0. Each cell in this table can have three values: \textit{``+'', ``-'' and ``o''.}. A \textit{``+''} sign indicates that WC performance won more 10 of the 20 runs, whereas a \textit{``-''} sign tells that WC lost more than 10 runs. If none of these conditions occur, i.e. WC and CC performances tie, then a ``o'' sign is assigned to the cell. For convenience \textit{``+''} signs are highlighted (see how few they are).}
\label{fig:cc-wc-performance-knn}
\end{figure}

\begin{figure}
\scriptsize
\begin{tabular}{l | l l l | l l l | l l l | l l l }
\textbf{Dataset} & \multicolumn{3}{c |}{\textbf{MAR}} & \multicolumn{3}{c |}{\textbf{MMRE}} & \multicolumn{3}{c |}{\textbf{MdMRE}} & \multicolumn{3}{c}{\textbf{Pred(30)}}  \\\hline\hline
        & \textbf{\textit{k}=2} & \textbf{\textit{k}=4} & \textbf{\textit{k}=best}  & \textbf{\textit{k}=2} & \textbf{\textit{k}=4} & \textbf{\textit{k}=best} & \textbf{\textit{k}=2} & \textbf{\textit{k}=4} & \textbf{\textit{k}=best} & \textbf{\textit{k}=2} & \textbf{\textit{k}=4} & \textbf{\textit{k}=best} \\\hline
\input{winTieLossKNNLog}
\end{tabular}
\caption{Performance comparison between cross-company and within-company datasets w.r.t. 4 different performance measures (MAR, MMRE, MdMRE, Pred(30)) under different \textit{``log+ABE0''} methods. Note that in this setting a \textit{``log''} pre-processor was applied to the datasets prior to estimation with ABE0. Each cell in this table can have three values: \textit{``+'', ``-'' and ``o''.}. A \textit{``+''} sign indicates that WC performance won more 10 of the 20 runs, whereas a \textit{``-''} sign tells that WC lost more than 10 runs. If none of these conditions occur, i.e. WC and CC performances tie, then a ``o'' sign is assigned to the cell. For convenience \textit{``+''} signs are highlighted (see how few they are).}
\label{fig:cc-wc-performance-knn-log}
\end{figure}

%\bibliographystyle{abbrv}
%\bibliography{references} 
\end{document}

