Skip to content

Commit

Permalink
rename aaa->nca; use 'furo' sphinx theme; update vignettes (nmslib de…
Browse files Browse the repository at this point in the history
…funct)
  • Loading branch information
gagolews committed Sep 19, 2023
1 parent 1d5d595 commit 38b0610
Show file tree
Hide file tree
Showing 182 changed files with 15,591 additions and 34,856 deletions.
16 changes: 8 additions & 8 deletions .devel/pytest/test_compare_partitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,24 @@ def test_compare_partitions():
x = np.random.permutation(np.r_[np.arange(k), np.random.choice(np.arange(k), n-k)])
y = np.random.permutation(np.r_[np.arange(k), np.random.choice(np.arange(k), n-k)])
compare_with_sklearn(x, y)
assert -1e-9<normalized_accuracy(x, y)<1.0+1e-9
assert -1e-9<adjusted_asymmetric_accuracy(x, y)<1.0+1e-9
assert -1e-9<normalized_pivoted_accuracy(x, y)<1.0+1e-9
assert -1e-9<normalized_clustering_accuracy(x, y)<1.0+1e-9
assert -1e-9<pair_sets_index(x, y)<1.0+1e-9
assert -1e-9<pair_sets_index(x, y, True)<1.0+1e-9

y = x.copy()
y[:5] = 1
compare_with_sklearn(x, y)
assert -1e-9<normalized_accuracy(x, y)<1.0+1e-9
assert -1e-9<adjusted_asymmetric_accuracy(x, y)<1.0+1e-9
assert -1e-9<normalized_pivoted_accuracy(x, y)<1.0+1e-9
assert -1e-9<normalized_clustering_accuracy(x, y)<1.0+1e-9
assert -1e-9<pair_sets_index(x, y)<1.0+1e-9
assert -1e-9<pair_sets_index(x, y, True)<1.0+1e-9

y = x.copy()
y[::2] = 1
compare_with_sklearn(x, y)
assert -1e-9<normalized_accuracy(x, y)<1.0+1e-9
assert -1e-9<adjusted_asymmetric_accuracy(x, y)<1.0+1e-9
assert -1e-9<normalized_pivoted_accuracy(x, y)<1.0+1e-9
assert -1e-9<normalized_clustering_accuracy(x, y)<1.0+1e-9
assert -1e-9<pair_sets_index(x, y)<1.0+1e-9
assert -1e-9<pair_sets_index(x, y, True)<1.0+1e-9

Expand All @@ -73,8 +73,8 @@ def test_compare_partitions():
assert mi_score(x, y)>-1e-9
assert 1.0+1e-9>normalized_mi_score(x, y)>1.0-1e-9
assert 1.0+1e-9>adjusted_mi_score(x, y)>1.0-1e-9
assert 1.0+1e-9>normalized_accuracy(x, y)>1.0-1e-9
assert 1.0+1e-9>adjusted_asymmetric_accuracy(x, y)>1.0-1e-9
assert 1.0+1e-9>normalized_pivoted_accuracy(x, y)>1.0-1e-9
assert 1.0+1e-9>normalized_clustering_accuracy(x, y)>1.0-1e-9
assert 1.0+1e-9>pair_sets_index(x, y)>1.0-1e-9
assert 1.0+1e-9>pair_sets_index(x, y, True)>1.0-1e-9

Expand Down
155 changes: 69 additions & 86 deletions .devel/sphinx/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* --------------------------------------------------------------------------
Copyleft (C) 2021-2022, Marek Gagolewski <https://www.gagolewski.com>
Copyleft (C) 2021-2023, Marek Gagolewski <https://www.gagolewski.com/>
-------------------------------------------------------------------------- */

@import url("fonts/Alegreya-fontspec.css");
Expand All @@ -20,64 +20,91 @@ footer p {
}


