Skip to content

Commit

Permalink
deploy: c390239
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-ingwersen-ey committed Aug 12, 2024
1 parent 95c0989 commit c80864c
Show file tree
Hide file tree
Showing 37 changed files with 1,636 additions and 406 deletions.
Binary file modified .doctrees/api_reference/index.doctree
Binary file not shown.
Binary file modified .doctrees/api_reference/iowa_forecast/index.doctree
Binary file not shown.
Binary file modified .doctrees/api_reference/iowa_forecast/load_data.doctree
Binary file not shown.
Binary file modified .doctrees/api_reference/iowa_forecast/ml_train.doctree
Binary file not shown.
Binary file not shown.
Binary file modified .doctrees/api_reference/iowa_forecast/utils.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/iowa_forecast.doctree
Binary file not shown.
Binary file modified .doctrees/modules.doctree
Binary file not shown.
2 changes: 2 additions & 0 deletions _modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@
<li class="toctree-l3"><a class="reference internal" href="../api_reference/iowa_forecast/load_data.html">load_data</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api_reference/iowa_forecast/ml_eval.html">ml_eval</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api_reference/iowa_forecast/ml_train.html">ml_train</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api_reference/iowa_forecast/models_configs.html">models_configs</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api_reference/iowa_forecast/plots.html">plots</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api_reference/iowa_forecast/utils.html">utils</a></li>
</ul>
Expand Down Expand Up @@ -251,6 +252,7 @@ <h1>All modules for which code is available</h1>
<ul><li><a href="iowa_forecast/load_data.html">iowa_forecast.load_data</a></li>
<li><a href="iowa_forecast/ml_eval.html">iowa_forecast.ml_eval</a></li>
<li><a href="iowa_forecast/ml_train.html">iowa_forecast.ml_train</a></li>
<li><a href="iowa_forecast/models_configs.html">iowa_forecast.models_configs</a></li>
<li><a href="iowa_forecast/plots.html">iowa_forecast.plots</a></li>
<li><a href="iowa_forecast/utils.html">iowa_forecast.utils</a></li>
</ul>
Expand Down
69 changes: 20 additions & 49 deletions _modules/iowa_forecast/load_data.html

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions _modules/iowa_forecast/ml_eval.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@
<li class="toctree-l3"><a class="reference internal" href="../../api_reference/iowa_forecast/load_data.html">load_data</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../api_reference/iowa_forecast/ml_eval.html">ml_eval</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../api_reference/iowa_forecast/ml_train.html">ml_train</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../api_reference/iowa_forecast/models_configs.html">models_configs</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../api_reference/iowa_forecast/plots.html">plots</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../api_reference/iowa_forecast/utils.html">utils</a></li>
</ul>
Expand Down Expand Up @@ -306,7 +307,7 @@ <h1>Source code for iowa_forecast.ml_eval</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">iowa_forecast.utils</span> <span class="kn">import</span> <span class="n">normalize_item_name</span>


