Skip to content

Commit 4b59be9

Browse files
committed
v1.1.4
1 parent da0b531 commit 4b59be9

27 files changed

+81
-79
lines changed

.devel/pytest/test_paths.py

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ def test_paths():
1919
assert "wut" in clustbench.get_battery_names("../clustering-data-v1/")
2020
assert "x1" in clustbench.get_dataset_names("wut", "../clustering-data-v1/")
2121

22+
assert len(clustbench.load_dataset("wut", "x2", "../clustering-data-v1/")["labels"]) == 2
23+
24+
assert len(clustbench.assertload_dataset("wut", "x2", url="https://github.com/gagolews/clustering-data-v1/raw/v1.1.0")["labels"]) == 2
25+
2226

2327
if __name__ == "__main__":
2428
test_paths()

.devel/sphinx/news.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## 1.1.3 (2023-12-11)
3+
## 1.1.4 (2023-12-12)
44

55
- [BUGFIX] #5: `load_dataset` threw an `OSError` while trying to load
66
a dataset.

NEWS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## 1.1.3 (2023-12-11)
3+
## 1.1.4 (2023-12-12)
44

55
- [BUGFIX] #5: `load_dataset` threw an `OSError` while trying to load
66
a dataset.

clustbench/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# ############################################################################ #
2222

2323
# version string, e.g., "1.0.0.9001" or "1.1.1"
24-
__version__ = "1.1.3"
24+
__version__ = "1.1.4"
2525

2626

2727
from .get_names import get_dataset_names, get_battery_names

clustbench/load_dataset.py

