\documentclass[12pt]{article} \usepackage{geometry} \geometry{ a4paper, total={210mm,297mm}, left=10mm, right=10mm, top=15mm, bottom=15mm, } \setlength{\parindent}{0pt} \usepackage[utf8]{inputenc} \usepackage[french]{babel} \usepackage{helvet} \renewcommand{\familydefault}{\sfdefault} \usepackage{amsmath,amsfonts,amssymb} \usepackage{float} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{xcolor} \usepackage{cprotect} %\setcounter{section}{9} \begin{document} <>= opts_chunk$set(fig.path="figs/", fig.align="center", fig.show="hold", echo=FALSE) options(replace.assign=TRUE,width=90) @ <>= library(aggexp) station = "STATIONNAME" experts = aggexp:::expertsArray[EXPERTSINDICES] K = length(experts) @ \cprotect\section{\verb|STATIONNAME| - Résumé des données} \vspace*{-0.5cm} <>= mock_r = list(data = getData(experts, station), experts=experts, stations=station) plotCurves(mock_r) @ \vspace*{-0.8cm} \cprotect\section{\verb|STATIONNAME| - Performances en prédiction} \vspace*{-0.5cm} <>= r_ml = runAlgorithm("ml", experts=experts, stations=station, alpha=0.2, H=183, grad=TRUE) r_rr = runAlgorithm("rr", experts=experts, stations=station, H=183) r_be = r_ml be = which.max(getBestExpert(r_ml)) r_be$data[,"Prediction"] = r_be$data[,experts[be]] @ <>= plotCloud(r_be, 30, c(30,50,80), main=paste("Nuage Meilleur Expert (",experts[be],")",sep="")) plotCloud(r_ml, 30, c(30,50,80), main="Nuage ML") plotCloud(r_rr, 30, c(30,50,80), main="Nuage RR") @ \vspace*{-0.8cm} \cprotect\section{\verb|STATIONNAME| - Indicateurs d'alertes} \vspace*{-0.5cm} <>= indicators = matrix(nrow=5, ncol=4+K) indicators[,1] = as.numeric(getIndicators(r_ml, thresh=30)) indicators[,2] = as.numeric(getIndicators(r_rr, thresh=30)) for (i in 1:K) { r_be$data[,"Prediction"] = r_be$data[,experts[i]] indicators[,i+2] = as.numeric(getIndicators(r_be, thresh=30)) } indicators = as.data.frame(indicators, row.names=c("TS","FA","MA","RMSE","EV")) names(indicators) = c("ML","RR", experts) @ <>= library(xtable) splitIndex = ifelse(length(experts) < 10, 7, 8) xtable(indicators[,1:splitIndex], caption="Indicateurs d'alertes ; partie 1") xtable(indicators[,(splitIndex+1):(2+K)], caption="Indicateurs d'alertes ; partie 2") @ \end{document}