Skip to content

Commit

Permalink
update notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommos0 committed Dec 13, 2019
1 parent 3f7736e commit 1cd6c43
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
5 changes: 4 additions & 1 deletion ecmeb.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@
"\n",
"train_set_path = Path(\"data/TADPOLE_D1_D2.csv\")\n",
"test_set_path = Path(\"data/tadpole_test_set.csv\")\n",
"\n",
"train_df = pd.read_csv(train_set_path)\n",
"\n",
"test_set_df = pd.read_csv(test_set_path)\n",
"test_set_df = test_set_df.fillna(0)\n",
"\n",
"model = ECMEB(confidence_intervals=False)\n",
"model.train(train_set_path)\n",
"model.train(train_df)\n",
"\n",
"forecast_df = model.predict(test_set_df)"
]
Expand Down
5 changes: 4 additions & 1 deletion save_load.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@
"\n",
"train_set_path = Path(\"data/TADPOLE_D1_D2.csv\")\n",
"test_set_path = Path(\"data/tadpole_test_set.csv\")\n",
"\n",
"train_df = pd.read_csv(train_set_path)\n",
"\n",
"test_set_df = pd.read_csv(test_set_path)\n",
"test_set_df = test_set_df.fillna(0)\n",
"\n",
"model = ECMEB(confidence_intervals=False)\n",
"model.train(train_set_path)"
"model.train(train_df)"
]
},
{
Expand Down
17 changes: 13 additions & 4 deletions simple_svm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/home/tom/miniconda3/envs/tadpole2/lib/python3.7/site-packages/IPython/core/interactiveshell.py:3242: DtypeWarning: Columns (471,473,474,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,569,570,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,599,601,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,624,625,626,627,628,629,630,631,632,633,634,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,745,746,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,770,771,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,794,795,797,798,799,800,801,802,803,804,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831) have mixed types. Specify dtype option on import or set low_memory=False.\n",
" if (await self.run_code(code, result, async_=asy)):\n"
"/home/tom/miniconda3/envs/tadpole2/lib/python3.7/site-packages/IPython/core/interactiveshell.py:3051: DtypeWarning: Columns (471,473,474,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,569,570,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,599,601,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,624,625,626,627,628,629,630,631,632,633,634,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,745,746,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,770,771,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,794,795,797,798,799,800,801,802,803,804,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831) have mixed types. Specify dtype option on import or set low_memory=False.\n",
" interactivity=interactivity, compiler=compiler, result=result)\n"
]
}
],
Expand All @@ -24,12 +24,14 @@
"\n",
"train_set_path = Path(\"data/d1d2_short.csv\")\n",
"test_set_path = Path(\"data/tadpole_test_set.csv\")\n",
"\n",
"train_df = pd.read_csv(train_set_path)\n",
"test_set_df = pd.read_csv(test_set_path)\n",
"\n",
"test_set_df = test_set_df.fillna(0)\n",
"\n",
"model = SimpleSVM()\n",
"model.train(train_set_path)\n",
"model.train(train_df)\n",
"\n",
"forecast_df = model.predict(test_set_df)"
]
Expand Down Expand Up @@ -65,7 +67,7 @@
{
"data": {
"text/plain": [
"(0.7979256193124368,\n",
"(0.7969210797944051,\n",
" 0.8814591288452484,\n",
" 9.185387415281433,\n",
" 9.376404873607639,\n",
Expand Down Expand Up @@ -153,6 +155,13 @@
"\n",
"evaluate_forecast(eval_set_df, forecast_df)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 1cd6c43

Please sign in to comment.