+10-12
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,16 @@ def load_dataset(
136136
labels = []
137137
i = 0
138138
while True:
139-
try:
140-
f = base_name + ".labels%d.gz" % i
141-
ll = np.loadtxt(f, dtype="int")
142-
if ll.ndim != 1 or ll.shape[0] != data.shape[0]:
143-
raise ValueError("Incorrect number of labels in '%s'." % f)
144-
145-
labels.append(ll)
146-
i += 1
147-
except OSError:
148-
# this could be done better with glob.glob for local files,
149-
# but not for remote URLs
150-
break
139+
f = base_name + ".labels%d.gz" % i
140+
if not np.DataSource().exists(f):
141+
break # stop trying to find more label vectors
142+
143+
ll = np.loadtxt(f, dtype="int")
144+
if ll.ndim != 1 or ll.shape[0] != data.shape[0]:
145+
raise ValueError("Incorrect number of labels in '%s'." % f)
146+
147+
labels.append(ll)
148+
i += 1
151149

152150
n_clusters = np.array([np.max(ll) for ll in labels])
153151

docs/_static/documentation_options.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const DOCUMENTATION_OPTIONS = {
2-
VERSION: '1.1.3',
2+
VERSION: '1.1.4',
33
LANGUAGE: 'en',
44
COLLAPSE_INDEX: false,
55
BUILDER: 'html',

docs/clustbench-documentation.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
<a class="sidebar-brand" href="index.html">Clustering Benchmarks</a>
169169
</span>
170170
<div class="sidebar-brand">
171-
1.1.3
171+
1.1.4
172172
</div>
173173
<form class="sidebar-search-container" method="get" action="search.html" role="search">
174174
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
@@ -843,7 +843,7 @@ <h1>Documentation<a class="headerlink" href="#documentation" title="Link to this
843843
Some rights reserved. Licensed under <a href='https://creativecommons.org/licenses/by-nc-nd/4.0/'>CC BY-NC-ND 4.0</a>.
844844
Built with <a href="https://sphinx-doc.org/">Sphinx</a>
845845
and a customised <a href="https://github.com/pradyunsg/furo">Furo</a> theme.
846-
Last updated on 2023-12-11T15:14:53+1100.
846+
Last updated on 2023-12-12T14:31:23+1100.
847847
This site will never display any ads: it is a non-profit project.
848848
It does not collect any data.
849849
</div>
@@ -896,7 +896,7 @@ <h1>Documentation<a class="headerlink" href="#documentation" title="Link to this
896896

897897
</aside>
898898
</div>
899-
</div><script src="_static/documentation_options.js?v=cb7bf70b"></script>
899+
</div><script src="_static/documentation_options.js?v=00f267c6"></script>
900900
<script src="_static/doctools.js?v=888ff710"></script>
901901
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
902902
<script src="_static/scripts/furo.js?v=32e29ea5"></script>

docs/genindex.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
<a class="sidebar-brand" href="index.html">Clustering Benchmarks</a>
167167
</span>
168168
<div class="sidebar-brand">
169-
1.1.3
169+
1.1.4
170170
</div>
171171
<form class="sidebar-search-container" method="get" action="search.html" role="search">
172172
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
@@ -398,7 +398,7 @@ <h2>T</h2>
398398
Some rights reserved. Licensed under <a href='https://creativecommons.org/licenses/by-nc-nd/4.0/'>CC BY-NC-ND 4.0</a>.
399399
Built with <a href="https://sphinx-doc.org/">Sphinx</a>
400400
and a customised <a href="https://github.com/pradyunsg/furo">Furo</a> theme.
401-
Last updated on 2023-12-11T15:14:53+1100.
401+
Last updated on 2023-12-12T14:31:23+1100.
402402
This site will never display any ads: it is a non-profit project.
403403
It does not collect any data.
404404
</div>
@@ -413,7 +413,7 @@ <h2>T</h2>
413413

414414
</aside>
415415
</div>
416-
</div><script src="_static/documentation_options.js?v=cb7bf70b"></script>
416+
</div><script src="_static/documentation_options.js?v=00f267c6"></script>
417417
<script src="_static/doctools.js?v=888ff710"></script>
418418
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
419419
<script src="_static/scripts/furo.js?v=32e29ea5"></script>

docs/index.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
<a class="sidebar-brand" href="#">Clustering Benchmarks</a>
169169
</span>
170170
<div class="sidebar-brand">
171-
1.1.3
171+
1.1.4
172172
</div>
173173
<form class="sidebar-search-container" method="get" action="search.html" role="search">
174174
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
@@ -381,7 +381,7 @@ <h1>A Framework for Benchmarking Clustering Algorithms<a class="headerlink" href
381381
Some rights reserved. Licensed under <a href='https://creativecommons.org/licenses/by-nc-nd/4.0/'>CC BY-NC-ND 4.0</a>.
382382
Built with <a href="https://sphinx-doc.org/">Sphinx</a>
383383
and a customised <a href="https://github.com/pradyunsg/furo">Furo</a> theme.
384-
Last updated on 2023-12-11T15:14:53+1100.
384+
Last updated on 2023-12-12T14:31:23+1100.
385385
This site will never display any ads: it is a non-profit project.
386386
It does not collect any data.
387387
</div>
@@ -414,7 +414,7 @@ <h1>A Framework for Benchmarking Clustering Algorithms<a class="headerlink" href
414414

415415
</aside>
416416
</div>
417-
</div><script src="_static/documentation_options.js?v=cb7bf70b"></script>
417+
</div><script src="_static/documentation_options.js?v=00f267c6"></script>
418418
<script src="_static/doctools.js?v=888ff710"></script>
419419
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
420420
<script src="_static/scripts/furo.js?v=32e29ea5"></script>

docs/news.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
<a class="sidebar-brand" href="index.html">Clustering Benchmarks</a>
169169
</span>
170170
<div class="sidebar-brand">
171-
1.1.3
171+
1.1.4
172172
</div>
173173
<form class="sidebar-search-container" method="get" action="search.html" role="search">
174174
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
@@ -257,7 +257,7 @@
257257
<section class="tex2jax_ignore mathjax_ignore" id="changelog">
258258
<h1>Changelog<a class="headerlink" href="#changelog" title="Link to this heading">#</a></h1>
259259
<section id="id1">
260-
<h2>1.1.3 (2023-12-11)<a class="headerlink" href="#id1" title="Link to this heading">#</a></h2>
260+
<h2>1.1.4 (2023-12-12)<a class="headerlink" href="#id1" title="Link to this heading">#</a></h2>
261261
<ul class="simple">
262262
<li><p>[BUGFIX] #5: <code class="docutils literal notranslate"><span class="pre">load_dataset</span></code> threw an <code class="docutils literal notranslate"><span class="pre">OSError</span></code> while trying to load
263263
a dataset.</p></li>
@@ -346,7 +346,7 @@ <h2>0.0.0 (2015-12-29)<a class="headerlink" href="#id6" title="Link to this head
346346
Some rights reserved. Licensed under <a href='https://creativecommons.org/licenses/by-nc-nd/4.0/'>CC BY-NC-ND 4.0</a>.
347347
Built with <a href="https://sphinx-doc.org/">Sphinx</a>
348348
and a customised <a href="https://github.com/pradyunsg/furo">Furo</a> theme.
349-
Last updated on 2023-12-11T15:14:53+1100.
349+
Last updated on 2023-12-12T14:31:23+1100.
350350
This site will never display any ads: it is a non-profit project.
351351
It does not collect any data.
352352
</div>
@@ -368,7 +368,7 @@ <h2>0.0.0 (2015-12-29)<a class="headerlink" href="#id6" title="Link to this head
368368
<div class="toc-tree">
369369
<ul>
370370
<li><a class="reference internal" href="#">Changelog</a><ul>
371-
<li><a class="reference internal" href="#id1">1.1.3 (2023-12-11)</a></li>
371+
<li><a class="reference internal" href="#id1">1.1.4 (2023-12-12)</a></li>
372372
<li><a class="reference internal" href="#id2">1.1.2 (2023-10-19)</a></li>
373373
<li><a class="reference internal" href="#id3">1.1.1 (2022-10-06)</a></li>
374374
<li><a class="reference internal" href="#id4">1.1.0 (2022-09-17)</a></li>
@@ -385,7 +385,7 @@ <h2>0.0.0 (2015-12-29)<a class="headerlink" href="#id6" title="Link to this head
385385

386386
</aside>
387387
</div>
388-
</div><script src="_static/documentation_options.js?v=cb7bf70b"></script>
388+
</div><script src="_static/documentation_options.js?v=00f267c6"></script>
389389
<script src="_static/doctools.js?v=888ff710"></script>
390390
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
391391
<script src="_static/scripts/furo.js?v=32e29ea5"></script>

docs/py-modindex.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
<a class="sidebar-brand" href="index.html">Clustering Benchmarks</a>
167167
</span>
168168
<div class="sidebar-brand">
169-
1.1.3
169+
1.1.4
170170
</div>
171171
<form class="sidebar-search-container" method="get" action="search.html" role="search">
172172
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
@@ -280,7 +280,7 @@ <h1>Python Module Index</h1>
280280
Some rights reserved. Licensed under <a href='https://creativecommons.org/licenses/by-nc-nd/4.0/'>CC BY-NC-ND 4.0</a>.
281281
Built with <a href="https://sphinx-doc.org/">Sphinx</a>
282282
and a customised <a href="https://github.com/pradyunsg/furo">Furo</a> theme.
283-
Last updated on 2023-12-11T15:14:53+1100.
283+
Last updated on 2023-12-12T14:31:23+1100.
284284
This site will never display any ads: it is a non-profit project.
285285
It does not collect any data.
286286
</div>
@@ -295,7 +295,7 @@ <h1>Python Module Index</h1>
295295

296296
</aside>
297297
</div>
298-
</div><script src="_static/documentation_options.js?v=cb7bf70b"></script>
298+
</div><script src="_static/documentation_options.js?v=00f267c6"></script>
299299
<script src="_static/doctools.js?v=888ff710"></script>
300300
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
301301
<script src="_static/scripts/furo.js?v=32e29ea5"></script>

docs/search.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
<a class="sidebar-brand" href="index.html">Clustering Benchmarks</a>
166166
</span>
167167
<div class="sidebar-brand">
168-
1.1.3
168+
1.1.4
169169
</div>
170170
<form class="sidebar-search-container" method="get" action="#" role="search">
171171
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
@@ -271,7 +271,7 @@
271271
Some rights reserved. Licensed under <a href='https://creativecommons.org/licenses/by-nc-nd/4.0/'>CC BY-NC-ND 4.0</a>.
272272
Built with <a href="https://sphinx-doc.org/">Sphinx</a>
273273
and a customised <a href="https://github.com/pradyunsg/furo">Furo</a> theme.
274-
Last updated on 2023-12-11T15:14:53+1100.
274+
Last updated on 2023-12-12T14:31:23+1100.
275275
This site will never display any ads: it is a non-profit project.
276276
It does not collect any data.
277277
</div>
@@ -286,7 +286,7 @@
286286

287287
</aside>
288288
</div>
289-
</div><script src="_static/documentation_options.js?v=cb7bf70b"></script>
289+
</div><script src="_static/documentation_options.js?v=00f267c6"></script>
290290
<script src="_static/doctools.js?v=888ff710"></script>
291291
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
292292
<script src="_static/scripts/furo.js?v=32e29ea5"></script>

docs/searchindex.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/weave/clustbench-usage.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
<a class="sidebar-brand" href="../index.html">Clustering Benchmarks</a>
169169
</span>
170170
<div class="sidebar-brand">
171-
1.1.3
171+
1.1.4
172172
</div>
173173
<form class="sidebar-search-container" method="get" action="../search.html" role="search">
174174
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
@@ -483,7 +483,7 @@ <h2>Applying Clustering Methods Manually<a class="headerlink" href="#applying-cl
483483
Some rights reserved. Licensed under <a href='https://creativecommons.org/licenses/by-nc-nd/4.0/'>CC BY-NC-ND 4.0</a>.
484484
Built with <a href="https://sphinx-doc.org/">Sphinx</a>
485485
and a customised <a href="https://github.com/pradyunsg/furo">Furo</a> theme.
486-
Last updated on 2023-12-11T15:14:53+1100.
486+
Last updated on 2023-12-12T14:31:23+1100.
487487
This site will never display any ads: it is a non-profit project.
488488
It does not collect any data.
489489
</div>
@@ -520,7 +520,7 @@ <h2>Applying Clustering Methods Manually<a class="headerlink" href="#applying-cl
520520

521521
</aside>
522522
</div>
523-
</div><script src="../_static/documentation_options.js?v=cb7bf70b"></script>
523+
</div><script src="../_static/documentation_options.js?v=00f267c6"></script>
524524
<script src="../_static/doctools.js?v=888ff710"></script>
525525
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
526526
<script src="../_static/scripts/furo.js?v=32e29ea5"></script>

docs/weave/colouriser.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
<a class="sidebar-brand" href="../index.html">Clustering Benchmarks</a>
169169
</span>
170170
<div class="sidebar-brand">
171-
1.1.3
171+
1.1.4
172172
</div>
173173
<form class="sidebar-search-container" method="get" action="../search.html" role="search">
174174
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
@@ -315,7 +315,7 @@
315315
Some rights reserved. Licensed under <a href='https://creativecommons.org/licenses/by-nc-nd/4.0/'>CC BY-NC-ND 4.0</a>.
316316
Built with <a href="https://sphinx-doc.org/">Sphinx</a>
317317
and a customised <a href="https://github.com/pradyunsg/furo">Furo</a> theme.
318-
Last updated on 2023-12-11T15:14:53+1100.
318+
Last updated on 2023-12-12T14:31:23+1100.
319319
This site will never display any ads: it is a non-profit project.
320320
It does not collect any data.
321321
</div>
@@ -330,7 +330,7 @@
330330

331331
</aside>
332332
</div>
333-
</div><script src="../_static/documentation_options.js?v=cb7bf70b"></script>
333+
</div><script src="../_static/documentation_options.js?v=00f267c6"></script>
334334
<script src="../_static/doctools.js?v=888ff710"></script>
335335
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
336336
<script src="../_static/scripts/furo.js?v=32e29ea5"></script>

docs/weave/contributing.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
<a class="sidebar-brand" href="../index.html">Clustering Benchmarks</a>
169169
</span>
170170
<div class="sidebar-brand">
171-
1.1.3
171+
1.1.4
172172
</div>
173173
<form class="sidebar-search-container" method="get" action="../search.html" role="search">
174174
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
@@ -304,7 +304,7 @@
304304
Some rights reserved. Licensed under <a href='https://creativecommons.org/licenses/by-nc-nd/4.0/'>CC BY-NC-ND 4.0</a>.
305305
Built with <a href="https://sphinx-doc.org/">Sphinx</a>
306306
and a customised <a href="https://github.com/pradyunsg/furo">Furo</a> theme.
307-
Last updated on 2023-12-11T15:14:53+1100.
307+
Last updated on 2023-12-12T14:31:23+1100.
308308
This site will never display any ads: it is a non-profit project.
309309
It does not collect any data.
310310
</div>
@@ -319,7 +319,7 @@
319319

320320
</aside>
321321
</div>
322-
</div><script src="../_static/documentation_options.js?v=cb7bf70b"></script>
322+
</div><script src="../_static/documentation_options.js?v=00f267c6"></script>
323323
<script src="../_static/doctools.js?v=888ff710"></script>
324324
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
325325
<script src="../_static/scripts/furo.js?v=32e29ea5"></script>

docs/weave/data-v1.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
<a class="sidebar-brand" href="../index.html">Clustering Benchmarks</a>
169169
</span>
170170
<div class="sidebar-brand">
171-
1.1.3
171+
1.1.4
172172
</div>
173173
<form class="sidebar-search-container" method="get" action="../search.html" role="search">
174174
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
@@ -483,7 +483,7 @@
483483
Some rights reserved. Licensed under <a href='https://creativecommons.org/licenses/by-nc-nd/4.0/'>CC BY-NC-ND 4.0</a>.
484484
Built with <a href="https://sphinx-doc.org/">Sphinx</a>
485485
and a customised <a href="https://github.com/pradyunsg/furo">Furo</a> theme.
486-
Last updated on 2023-12-11T15:14:53+1100.
486+
Last updated on 2023-12-12T14:31:23+1100.
487487
This site will never display any ads: it is a non-profit project.
488488
It does not collect any data.
489489
</div>
@@ -498,7 +498,7 @@
498498

499499
</aside>
500500
</div>
501-
</div><script src="../_static/documentation_options.js?v=cb7bf70b"></script>
501+
</div><script src="../_static/documentation_options.js?v=00f267c6"></script>
502502
<script src="../_static/doctools.js?v=888ff710"></script>
503503
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
504504
<script src="../_static/scripts/furo.js?v=32e29ea5"></script>

docs/weave/external-validity-measures.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
<a class="sidebar-brand" href="../index.html">Clustering Benchmarks</a>
169169
</span>
170170
<div class="sidebar-brand">
171-
1.1.3
171+
1.1.4
172172
</div>
173173
<form class="sidebar-search-container" method="get" action="../search.html" role="search">
174174
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
@@ -697,7 +697,7 @@ <h2>Information-Theoretic Measures<a class="headerlink" href="#information-theor
697697
Some rights reserved. Licensed under <a href='https://creativecommons.org/licenses/by-nc-nd/4.0/'>CC BY-NC-ND 4.0</a>.
698698
Built with <a href="https://sphinx-doc.org/">Sphinx</a>
699699
and a customised <a href="https://github.com/pradyunsg/furo">Furo</a> theme.
700-
Last updated on 2023-12-11T15:14:53+1100.
700+
Last updated on 2023-12-12T14:31:23+1100.
701701
This site will never display any ads: it is a non-profit project.
702702
It does not collect any data.
703703
</div>
@@ -746,7 +746,7 @@ <h2>Information-Theoretic Measures<a class="headerlink" href="#information-theor
746746

747747
</aside>
748748
</div>
749-
</div><script src="../_static/documentation_options.js?v=cb7bf70b"></script>
749+
</div><script src="../_static/documentation_options.js?v=00f267c6"></script>
750750
<script src="../_static/doctools.js?v=888ff710"></script>
751751
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
752752
<script src="../_static/scripts/furo.js?v=32e29ea5"></script>

0 commit comments

Comments
 (0)