Skip to content

Commit

Permalink
Merge pull request #52 from outbrain/more-tests
Browse files Browse the repository at this point in the history
Docs alignment + version bump
  • Loading branch information
SkBlaz authored Oct 16, 2023
2 parents 4bd8ca0 + 6752adf commit c3ab440
Show file tree
Hide file tree
Showing 7 changed files with 1,894 additions and 1,833 deletions.
318 changes: 160 additions & 158 deletions docs/outrank/algorithms/feature_ranking/ranking_mi_numba.html

Large diffs are not rendered by default.

717 changes: 383 additions & 334 deletions docs/outrank/algorithms/importance_estimator.html

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions docs/outrank/core_ranking.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ <h1 class="modulename">
</span><span id="L-72"><a href="#L-72"><span class="linenos"> 72</span></a>
</span><span id="L-73"><a href="#L-73"><span class="linenos"> 73</span></a> <span class="c1"># Handle cont. types prior to interaction evaluation</span>
</span><span id="L-74"><a href="#L-74"><span class="linenos"> 74</span></a> <span class="n">pbar</span><span class="o">.</span><span class="n">set_description</span><span class="p">(</span><span class="s1">&#39;Encoding columns&#39;</span><span class="p">)</span>
</span><span id="L-75"><a href="#L-75"><span class="linenos"> 75</span></a> <span class="n">col_dots</span> <span class="o">=</span> <span class="s1">&#39;.&#39;</span>
</span><span id="L-76"><a href="#L-76"><span class="linenos"> 76</span></a> <span class="n">start_enc_timer</span> <span class="o">=</span> <span class="n">timer</span><span class="p">()</span>
</span><span id="L-77"><a href="#L-77"><span class="linenos"> 77</span></a> <span class="n">tmp_df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="n">k</span> <span class="p">:</span> <span class="n">tmp_df</span><span class="p">[</span><span class="n">k</span><span class="p">]</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">codes</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">all_columns</span><span class="p">})</span>
</span><span id="L-75"><a href="#L-75"><span class="linenos"> 75</span></a> <span class="n">start_enc_timer</span> <span class="o">=</span> <span class="n">timer</span><span class="p">()</span>
</span><span id="L-76"><a href="#L-76"><span class="linenos"> 76</span></a> <span class="n">tmp_df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="n">k</span> <span class="p">:</span> <span class="n">tmp_df</span><span class="p">[</span><span class="n">k</span><span class="p">]</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">codes</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">all_columns</span><span class="p">})</span>
</span><span id="L-77"><a href="#L-77"><span class="linenos"> 77</span></a>
</span><span id="L-78"><a href="#L-78"><span class="linenos"> 78</span></a> <span class="n">end_enc_timer</span> <span class="o">=</span> <span class="n">timer</span><span class="p">()</span>
</span><span id="L-79"><a href="#L-79"><span class="linenos"> 79</span></a> <span class="n">out_time_struct</span><span class="p">[</span><span class="s1">&#39;encoding_columns&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">end_enc_timer</span> <span class="o">-</span> <span class="n">start_enc_timer</span>
</span><span id="L-80"><a href="#L-80"><span class="linenos"> 80</span></a>
Expand Down Expand Up @@ -610,7 +610,7 @@ <h1 class="modulename">
</span><span id="L-488"><a href="#L-488"><span class="linenos">488</span></a>
</span><span id="L-489"><a href="#L-489"><span class="linenos">489</span></a> <span class="n">focus_set</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">label_column</span><span class="p">)</span>
</span><span id="L-490"><a href="#L-490"><span class="linenos">490</span></a> <span class="n">focus_set</span> <span class="o">=</span> <span class="p">{</span><span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">focus_set</span> <span class="k">if</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">input_dataframe</span><span class="o">.</span><span class="n">columns</span><span class="p">}</span>
</span><span id="L-491"><a href="#L-491"><span class="linenos">491</span></a> <span class="n">input_dataframe</span> <span class="o">=</span> <span class="n">input_dataframe</span><span class="p">[</span><span class="n">focus_set</span><span class="p">]</span>
</span><span id="L-491"><a href="#L-491"><span class="linenos">491</span></a> <span class="n">input_dataframe</span> <span class="o">=</span> <span class="n">input_dataframe</span><span class="p">[</span><span class="nb">list</span><span class="p">(</span><span class="n">focus_set</span><span class="p">)]</span>
</span><span id="L-492"><a href="#L-492"><span class="linenos">492</span></a>
</span><span id="L-493"><a href="#L-493"><span class="linenos">493</span></a> <span class="k">if</span> <span class="n">args</span><span class="o">.</span><span class="n">transformers</span> <span class="o">!=</span> <span class="s1">&#39;none&#39;</span><span class="p">:</span>
</span><span id="L-494"><a href="#L-494"><span class="linenos">494</span></a> <span class="n">pbar</span><span class="o">.</span><span class="n">set_description</span><span class="p">(</span><span class="s1">&#39;Adding transformations&#39;</span><span class="p">)</span>
Expand Down Expand Up @@ -986,9 +986,9 @@ <h1 class="modulename">
</span><span id="mixed_rank_graph-73"><a href="#mixed_rank_graph-73"><span class="linenos"> 73</span></a>
</span><span id="mixed_rank_graph-74"><a href="#mixed_rank_graph-74"><span class="linenos"> 74</span></a> <span class="c1"># Handle cont. types prior to interaction evaluation</span>
</span><span id="mixed_rank_graph-75"><a href="#mixed_rank_graph-75"><span class="linenos"> 75</span></a> <span class="n">pbar</span><span class="o">.</span><span class="n">set_description</span><span class="p">(</span><span class="s1">&#39;Encoding columns&#39;</span><span class="p">)</span>
</span><span id="mixed_rank_graph-76"><a href="#mixed_rank_graph-76"><span class="linenos"> 76</span></a> <span class="n">col_dots</span> <span class="o">=</span> <span class="s1">&#39;.&#39;</span>
</span><span id="mixed_rank_graph-77"><a href="#mixed_rank_graph-77"><span class="linenos"> 77</span></a> <span class="n">start_enc_timer</span> <span class="o">=</span> <span class="n">timer</span><span class="p">()</span>
</span><span id="mixed_rank_graph-78"><a href="#mixed_rank_graph-78"><span class="linenos"> 78</span></a> <span class="n">tmp_df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="n">k</span> <span class="p">:</span> <span class="n">tmp_df</span><span class="p">[</span><span class="n">k</span><span class="p">]</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">codes</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">all_columns</span><span class="p">})</span>
</span><span id="mixed_rank_graph-76"><a href="#mixed_rank_graph-76"><span class="linenos"> 76</span></a> <span class="n">start_enc_timer</span> <span class="o">=</span> <span class="n">timer</span><span class="p">()</span>
</span><span id="mixed_rank_graph-77"><a href="#mixed_rank_graph-77"><span class="linenos"> 77</span></a> <span class="n">tmp_df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">({</span><span class="n">k</span> <span class="p">:</span> <span class="n">tmp_df</span><span class="p">[</span><span class="n">k</span><span class="p">]</span><span class="o">.</span><span class="n">cat</span><span class="o">.</span><span class="n">codes</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">all_columns</span><span class="p">})</span>
</span><span id="mixed_rank_graph-78"><a href="#mixed_rank_graph-78"><span class="linenos"> 78</span></a>
</span><span id="mixed_rank_graph-79"><a href="#mixed_rank_graph-79"><span class="linenos"> 79</span></a> <span class="n">end_enc_timer</span> <span class="o">=</span> <span class="n">timer</span><span class="p">()</span>
</span><span id="mixed_rank_graph-80"><a href="#mixed_rank_graph-80"><span class="linenos"> 80</span></a> <span class="n">out_time_struct</span><span class="p">[</span><span class="s1">&#39;encoding_columns&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">end_enc_timer</span> <span class="o">-</span> <span class="n">start_enc_timer</span>
</span><span id="mixed_rank_graph-81"><a href="#mixed_rank_graph-81"><span class="linenos"> 81</span></a>
Expand Down Expand Up @@ -1589,7 +1589,7 @@ <h1 class="modulename">
</span><span id="compute_batch_ranking-489"><a href="#compute_batch_ranking-489"><span class="linenos">489</span></a>
</span><span id="compute_batch_ranking-490"><a href="#compute_batch_ranking-490"><span class="linenos">490</span></a> <span class="n">focus_set</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">label_column</span><span class="p">)</span>
</span><span id="compute_batch_ranking-491"><a href="#compute_batch_ranking-491"><span class="linenos">491</span></a> <span class="n">focus_set</span> <span class="o">=</span> <span class="p">{</span><span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">focus_set</span> <span class="k">if</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">input_dataframe</span><span class="o">.</span><span class="n">columns</span><span class="p">}</span>
</span><span id="compute_batch_ranking-492"><a href="#compute_batch_ranking-492"><span class="linenos">492</span></a> <span class="n">input_dataframe</span> <span class="o">=</span> <span class="n">input_dataframe</span><span class="p">[</span><span class="n">focus_set</span><span class="p">]</span>
</span><span id="compute_batch_ranking-492"><a href="#compute_batch_ranking-492"><span class="linenos">492</span></a> <span class="n">input_dataframe</span> <span class="o">=</span> <span class="n">input_dataframe</span><span class="p">[</span><span class="nb">list</span><span class="p">(</span><span class="n">focus_set</span><span class="p">)]</span>
</span><span id="compute_batch_ranking-493"><a href="#compute_batch_ranking-493"><span class="linenos">493</span></a>
</span><span id="compute_batch_ranking-494"><a href="#compute_batch_ranking-494"><span class="linenos">494</span></a> <span class="k">if</span> <span class="n">args</span><span class="o">.</span><span class="n">transformers</span> <span class="o">!=</span> <span class="s1">&#39;none&#39;</span><span class="p">:</span>
</span><span id="compute_batch_ranking-495"><a href="#compute_batch_ranking-495"><span class="linenos">495</span></a> <span class="n">pbar</span><span class="o">.</span><span class="n">set_description</span><span class="p">(</span><span class="s1">&#39;Adding transformations&#39;</span><span class="p">)</span>
Expand Down
Loading

0 comments on commit c3ab440

Please sign in to comment.