ol.arabic li {
padding-bottom: 8pt;
.mobile-header, .mobile-header.scrolled {
box-shadow: none;
border-bottom: 4px solid var(--color-header-border);
}

/* -------------------------------------------------------------------------- */

figcaption .caption-number {
font-weight: 600;
font-style: normal;
font-size: 90%;
}

.proof-type-exercise {
clear: both;
background: #F0F0F0;
padding: 12px;
line-height: 18px;
font-size: 14px;
margin-bottom: 24px;
box-sizing: border-box;
figcaption .caption-number::after {
content: "  ";
}

figcaption, .caption-text {
text-align: left;
font-style: italic;
font-size: 90%;
}

.proof-type-exercise {
font-size: 100%;
figure img {
margin: auto;
max-width: 100%;
width: 570px;
}

.proof-type-exercise .proof-title {
background: #AAAAAA;
font-weight: 700;
display: block;
color: #fff;
padding: 6px 12px;
margin: -12px -12px 12px;
.rst-content div.figure, .rst-content figure {
text-align: center;
}

.proof-content {
font-style: italic;
padding: 0;
.rst-content div.figure p.caption, .rst-content figure figcaption {
text-align: left;
}

.proof-content p {
margin: 0;
/* -------------------------------------------------------------------------- */


.proof-type-exercise, .proof-type-example {
background: var(--color-admonition-background);
border-radius: .2rem;
box-shadow: 0 .2rem .5rem rgba(0,0,0,.05),0 0 .0625rem rgba(0,0,0,.1);
font-size: var(--admonition-font-size);
margin: 1rem auto;
overflow: hidden;
padding: 0 .5rem .5rem;
page-break-inside: avoid;
border-left: .2rem solid var(--color-admonition-title);
border-left-color: var(--color-admonition-title--admonition-todo);
}


.proof-type-exercise > .proof-title::before, .proof-type-example > .proof-title::before {
background-color: var(--color-admonition-title--admonition-todo);
-webkit-mask-image: var(--icon-pencil);
mask-image: var(--icon-pencil);
mask-repeat: no-repeat;
content: "";
height: 1rem;
left: .5rem;
position: absolute;
width: 1rem;
}


.proof-type-exercise .proof-title, .proof-type-example .proof-title {
font-size: var(--admonition-title-font-size);
font-weight: 700;
line-height: 1.3;
margin: 0 -.5rem .5rem;
padding: .4rem .5rem .4rem 2rem;
position: relative;
background-color: var(--color-admonition-title-background--admonition-todo);
}

.proof-type-example {
clear: both;
background: #EFE1CE;
padding: 12px;
line-height: 24px;
margin-bottom: 24px;
box-sizing: border-box;
.proof-type-exercise .proof-content {
font-style: italic;
}

.proof-type-example .proof-title {
background: #615550;
p.admonition-title {
font-weight: 700;
display: block;
color: #fff;
padding: 6px 12px;
margin: -12px -12px 12px;
}


/* -------------------------------------------------------------------------- */

table.docutils p {
Expand All @@ -90,11 +117,7 @@ table.docutils p {

/* -------------------------------------------------------------------------- */

.rst-content code.literal, .rst-content tt.literal {
color: inherit;
}

code.notranslate {
p code.notranslate, p code.literal, p tt.literal {
background: inherit;
color: inherit;
font-weight: inherit;
Expand All @@ -103,14 +126,14 @@ code.notranslate {
padding: 0;
}

strong.command, .rst-content code, .rst-content div[class^="highlight"] pre, .rst-content tt, .rst-content pre, pre, samp, kbd, code {
strong.command, strong.program, .rst-content code, .rst-content div[class^="highlight"] pre, .rst-content tt, .rst-content pre, pre, samp, kbd, code {
font-family: Ubuntu Mono,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;
/* font-size: 90%; */
/* font-style: normal; */
}

.rst-content div[class^="highlight"] pre, .rst-content pre, pre {
font-size: 90%;
/* font-size: 90%; */
/* font-style: normal; */
}

Expand All @@ -120,46 +143,6 @@ strong.command, .rst-content code, .rst-content div[class^="highlight"] pre, .rs

/* -------------------------------------------------------------------------- */

/* red theme */

.wy-menu-vertical p.caption {
color: #ff6767;
}

.wy-side-nav-search, .wy-nav-top {
background-color: #751b15;
background-image: linear-gradient(#582a22, #751b15);
}

.wy-side-nav-search div.version {
color: #c36e6e;
}

.wy-side-nav-search input[type="text"] {
border: 0px solid #751b15;
}

/* -------------------------------------------------------------------------- */

.wy-nav-top {
line-height: 20px;
padding-top: 12px;
}

.wy-nav-top i {
padding-top: 0;
}

/* -------------------------------------------------------------------------- */

.rst-content div.figure, .rst-content figure {
text-align: center;
}

.rst-content div.figure p.caption, .rst-content figure figcaption {
text-align: left;
}

img.img-left-align-always {
float: left;
margin-right: 16px;
Expand Down
98 changes: 0 additions & 98 deletions .devel/sphinx/_templates/breadcrumbs.html

This file was deleted.

Loading

0 comments on commit 38b0610

Please sign in to comment.