<div class="viewcode-block" id="evaluate_models"><a class="viewcode-back" href="../../iowa_forecast.html#iowa_forecast.ml_eval.evaluate_models">[docs]</a><span class="k">def</span> <span class="nf">evaluate_models</span><span class="p">(</span>
<div class="viewcode-block" id="evaluate_models"><a class="viewcode-back" href="../../api_reference/iowa_forecast/ml_eval.html#iowa_forecast.ml_eval.evaluate_models">[docs]</a><span class="k">def</span> <span class="nf">evaluate_models</span><span class="p">(</span>
<span class="n">client</span><span class="p">:</span> <span class="n">bigquery</span><span class="o">.</span><span class="n">Client</span><span class="p">,</span>
<span class="n">items_list</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">],</span>
<span class="n">end_date</span><span class="p">:</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
Expand Down Expand Up @@ -377,7 +378,7 @@ <h1>Source code for iowa_forecast.ml_eval</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">eval_df</span></div>


<div class="viewcode-block" id="get_data"><a class="viewcode-back" href="../../iowa_forecast.html#iowa_forecast.ml_eval.get_data">[docs]</a><span class="k">def</span> <span class="nf">get_data</span><span class="p">(</span><span class="n">client</span><span class="p">:</span> <span class="n">bigquery</span><span class="o">.</span><span class="n">Client</span><span class="p">,</span> <span class="n">query</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">:</span>
<div class="viewcode-block" id="get_data"><a class="viewcode-back" href="../../api_reference/iowa_forecast/ml_eval.html#iowa_forecast.ml_eval.get_data">[docs]</a><span class="k">def</span> <span class="nf">get_data</span><span class="p">(</span><span class="n">client</span><span class="p">:</span> <span class="n">bigquery</span><span class="o">.</span><span class="n">Client</span><span class="p">,</span> <span class="n">query</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Execute a BigQuery SQL query and return the result as a DataFrame.</span>

Expand All @@ -397,7 +398,7 @@ <h1>Source code for iowa_forecast.ml_eval</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">query_job</span><span class="o">.</span><span class="n">to_dataframe</span><span class="p">()</span></div>


<div class="viewcode-block" id="create_query"><a class="viewcode-back" href="../../iowa_forecast.html#iowa_forecast.ml_eval.create_query">[docs]</a><span class="k">def</span> <span class="nf">create_query</span><span class="p">(</span>
<div class="viewcode-block" id="create_query"><a class="viewcode-back" href="../../api_reference/iowa_forecast/ml_eval.html#iowa_forecast.ml_eval.create_query">[docs]</a><span class="k">def</span> <span class="nf">create_query</span><span class="p">(</span>
<span class="n">table</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="n">item_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="n">date_filter</span><span class="p">:</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
Expand Down Expand Up @@ -431,7 +432,7 @@ <h1>Source code for iowa_forecast.ml_eval</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">query</span></div>


<div class="viewcode-block" id="get_train_data"><a class="viewcode-back" href="../../iowa_forecast.html#iowa_forecast.ml_eval.get_train_data">[docs]</a><span class="k">def</span> <span class="nf">get_train_data</span><span class="p">(</span>
<div class="viewcode-block" id="get_train_data"><a class="viewcode-back" href="../../api_reference/iowa_forecast/ml_eval.html#iowa_forecast.ml_eval.get_train_data">[docs]</a><span class="k">def</span> <span class="nf">get_train_data</span><span class="p">(</span>
<span class="n">client</span><span class="p">:</span> <span class="n">bigquery</span><span class="o">.</span><span class="n">Client</span><span class="p">,</span>
<span class="n">item_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="n">table_name</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;bqmlforecast.training_data&quot;</span><span class="p">,</span>
Expand Down Expand Up @@ -468,7 +469,7 @@ <h1>Source code for iowa_forecast.ml_eval</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">get_data</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">query</span><span class="p">)</span></div>


<div class="viewcode-block" id="get_actual_data"><a class="viewcode-back" href="../../iowa_forecast.html#iowa_forecast.ml_eval.get_actual_data">[docs]</a><span class="k">def</span> <span class="nf">get_actual_data</span><span class="p">(</span>
<div class="viewcode-block" id="get_actual_data"><a class="viewcode-back" href="../../api_reference/iowa_forecast/ml_eval.html#iowa_forecast.ml_eval.get_actual_data">[docs]</a><span class="k">def</span> <span class="nf">get_actual_data</span><span class="p">(</span>
<span class="n">client</span><span class="p">:</span> <span class="n">bigquery</span><span class="o">.</span><span class="n">Client</span><span class="p">,</span>
<span class="n">item_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="n">end_date</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
Expand Down Expand Up @@ -503,7 +504,7 @@ <h1>Source code for iowa_forecast.ml_eval</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">get_data</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">query</span><span class="p">)</span><span class="o">.</span><span class="n">astype</span><span class="p">({</span><span class="s2">&quot;date&quot;</span><span class="p">:</span> <span class="nb">str</span><span class="p">})</span></div>


<div class="viewcode-block" id="get_predictions"><a class="viewcode-back" href="../../iowa_forecast.html#iowa_forecast.ml_eval.get_predictions">[docs]</a><span class="k">def</span> <span class="nf">get_predictions</span><span class="p">(</span>
<div class="viewcode-block" id="get_predictions"><a class="viewcode-back" href="../../api_reference/iowa_forecast/ml_eval.html#iowa_forecast.ml_eval.get_predictions">[docs]</a><span class="k">def</span> <span class="nf">get_predictions</span><span class="p">(</span>
<span class="n">client</span><span class="p">:</span> <span class="n">bigquery</span><span class="o">.</span><span class="n">Client</span><span class="p">,</span>
<span class="n">item_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="n">end_date</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
Expand Down Expand Up @@ -556,7 +557,7 @@ <h1>Source code for iowa_forecast.ml_eval</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">predictions_df</span></div>


<div class="viewcode-block" id="evaluate_predictions"><a class="viewcode-back" href="../../iowa_forecast.html#iowa_forecast.ml_eval.evaluate_predictions">[docs]</a><span class="k">def</span> <span class="nf">evaluate_predictions</span><span class="p">(</span>
<div class="viewcode-block" id="evaluate_predictions"><a class="viewcode-back" href="../../api_reference/iowa_forecast/ml_eval.html#iowa_forecast.ml_eval.evaluate_predictions">[docs]</a><span class="k">def</span> <span class="nf">evaluate_predictions</span><span class="p">(</span>
<span class="n">client</span><span class="p">:</span> <span class="n">bigquery</span><span class="o">.</span><span class="n">Client</span><span class="p">,</span>
<span class="n">item_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="n">end_date</span><span class="p">:</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
Expand Down Expand Up @@ -658,7 +659,7 @@ <h1>Source code for iowa_forecast.ml_eval</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">train_df</span><span class="p">,</span> <span class="n">forecast_df</span></div>


<div class="viewcode-block" id="multi_evaluate_predictions"><a class="viewcode-back" href="../../iowa_forecast.html#iowa_forecast.ml_eval.multi_evaluate_predictions">[docs]</a><span class="k">def</span> <span class="nf">multi_evaluate_predictions</span><span class="p">(</span>
<div class="viewcode-block" id="multi_evaluate_predictions"><a class="viewcode-back" href="../../api_reference/iowa_forecast/ml_eval.html#iowa_forecast.ml_eval.multi_evaluate_predictions">[docs]</a><span class="k">def</span> <span class="nf">multi_evaluate_predictions</span><span class="p">(</span>
<span class="n">client</span><span class="p">:</span> <span class="n">bigquery</span><span class="o">.</span><span class="n">Client</span><span class="p">,</span>
<span class="n">items_list</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">],</span>
<span class="n">end_date</span><span class="p">:</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
Expand Down Expand Up @@ -730,7 +731,7 @@ <h1>Source code for iowa_forecast.ml_eval</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">results_dict</span></div>


<div class="viewcode-block" id="explain_model"><a class="viewcode-back" href="../../iowa_forecast.html#iowa_forecast.ml_eval.explain_model">[docs]</a><span class="k">def</span> <span class="nf">explain_model</span><span class="p">(</span>
<div class="viewcode-block" id="explain_model"><a class="viewcode-back" href="../../api_reference/iowa_forecast/ml_eval.html#iowa_forecast.ml_eval.explain_model">[docs]</a><span class="k">def</span> <span class="nf">explain_model</span><span class="p">(</span>
<span class="n">client</span><span class="p">:</span> <span class="n">bigquery</span><span class="o">.</span><span class="n">Client</span><span class="p">,</span>
<span class="n">item_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="n">table_name</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;bqmlforecast.training_data&quot;</span><span class="p">,</span>
Expand Down
Loading

0 comments on commit c80864c

Please sign in to comment.