- "p_nn_exo = computeForecast(data, indices_ch, \"Neighbors\", \"Neighbors\",\n",
- "\thorizon=3, simtype=\"exo\")\n",
- "p_nn_mix = computeForecast(data, indices_ch, \"Neighbors\", \"Neighbors\",\n",
- "\thorizon=3, simtype=\"mix\")\n",
- "p_az = computeForecast(data, indices_ch, \"Average\", \"Zero\",\n",
- "\thorizon=3)\n",
- "p_pz = computeForecast(data, indices_ch, \"Persistence\", \"Zero\",\n",
- "\thorizon=3, same_day=TRUE)"
+ "reload(\"../pkg\")\n",
+ "p1 = computeForecast(data, indices_ch, \"Neighbors\", \"Zero\", horizon=H, simtype=\"exo\")\n",
+ "p2 = computeForecast(data, indices_ch, \"Neighbors\", \"Zero\", horizon=H, simtype=\"endo\")\n",
+ "p3 = computeForecast(data, indices_ch, \"Neighbors\", \"Zero\", horizon=H, simtype=\"mix\")\n",
+ "p4 = computeForecast(data, indices_ch, \"Neighbors2\", \"Zero\", horizon=H, simtype=\"exo\")\n",
+ "p5 = computeForecast(data, indices_ch, \"Neighbors2\", \"Zero\", horizon=H, simtype=\"endo\")\n",
+ "p6 = computeForecast(data, indices_ch, \"Neighbors2\", \"Zero\", horizon=H, simtype=\"mix\")\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "e1 = computeError(data, p1, H)\n",
+ "e2 = computeError(data, p2, H)\n",
+ "e3 = computeError(data, p3, H)\n",
+ "e4 = computeError(data, p4, H)\n",
+ "e5 = computeError(data, p5, H)\n",
+ "e6 = computeError(data, p6, H)\n",
+ "plotError(list(e1,e2,e3,e4,e5,e6), cols=c(1,2,colors()[258], 4,5,6))"