Skip to content

Commit

Permalink
v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gagolews committed Sep 17, 2022
1 parent f215b33 commit d371c3d
Show file tree
Hide file tree
Showing 43 changed files with 123 additions and 116 deletions.
4 changes: 1 addition & 3 deletions .devel/sphinx/news.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# What Is New in *genieclust*


## 1.1.1.9001 (under development)
## 1.1.2 (2022-09-17)

* [Python and R] `adjusted_asymmetric_accuracy`
now accepts confusion matrices with fewer columns than rows.
Expand All @@ -10,8 +10,6 @@
* [Python and R] `pair_sets_index`, and `normalized_accuracy` return
the same results for nonsymmetric confusion matrices and transposes thereof.

* ...


## 1.1.1 (2022-09-15)

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ jobs:
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=devel,build,docs,.git,R,dist,genieclust.egg-info,man,tutorials
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=.devel,build,docs,.git,R,dist,genieclust.egg-info,man,tutorials
# exit-zero treats all errors as warnings
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=devel,build,docs,.git,R,dist,genieclust.egg-info,man,tutorials
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=.devel,build,docs,.git,R,dist,genieclust.egg-info,man,tutorials
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: genieclust
Type: Package
Title: Fast and Robust Hierarchical Clustering with Noise Points Detection
Version: 1.1.1.9001
Version: 1.1.2
Date: 2022-09-17
Authors@R: c(
person("Marek", "Gagolewski",
Expand Down
4 changes: 1 addition & 3 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# What Is New in *genieclust*


## 1.1.1.9001 (under development)
## 1.1.2 (2022-09-17)

* [Python and R] `adjusted_asymmetric_accuracy`
now accepts confusion matrices with fewer columns than rows.
Expand All @@ -10,8 +10,6 @@
* [Python and R] `pair_sets_index`, and `normalized_accuracy` return
the same results for nonsymmetric confusion matrices and transposes thereof.

* ...


## 1.1.1 (2022-09-15)

Expand Down
2 changes: 1 addition & 1 deletion docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '1.1.1',
VERSION: '1.1.2',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
4 changes: 2 additions & 2 deletions docs/genieclust.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</a>

<div class="version">
Python and R Package<br /> v1.1.1
Python and R Package<br /> v1.1.2
</div>

<!--
Expand Down Expand Up @@ -303,7 +303,7 @@ <h1>Python Package <cite>genieclust</cite> Reference<a class="headerlink" href="
and a customised <a href="https://github.com/rtfd/sphinx_rtd_theme">rtd</a>
theme.
<span class="lastupdated">
Last updated on 2022-09-15T13:23:22+1000.
Last updated on 2022-09-17T17:13:14+1000.
</span>


Expand Down
4 changes: 2 additions & 2 deletions docs/genieclust_cluster_validity.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</a>

<div class="version">
Python and R Package<br /> v1.1.1
Python and R Package<br /> v1.1.2
</div>

<!--
Expand Down Expand Up @@ -901,7 +901,7 @@
and a customised <a href="https://github.com/rtfd/sphinx_rtd_theme">rtd</a>
theme.
<span class="lastupdated">
Last updated on 2022-09-15T13:23:22+1000.
Last updated on 2022-09-17T17:13:14+1000.
</span>


Expand Down
26 changes: 13 additions & 13 deletions docs/genieclust_compare_partitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</a>

<div class="version">
Python and R Package<br /> v1.1.1
Python and R Package<br /> v1.1.2
</div>

<!--
Expand Down Expand Up @@ -283,13 +283,14 @@
</div>
<p class="rubric">Notes</p>
<p>Let <span class="math notranslate nohighlight">\(C\)</span> be a confusion matrix with <span class="math notranslate nohighlight">\(K\)</span> rows
and <span class="math notranslate nohighlight">\(K\)</span> columns.
and <span class="math notranslate nohighlight">\(L\)</span> columns.
AAA is an external cluster validity measure.
It is a corrected-for-chance summary of the proportion of correctly
classified points in each cluster (with cluster matching based on the
solution to the maximal linear sum assignment problem; see
<a class="reference internal" href="#genieclust.compare_partitions.normalize_confusion_matrix" title="genieclust.compare_partitions.normalize_confusion_matrix"><code class="xref py py-func docutils literal notranslate"><span class="pre">normalize_confusion_matrix()</span></code></a>), given by:
<span class="math notranslate nohighlight">\((\max_\sigma \sum_{i=1}^K (c_{i, \sigma(i)}/(c_{i, 1}+...+c_{i, K})) - 1)/(K - 1)\)</span>.</p>
<span class="math notranslate nohighlight">\((\max_\sigma \sum_{i=1}^K (c_{i, \sigma(i)}/(c_{i, 1}+...+c_{i, K})) - 1)/(K - 1)\)</span>.
Missing columns are treated as if they were filled with 0s.</p>
<p>Note that this measure is not symmetric, i.e., <code class="docutils literal notranslate"><span class="pre">index(x,</span> <span class="pre">y)</span></code> does not
have to be equal to <code class="docutils literal notranslate"><span class="pre">index(y,</span> <span class="pre">x)</span></code>.</p>
<p>See <a class="reference internal" href="#r4f44c4f81b3c-1" id="id2">[1]</a> for more details and <a class="reference internal" href="#genieclust.compare_partitions.compare_partitions" title="genieclust.compare_partitions.compare_partitions"><code class="xref py py-func docutils literal notranslate"><span class="pre">compare_partitions()</span></code></a> for more functions.</p>
Expand Down Expand Up @@ -407,7 +408,7 @@
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>C</strong><span class="classifier">ndarray</span></dt><dd><p>A <code class="docutils literal notranslate"><span class="pre">c_contiguous</span></code> confusion matrix (contingency table)
with <span class="math notranslate nohighlight">\(K\)</span> rows and <span class="math notranslate nohighlight">\(L\)</span> columns, where <span class="math notranslate nohighlight">\(K \le L\)</span>.</p>
with <span class="math notranslate nohighlight">\(K\)</span> rows and <span class="math notranslate nohighlight">\(L\)</span> columns.</p>
</dd>
</dl>
</dd>
Expand Down Expand Up @@ -435,7 +436,7 @@
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">'spsi'</span></code></dt><dd><p>Simplified pair sets index</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">'aaa'</span></code></dt><dd><p>Adjusted asymmetric accuracy (or <code class="docutils literal notranslate"><span class="pre">nan</span></code> if <span class="math notranslate nohighlight">\(K \neq L\)</span>);
<dt><code class="docutils literal notranslate"><span class="pre">'aaa'</span></code></dt><dd><p>Adjusted asymmetric accuracy;
it is assumed that rows in <cite>C</cite> represent the ground-truth
partition</p>
</dd>
Expand Down Expand Up @@ -471,8 +472,8 @@
nonempty and pairwise disjoint subsets.
For instance, these can be two clusterings of a dataset with <span class="math notranslate nohighlight">\(n\)</span>
observations specified as vectors of labels. Moreover, let <cite>C</cite> be the
confusion matrix (with <span class="math notranslate nohighlight">\(K\)</span> rows and <span class="math notranslate nohighlight">\(L\)</span> columns,
<span class="math notranslate nohighlight">\(K \leq L\)</span>) corresponding to <cite>x</cite> and <cite>y</cite>; see also
confusion matrix with <span class="math notranslate nohighlight">\(K\)</span> rows and <span class="math notranslate nohighlight">\(L\)</span> columns,
corresponding to <cite>x</cite> and <cite>y</cite>; see also
<a class="reference internal" href="#genieclust.compare_partitions.confusion_matrix" title="genieclust.compare_partitions.confusion_matrix"><code class="xref py py-func docutils literal notranslate"><span class="pre">confusion_matrix()</span></code></a>.</p>
<p>This function implements a few scores that aim to quantify
the similarity between <cite>x</cite> and <cite>y</cite>.</p>
Expand All @@ -487,8 +488,7 @@
Note that partitions are always defined up to a bijection of the set of
possible labels, e.g., (1, 1, 2, 1) and (4, 4, 2, 4)
represent the same 2-partition.</p>
<p><cite>adjusted_asymmetric_accuracy</cite> <a class="reference internal" href="#rb28289ab3e3a-2" id="id5">[2]</a>
only accepts <span class="math notranslate nohighlight">\(K = L\)</span>. It is an external cluster validity measure
<p><cite>adjusted_asymmetric_accuracy</cite> <a class="reference internal" href="#rb28289ab3e3a-2" id="id5">[2]</a> is an external cluster validity measure
which assumes that the label vector <cite>x</cite> (or rows in the confusion
matrix) represents the reference (ground truth) partition.
It is a corrected-for-chance summary of the proportion of correctly
Expand All @@ -498,15 +498,15 @@
<span class="math notranslate nohighlight">\((\max_\sigma \sum_{i=1}^K (c_{i, \sigma(i)}/(c_{i, 1}+...+c_{i, K})) - 1)/(K - 1)\)</span>,
where <span class="math notranslate nohighlight">\(C\)</span> is the confusion matrix.</p>
<p><cite>normalized_accuracy</cite> is a measure defined as
<span class="math notranslate nohighlight">\((\mathrm{Accuracy}(C_\sigma)-1/L)/(1-1/L)\)</span>,
<span class="math notranslate nohighlight">\((\mathrm{Accuracy}(C_\sigma)-1/\max(K,L))/(1-1/\max(K,L))\)</span>,
where <span class="math notranslate nohighlight">\(C_\sigma\)</span> is a version of the confusion matrix
for given <cite>x</cite> and <cite>y</cite>, <span class="math notranslate nohighlight">\(K \leq L\)</span>, with columns permuted
for given <cite>x</cite> and <cite>y</cite> with columns permuted
based on the solution to the maximal linear sum assignment problem.
Note that the <span class="math notranslate nohighlight">\(\mathrm{Accuracy}(C_\sigma)\)</span> part
is sometimes referred to as set-matching classification
rate or pivoted accuracy.</p>
<p><cite>pair_sets_index</cite> gives the Pair Sets Index (PSI)
adjusted for chance <a class="reference internal" href="#rb28289ab3e3a-3" id="id6">[3]</a>, <span class="math notranslate nohighlight">\(K \leq L\)</span>.
adjusted for chance <a class="reference internal" href="#rb28289ab3e3a-3" id="id6">[3]</a>.
Pairing is based on the solution to the linear sum assignment problem
of a transformed version of the confusion matrix.
Its simplified version assumes E=1 in the definition of the index,
Expand Down Expand Up @@ -1026,7 +1026,7 @@
and a customised <a href="https://github.com/rtfd/sphinx_rtd_theme">rtd</a>
theme.
<span class="lastupdated">
Last updated on 2022-09-15T13:23:22+1000.
Last updated on 2022-09-17T17:13:14+1000.
</span>


Expand Down
4 changes: 2 additions & 2 deletions docs/genieclust_genie.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</a>

<div class="version">
Python and R Package<br /> v1.1.1
Python and R Package<br /> v1.1.2
</div>

<!--
Expand Down Expand Up @@ -651,7 +651,7 @@ <h1>genieclust.Genie<a class="headerlink" href="#genieclust-genie" title="Permal
and a customised <a href="https://github.com/rtfd/sphinx_rtd_theme">rtd</a>
theme.
<span class="lastupdated">
Last updated on 2022-09-15T13:23:22+1000.
Last updated on 2022-09-17T17:13:14+1000.
</span>


Expand Down
4 changes: 2 additions & 2 deletions docs/genieclust_inequity.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</a>

<div class="version">
Python and R Package<br /> v1.1.1
Python and R Package<br /> v1.1.2
</div>

<!--
Expand Down Expand Up @@ -486,7 +486,7 @@
and a customised <a href="https://github.com/rtfd/sphinx_rtd_theme">rtd</a>
theme.
<span class="lastupdated">
Last updated on 2022-09-15T13:23:22+1000.
Last updated on 2022-09-17T17:13:14+1000.
</span>


Expand Down
4 changes: 2 additions & 2 deletions docs/genieclust_internal.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</a>

<div class="version">
Python and R Package<br /> v1.1.1
Python and R Package<br /> v1.1.2
</div>

<!--
Expand Down Expand Up @@ -580,7 +580,7 @@
and a customised <a href="https://github.com/rtfd/sphinx_rtd_theme">rtd</a>
theme.
<span class="lastupdated">
Last updated on 2022-09-15T13:23:22+1000.
Last updated on 2022-09-17T17:13:14+1000.
</span>


Expand Down
Binary file modified docs/genieclust_plots-1.pdf
Binary file not shown.
Binary file modified docs/genieclust_plots-2.pdf
Binary file not shown.
Binary file modified docs/genieclust_plots-3.pdf
Binary file not shown.
Binary file modified docs/genieclust_plots-4.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/genieclust_plots.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</a>

<div class="version">
Python and R Package<br /> v1.1.1
Python and R Package<br /> v1.1.2
</div>

<!--
Expand Down Expand Up @@ -397,7 +397,7 @@
and a customised <a href="https://github.com/rtfd/sphinx_rtd_theme">rtd</a>
theme.
<span class="lastupdated">
Last updated on 2022-09-15T13:23:22+1000.
Last updated on 2022-09-17T17:13:14+1000.
</span>


Expand Down
4 changes: 2 additions & 2 deletions docs/genieclust_tools.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</a>

<div class="version">
Python and R Package<br /> v1.1.1
Python and R Package<br /> v1.1.2
</div>

<!--
Expand Down Expand Up @@ -424,7 +424,7 @@
and a customised <a href="https://github.com/rtfd/sphinx_rtd_theme">rtd</a>
theme.
<span class="lastupdated">
Last updated on 2022-09-15T13:23:22+1000.
Last updated on 2022-09-17T17:13:14+1000.
</span>


Expand Down
4 changes: 2 additions & 2 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</a>

<div class="version">
Python and R Package<br /> v1.1.1
Python and R Package<br /> v1.1.2
</div>

<!--
Expand Down Expand Up @@ -539,7 +539,7 @@ <h2 id="W">W</h2>
and a customised <a href="https://github.com/rtfd/sphinx_rtd_theme">rtd</a>
theme.
<span class="lastupdated">
Last updated on 2022-09-15T13:23:22+1000.
Last updated on 2022-09-17T17:13:14+1000.
</span>


Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
</a>

<div class="version">
Python and R Package<br /> v1.1.1
Python and R Package<br /> v1.1.2
</div>

<!--
Expand Down Expand Up @@ -440,7 +440,7 @@ <h2>Contributing<a class="headerlink" href="#contributing" title="Permalink to t
and a customised <a href="https://github.com/rtfd/sphinx_rtd_theme">rtd</a>
theme.
<span class="lastupdated">
Last updated on 2022-09-15T13:23:22+1000.
Last updated on 2022-09-17T17:13:14+1000.
</span>


Expand Down
Loading

0 comments on commit d371c3d

Please sign in to comment.