Skip to content

Commit

Permalink
[Issue #51] Fix a typo in the autotune.Proxy conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
wq2012 committed Aug 24, 2023
1 parent 53c730e commit 0293aab
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ spectralcluster.egg-info/*
.DS_Store
.pytype
coverage.xml
.venv
4 changes: 2 additions & 2 deletions docs/spectralcluster.html
Original file line number Diff line number Diff line change
Expand Up @@ -3300,7 +3300,7 @@ <h5>Inherited Members</h5>
</span><span id="SpectralClusterer-281"><a href="#SpectralClusterer-281"><span class="linenos">281</span></a> <span class="n">affinity</span><span class="p">,</span> <span class="n">constraint_matrix</span><span class="p">)</span>
</span><span id="SpectralClusterer-282"><a href="#SpectralClusterer-282"><span class="linenos">282</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileSqrtOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer-283"><a href="#SpectralClusterer-283"><span class="linenos">283</span></a> <span class="n">ratio</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">p_percentile</span><span class="p">)</span> <span class="o">/</span> <span class="n">max_delta_norm</span>
</span><span id="SpectralClusterer-284"><a href="#SpectralClusterer-284"><span class="linenos">284</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileSqrtOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer-284"><a href="#SpectralClusterer-284"><span class="linenos">284</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer-285"><a href="#SpectralClusterer-285"><span class="linenos">285</span></a> <span class="n">ratio</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">p_percentile</span><span class="p">)</span> <span class="o">/</span> <span class="n">max_delta_norm</span>
</span><span id="SpectralClusterer-286"><a href="#SpectralClusterer-286"><span class="linenos">286</span></a> <span class="k">else</span><span class="p">:</span>
</span><span id="SpectralClusterer-287"><a href="#SpectralClusterer-287"><span class="linenos">287</span></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Unsupported value of AutoTuneProxy&quot;</span><span class="p">)</span>
Expand Down Expand Up @@ -3708,7 +3708,7 @@ <h5>Inherited Members</h5>
</span><span id="SpectralClusterer.predict-281"><a href="#SpectralClusterer.predict-281"><span class="linenos">281</span></a> <span class="n">affinity</span><span class="p">,</span> <span class="n">constraint_matrix</span><span class="p">)</span>
</span><span id="SpectralClusterer.predict-282"><a href="#SpectralClusterer.predict-282"><span class="linenos">282</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileSqrtOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer.predict-283"><a href="#SpectralClusterer.predict-283"><span class="linenos">283</span></a> <span class="n">ratio</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">p_percentile</span><span class="p">)</span> <span class="o">/</span> <span class="n">max_delta_norm</span>
</span><span id="SpectralClusterer.predict-284"><a href="#SpectralClusterer.predict-284"><span class="linenos">284</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileSqrtOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer.predict-284"><a href="#SpectralClusterer.predict-284"><span class="linenos">284</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer.predict-285"><a href="#SpectralClusterer.predict-285"><span class="linenos">285</span></a> <span class="n">ratio</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">p_percentile</span><span class="p">)</span> <span class="o">/</span> <span class="n">max_delta_norm</span>
</span><span id="SpectralClusterer.predict-286"><a href="#SpectralClusterer.predict-286"><span class="linenos">286</span></a> <span class="k">else</span><span class="p">:</span>
</span><span id="SpectralClusterer.predict-287"><a href="#SpectralClusterer.predict-287"><span class="linenos">287</span></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Unsupported value of AutoTuneProxy&quot;</span><span class="p">)</span>
Expand Down
4 changes: 2 additions & 2 deletions docs/spectralcluster/configs.html
Original file line number Diff line number Diff line change
Expand Up @@ -1758,7 +1758,7 @@ <h5>Inherited Members</h5>
</span><span id="SpectralClusterer-281"><a href="#SpectralClusterer-281"><span class="linenos">281</span></a> <span class="n">affinity</span><span class="p">,</span> <span class="n">constraint_matrix</span><span class="p">)</span>
</span><span id="SpectralClusterer-282"><a href="#SpectralClusterer-282"><span class="linenos">282</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileSqrtOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer-283"><a href="#SpectralClusterer-283"><span class="linenos">283</span></a> <span class="n">ratio</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">p_percentile</span><span class="p">)</span> <span class="o">/</span> <span class="n">max_delta_norm</span>
</span><span id="SpectralClusterer-284"><a href="#SpectralClusterer-284"><span class="linenos">284</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileSqrtOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer-284"><a href="#SpectralClusterer-284"><span class="linenos">284</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer-285"><a href="#SpectralClusterer-285"><span class="linenos">285</span></a> <span class="n">ratio</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">p_percentile</span><span class="p">)</span> <span class="o">/</span> <span class="n">max_delta_norm</span>
</span><span id="SpectralClusterer-286"><a href="#SpectralClusterer-286"><span class="linenos">286</span></a> <span class="k">else</span><span class="p">:</span>
</span><span id="SpectralClusterer-287"><a href="#SpectralClusterer-287"><span class="linenos">287</span></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Unsupported value of AutoTuneProxy&quot;</span><span class="p">)</span>
Expand Down Expand Up @@ -2166,7 +2166,7 @@ <h5>Inherited Members</h5>
</span><span id="SpectralClusterer.predict-281"><a href="#SpectralClusterer.predict-281"><span class="linenos">281</span></a> <span class="n">affinity</span><span class="p">,</span> <span class="n">constraint_matrix</span><span class="p">)</span>
</span><span id="SpectralClusterer.predict-282"><a href="#SpectralClusterer.predict-282"><span class="linenos">282</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileSqrtOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer.predict-283"><a href="#SpectralClusterer.predict-283"><span class="linenos">283</span></a> <span class="n">ratio</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">p_percentile</span><span class="p">)</span> <span class="o">/</span> <span class="n">max_delta_norm</span>
</span><span id="SpectralClusterer.predict-284"><a href="#SpectralClusterer.predict-284"><span class="linenos">284</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileSqrtOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer.predict-284"><a href="#SpectralClusterer.predict-284"><span class="linenos">284</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer.predict-285"><a href="#SpectralClusterer.predict-285"><span class="linenos">285</span></a> <span class="n">ratio</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">p_percentile</span><span class="p">)</span> <span class="o">/</span> <span class="n">max_delta_norm</span>
</span><span id="SpectralClusterer.predict-286"><a href="#SpectralClusterer.predict-286"><span class="linenos">286</span></a> <span class="k">else</span><span class="p">:</span>
</span><span id="SpectralClusterer.predict-287"><a href="#SpectralClusterer.predict-287"><span class="linenos">287</span></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Unsupported value of AutoTuneProxy&quot;</span><span class="p">)</span>
Expand Down
6 changes: 3 additions & 3 deletions docs/spectralcluster/spectral_clusterer.html
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ <h1 class="modulename">
</span><span id="L-280"><a href="#L-280"><span class="linenos">280</span></a> <span class="n">affinity</span><span class="p">,</span> <span class="n">constraint_matrix</span><span class="p">)</span>
</span><span id="L-281"><a href="#L-281"><span class="linenos">281</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileSqrtOverNME</span><span class="p">:</span>
</span><span id="L-282"><a href="#L-282"><span class="linenos">282</span></a> <span class="n">ratio</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">p_percentile</span><span class="p">)</span> <span class="o">/</span> <span class="n">max_delta_norm</span>
</span><span id="L-283"><a href="#L-283"><span class="linenos">283</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileSqrtOverNME</span><span class="p">:</span>
</span><span id="L-283"><a href="#L-283"><span class="linenos">283</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileOverNME</span><span class="p">:</span>
</span><span id="L-284"><a href="#L-284"><span class="linenos">284</span></a> <span class="n">ratio</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">p_percentile</span><span class="p">)</span> <span class="o">/</span> <span class="n">max_delta_norm</span>
</span><span id="L-285"><a href="#L-285"><span class="linenos">285</span></a> <span class="k">else</span><span class="p">:</span>
</span><span id="L-286"><a href="#L-286"><span class="linenos">286</span></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Unsupported value of AutoTuneProxy&quot;</span><span class="p">)</span>
Expand Down Expand Up @@ -2172,7 +2172,7 @@ <h5>Inherited Members</h5>
</span><span id="SpectralClusterer-281"><a href="#SpectralClusterer-281"><span class="linenos">281</span></a> <span class="n">affinity</span><span class="p">,</span> <span class="n">constraint_matrix</span><span class="p">)</span>
</span><span id="SpectralClusterer-282"><a href="#SpectralClusterer-282"><span class="linenos">282</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileSqrtOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer-283"><a href="#SpectralClusterer-283"><span class="linenos">283</span></a> <span class="n">ratio</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">p_percentile</span><span class="p">)</span> <span class="o">/</span> <span class="n">max_delta_norm</span>
</span><span id="SpectralClusterer-284"><a href="#SpectralClusterer-284"><span class="linenos">284</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileSqrtOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer-284"><a href="#SpectralClusterer-284"><span class="linenos">284</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer-285"><a href="#SpectralClusterer-285"><span class="linenos">285</span></a> <span class="n">ratio</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">p_percentile</span><span class="p">)</span> <span class="o">/</span> <span class="n">max_delta_norm</span>
</span><span id="SpectralClusterer-286"><a href="#SpectralClusterer-286"><span class="linenos">286</span></a> <span class="k">else</span><span class="p">:</span>
</span><span id="SpectralClusterer-287"><a href="#SpectralClusterer-287"><span class="linenos">287</span></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Unsupported value of AutoTuneProxy&quot;</span><span class="p">)</span>
Expand Down Expand Up @@ -2580,7 +2580,7 @@ <h5>Inherited Members</h5>
</span><span id="SpectralClusterer.predict-281"><a href="#SpectralClusterer.predict-281"><span class="linenos">281</span></a> <span class="n">affinity</span><span class="p">,</span> <span class="n">constraint_matrix</span><span class="p">)</span>
</span><span id="SpectralClusterer.predict-282"><a href="#SpectralClusterer.predict-282"><span class="linenos">282</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileSqrtOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer.predict-283"><a href="#SpectralClusterer.predict-283"><span class="linenos">283</span></a> <span class="n">ratio</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">p_percentile</span><span class="p">)</span> <span class="o">/</span> <span class="n">max_delta_norm</span>
</span><span id="SpectralClusterer.predict-284"><a href="#SpectralClusterer.predict-284"><span class="linenos">284</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileSqrtOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer.predict-284"><a href="#SpectralClusterer.predict-284"><span class="linenos">284</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">autotune</span><span class="o">.</span><span class="n">proxy</span> <span class="o">==</span> <span class="n">AutoTuneProxy</span><span class="o">.</span><span class="n">PercentileOverNME</span><span class="p">:</span>
</span><span id="SpectralClusterer.predict-285"><a href="#SpectralClusterer.predict-285"><span class="linenos">285</span></a> <span class="n">ratio</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">p_percentile</span><span class="p">)</span> <span class="o">/</span> <span class="n">max_delta_norm</span>
</span><span id="SpectralClusterer.predict-286"><a href="#SpectralClusterer.predict-286"><span class="linenos">286</span></a> <span class="k">else</span><span class="p">:</span>
</span><span id="SpectralClusterer.predict-287"><a href="#SpectralClusterer.predict-287"><span class="linenos">287</span></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Unsupported value of AutoTuneProxy&quot;</span><span class="p">)</span>
Expand Down
Loading

0 comments on commit 0293aab

Please sign in to comment.