From 286644d42dea658b7263bd0dcdb21cf2a48cfdfa Mon Sep 17 00:00:00 2001 From: MathieuCarriere Date: Thu, 19 Oct 2023 11:35:38 +0200 Subject: [PATCH 1/7] added better visu --- Tuto-GUDHI-cover-complex.ipynb | 181 ++++++++++++++++++++++++++++----- 1 file changed, 156 insertions(+), 25 deletions(-) diff --git a/Tuto-GUDHI-cover-complex.ipynb b/Tuto-GUDHI-cover-complex.ipynb index 7a0ec38..2d02a24 100644 --- a/Tuto-GUDHI-cover-complex.ipynb +++ b/Tuto-GUDHI-cover-complex.ipynb @@ -1062,7 +1062,7 @@ { "data": { "text/html": [ - "" + "" ], "text/plain": [ "" @@ -1073,16 +1073,27 @@ } ], "source": [ + "def set_axes_equal(ax: plt.Axes):\n", + " limits = np.array([\n", + " ax.get_xlim3d(),\n", + " ax.get_ylim3d(),\n", + " ax.get_zlim3d(),\n", + " ])\n", + " origin = np.mean(limits, axis=1)\n", + " radius = 0.5 * np.max(np.abs(limits[:, 1] - limits[:, 0]))\n", + " _set_axes_radius(ax, origin, radius)\n", + "\n", + "def _set_axes_radius(ax, origin, radius):\n", + " x, y, z = origin\n", + " ax.set_xlim3d([x - radius, x + radius])\n", + " ax.set_ylim3d([y - radius, y + radius])\n", + " ax.set_zlim3d([z - radius, z + radius])\n", + " \n", "fig = plt.figure()\n", - "ax = fig.add_subplot(111, projection='3d')\n", + "ax = fig.add_subplot(projection='3d')\n", + "ax.set_aspect('equal')\n", "ax.scatter(X[::2,1], X[::2,0], X[::2,2], s=1)\n", - "limits = np.array([ax.get_xlim3d(), ax.get_ylim3d(), ax.get_zlim3d()])\n", - "origin = np.mean(limits, axis=1)\n", - "radius = 0.5 * np.max(np.abs(limits[:, 1] - limits[:, 0]))\n", - "x, y, z = origin\n", - "ax.set_xlim3d([x - radius, x + radius])\n", - "ax.set_ylim3d([y - radius, y + radius])\n", - "ax.set_zlim3d([z - radius, z + radius])\n", + "set_axes_equal(ax)\n", "plt.show()" ] }, @@ -4046,7 +4057,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -4055,7 +4066,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -4067,9 +4078,96 @@ }, { "cell_type": "code", - "execution_count": 23, - "metadata": {}, - "outputs": [], + "execution_count": 7, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n", + "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", + " warnings.warn(\n" + ] + } + ], "source": [ "_ = cover_complex.fit(X, filters=filt2d, colors=filt2d)" ] @@ -4097,7 +4195,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -4106,7 +4204,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -4115,7 +4213,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -5106,7 +5204,7 @@ { "data": { "text/html": [ - "" + "" ], "text/plain": [ "" @@ -5131,7 +5229,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 11, "metadata": {}, "outputs": [ { @@ -6122,7 +6220,7 @@ { "data": { "text/html": [ - "" + "" ], "text/plain": [ "" @@ -6138,7 +6236,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -6154,16 +6252,16 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 19, "metadata": {}, "outputs": [], "source": [ - "cover_complex.save_to_txt(file_name=\"human\", color_name=\"color\")" + "cover_complex.save_to_txt(file_name=\"human\", data_name=\"human\", cover_name=\"uniform\", color_name=\"height\")" ] }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -6178,6 +6276,39 @@ "!python ./utils/KeplerMapperVisuFromTxtFile.py -f human.txt" ] }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from IPython.display import IFrame\n", + "IFrame(src=\"human.html\", width='100%', height='500px')" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -8649,7 +8780,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.16" + "version": "3.11.4" }, "toc": { "base_numbering": 1, From f58b210fa215433a801415c60aff0ccc4c90550a Mon Sep 17 00:00:00 2001 From: MathieuCarriere Date: Wed, 25 Oct 2023 10:56:58 +0200 Subject: [PATCH 2/7] removed deprecation warning + fixed 3D visu with equal axes --- Tuto-GUDHI-cover-complex.ipynb | 2186 ++++++++++++++++++++++++++++---- 1 file changed, 1952 insertions(+), 234 deletions(-) diff --git a/Tuto-GUDHI-cover-complex.ipynb b/Tuto-GUDHI-cover-complex.ipynb index 2d02a24..9779526 100644 --- a/Tuto-GUDHI-cover-complex.ipynb +++ b/Tuto-GUDHI-cover-complex.ipynb @@ -1062,7 +1062,7 @@ { "data": { "text/html": [ - "" + "" ], "text/plain": [ "" @@ -1081,9 +1081,6 @@ " ])\n", " origin = np.mean(limits, axis=1)\n", " radius = 0.5 * np.max(np.abs(limits[:, 1] - limits[:, 0]))\n", - " _set_axes_radius(ax, origin, radius)\n", - "\n", - "def _set_axes_radius(ax, origin, radius):\n", " x, y, z = origin\n", " ax.set_xlim3d([x - radius, x + radius])\n", " ax.set_ylim3d([y - radius, y + radius])\n", @@ -1091,7 +1088,7 @@ " \n", "fig = plt.figure()\n", "ax = fig.add_subplot(projection='3d')\n", - "ax.set_aspect('equal')\n", + "ax.set_box_aspect([1.0, 1.0, 1.0])\n", "ax.scatter(X[::2,1], X[::2,0], X[::2,2], s=1)\n", "set_axes_equal(ax)\n", "plt.show()" @@ -1117,31 +1114,1779 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We next provide different configurations for computing cover complexes:" + "We next provide different configurations for computing cover complexes:" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Graph Induced complex with a Voronoi partition with 100 randomly sampled germs and Rips graph obtained with automatic threshold. " + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "cover_complex = GraphInducedComplex(\n", + " input_type='point cloud', cover='voronoi', min_points_per_node=0,\n", + " graph=\"rips\", rips_threshold=None, N=100, beta=0., C=10,\n", + " voronoi_samples=100, verbose=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "15910 points in R^3\n", + "Subsampling 3786 points\n", + "Computing distances...\n", + "\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "0%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "10%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "20%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "30%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "40%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "50%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "60%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "70%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "80%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "90%\r", + "100%\n", + "delta = 0.0613632\n", + "Computing geodesic distances to seed 0...\n", + "Computing geodesic distances to seed 1...\n", + "Computing geodesic distances to seed 2...\n", + "Computing geodesic distances to seed 3...\n", + "Computing geodesic distances to seed 4...\n", + "Computing geodesic distances to seed 5...\n", + "Computing geodesic distances to seed 6...\n", + "Computing geodesic distances to seed 7...\n", + "Computing geodesic distances to seed 8...\n", + "Computing geodesic distances to seed 9...\n", + "Computing geodesic distances to seed 10...\n", + "Computing geodesic distances to seed 11...\n", + "Computing geodesic distances to seed 12...\n", + "Computing geodesic distances to seed 13...\n", + "Computing geodesic distances to seed 14...\n", + "Computing geodesic distances to seed 15...\n", + "Computing geodesic distances to seed 16...\n", + "Computing geodesic distances to seed 17...\n", + "Computing geodesic distances to seed 18...\n", + "Computing geodesic distances to seed 19...\n", + "Computing geodesic distances to seed 20...\n", + "Computing geodesic distances to seed 21...\n", + "Computing geodesic distances to seed 22...\n", + "Computing geodesic distances to seed 23...\n", + "Computing geodesic distances to seed 24...\n", + "Computing geodesic distances to seed 25...\n", + "Computing geodesic distances to seed 26...\n", + "Computing geodesic distances to seed 27...\n", + "Computing geodesic distances to seed 28...\n", + "Computing geodesic distances to seed 29...\n", + "Computing geodesic distances to seed 30...\n", + "Computing geodesic distances to seed 31...\n", + "Computing geodesic distances to seed 32...\n", + "Computing geodesic distances to seed 33...\n", + "Computing geodesic distances to seed 34...\n", + "Computing geodesic distances to seed 35...\n", + "Computing geodesic distances to seed 36...\n", + "Computing geodesic distances to seed 37...\n", + "Computing geodesic distances to seed 38...\n", + "Computing geodesic distances to seed 39...\n", + "Computing geodesic distances to seed 40...\n", + "Computing geodesic distances to seed 41...\n", + "Computing geodesic distances to seed 42...\n", + "Computing geodesic distances to seed 43...\n", + "Computing geodesic distances to seed 44...\n", + "Computing geodesic distances to seed 45...\n", + "Computing geodesic distances to seed 46...\n", + "Computing geodesic distances to seed 47...\n", + "Computing geodesic distances to seed 48...\n", + "Computing geodesic distances to seed 49...\n", + "Computing geodesic distances to seed 50...\n", + "Computing geodesic distances to seed 51...\n", + "Computing geodesic distances to seed 52...\n", + "Computing geodesic distances to seed 53...\n", + "Computing geodesic distances to seed 54...\n", + "Computing geodesic distances to seed 55...\n", + "Computing geodesic distances to seed 56...\n", + "Computing geodesic distances to seed 57...\n", + "Computing geodesic distances to seed 58...\n", + "Computing geodesic distances to seed 59...\n", + "Computing geodesic distances to seed 60...\n", + "Computing geodesic distances to seed 61...\n", + "Computing geodesic distances to seed 62...\n", + "Computing geodesic distances to seed 63...\n", + "Computing geodesic distances to seed 64...\n", + "Computing geodesic distances to seed 65...\n", + "Computing geodesic distances to seed 66...\n", + "Computing geodesic distances to seed 67...\n", + "Computing geodesic distances to seed 68...\n", + "Computing geodesic distances to seed 69...\n", + "Computing geodesic distances to seed 70...\n", + "Computing geodesic distances to seed 71...\n", + "Computing geodesic distances to seed 72...\n", + "Computing geodesic distances to seed 73...\n", + "Computing geodesic distances to seed 74...\n", + "Computing geodesic distances to seed 75...\n", + "Computing geodesic distances to seed 76...\n", + "Computing geodesic distances to seed 77...\n", + "Computing geodesic distances to seed 78...\n", + "Computing geodesic distances to seed 79...\n", + "Computing geodesic distances to seed 80...\n", + "Computing geodesic distances to seed 81...\n", + "Computing geodesic distances to seed 82...\n", + "Computing geodesic distances to seed 83...\n", + "Computing geodesic distances to seed 84...\n", + "Computing geodesic distances to seed 85...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Computing geodesic distances to seed 86...\n", + "Computing geodesic distances to seed 87...\n", + "Computing geodesic distances to seed 88...\n", + "Computing geodesic distances to seed 89...\n", + "Computing geodesic distances to seed 90...\n", + "Computing geodesic distances to seed 91...\n", + "Computing geodesic distances to seed 92...\n", + "Computing geodesic distances to seed 93...\n", + "Computing geodesic distances to seed 94...\n", + "Computing geodesic distances to seed 95...\n", + "Computing geodesic distances to seed 96...\n", + "Computing geodesic distances to seed 97...\n", + "Computing geodesic distances to seed 98...\n", + "Computing geodesic distances to seed 99...\n" + ] + } + ], + "source": [ + "_ = cover_complex.fit(X, filter=height, color=height)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Graph Induced complex with a Voronoi partition with 100 randomly sampled germs and Rips graph obtained with automatic threshold. " + "Graph Induced complex with a preimage partition with automatic resolution and Rips graph obtained with automatic threshold. " ] }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "cover_complex = GraphInducedComplex(\n", - " input_type='point cloud', cover='voronoi', min_points_per_node=0,\n", + " input_type='point cloud', cover='functional', min_points_per_node=0,\n", " graph=\"rips\", rips_threshold=None, N=100, beta=0., C=10,\n", - " voronoi_samples=100, verbose=True)" + " resolution=None, gain=0., verbose=True)" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -2752,79 +4497,38 @@ "90%\r", "90%\r", "100%\n", - "delta = 0.0614359\n", - "Computing geodesic distances (parallelized)...\n" - ] - } - ], - "source": [ - "_ = cover_complex.fit(X, filter=height, color=height)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Graph Induced complex with a preimage partition with automatic resolution and Rips graph obtained with automatic threshold. " - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [], - "source": [ - "cover_complex = GraphInducedComplex(\n", - " input_type='point cloud', cover='functional', min_points_per_node=0,\n", - " graph=\"rips\", rips_threshold=None, N=100, beta=0., C=10,\n", - " resolution=None, gain=0., verbose=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "15910 points in R^3\n", - "Subsampling 3786 points\n", - "Computing distances...\n", - "100%\n", - "delta = 0.0596065\n", - "resolution = 0.059534\n", + "delta = 0.0616142\n", + "resolution = 0.061597\n", "Min function value = -0.846853 and Max function value = 0.819366\n", - "Interval 0 = [-0.846853, -0.787319]\n", - "Interval 1 = [-0.787319, -0.727785]\n", - "Interval 2 = [-0.727785, -0.668251]\n", - "Interval 3 = [-0.668251, -0.608717]\n", - "Interval 4 = [-0.608717, -0.549183]\n", - "Interval 5 = [-0.549183, -0.489649]\n", - "Interval 6 = [-0.489649, -0.430115]\n", - "Interval 7 = [-0.430115, -0.370581]\n", - "Interval 8 = [-0.370581, -0.311047]\n", - "Interval 9 = [-0.311047, -0.251513]\n", - "Interval 10 = [-0.251513, -0.191979]\n", - "Interval 11 = [-0.191979, -0.132445]\n", - "Interval 12 = [-0.132445, -0.072911]\n", - "Interval 13 = [-0.072911, -0.013377]\n", - "Interval 14 = [-0.013377, 0.046157]\n", - "Interval 15 = [0.046157, 0.105691]\n", - "Interval 16 = [0.105691, 0.165225]\n", - "Interval 17 = [0.165225, 0.224759]\n", - "Interval 18 = [0.224759, 0.284293]\n", - "Interval 19 = [0.284293, 0.343827]\n", - "Interval 20 = [0.343827, 0.403361]\n", - "Interval 21 = [0.403361, 0.462895]\n", - "Interval 22 = [0.462895, 0.522429]\n", - "Interval 23 = [0.522429, 0.581963]\n", - "Interval 24 = [0.581963, 0.641497]\n", - "Interval 25 = [0.641497, 0.701031]\n", - "Interval 26 = [0.701031, 0.819366]\n", + "Interval 0 = [-0.846853, -0.785256]\n", + "Interval 1 = [-0.785256, -0.723659]\n", + "Interval 2 = [-0.723659, -0.662062]\n", + "Interval 3 = [-0.662062, -0.600465]\n", + "Interval 4 = [-0.600465, -0.538868]\n", + "Interval 5 = [-0.538868, -0.477271]\n", + "Interval 6 = [-0.477271, -0.415674]\n", + "Interval 7 = [-0.415674, -0.354077]\n", + "Interval 8 = [-0.354077, -0.29248]\n", + "Interval 9 = [-0.29248, -0.230883]\n", + "Interval 10 = [-0.230883, -0.169286]\n", + "Interval 11 = [-0.169286, -0.107689]\n", + "Interval 12 = [-0.107689, -0.046092]\n", + "Interval 13 = [-0.046092, 0.015505]\n", + "Interval 14 = [0.015505, 0.077102]\n", + "Interval 15 = [0.077102, 0.138699]\n", + "Interval 16 = [0.138699, 0.200296]\n", + "Interval 17 = [0.200296, 0.261893]\n", + "Interval 18 = [0.261893, 0.32349]\n", + "Interval 19 = [0.32349, 0.385087]\n", + "Interval 20 = [0.385087, 0.446684]\n", + "Interval 21 = [0.446684, 0.508281]\n", + "Interval 22 = [0.508281, 0.569878]\n", + "Interval 23 = [0.569878, 0.631475]\n", + "Interval 24 = [0.631475, 0.693072]\n", + "Interval 25 = [0.693072, 0.754669]\n", + "Interval 26 = [0.754669, 0.819366]\n", "Computing preimages...\n", - "Computing connected components (parallelized)...\n" + "Computing connected components...\n" ] } ], @@ -2841,7 +4545,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -2854,7 +4558,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -2877,7 +4581,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -2886,7 +4590,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -2895,7 +4599,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -3886,7 +5590,7 @@ { "data": { "text/html": [ - "" + "" ], "text/plain": [ "" @@ -3911,7 +5615,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -3927,7 +5631,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -3939,7 +5643,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -3948,25 +5652,25 @@ "text": [ "15910 points in R^0\n", "Subsampling 3786 points\n", - "delta = 0.0610347\n", - "resolution = 0.0609878\n", + "delta = 0.061323\n", + "resolution = 0.0612461\n", "Min function value = 0.96263 and Max function value = 1.86879\n", - "Interval 0 = [0.96263, 1.02362]\n", - "Interval 1 = [1.02362, 1.08461]\n", - "Interval 2 = [1.08461, 1.14559]\n", - "Interval 3 = [1.14559, 1.20658]\n", - "Interval 4 = [1.20658, 1.26757]\n", - "Interval 5 = [1.26757, 1.32856]\n", - "Interval 6 = [1.32856, 1.38954]\n", - "Interval 7 = [1.38954, 1.45053]\n", - "Interval 8 = [1.45053, 1.51152]\n", - "Interval 9 = [1.51152, 1.57251]\n", - "Interval 10 = [1.57251, 1.6335]\n", - "Interval 11 = [1.6335, 1.69448]\n", - "Interval 12 = [1.69448, 1.75547]\n", - "Interval 13 = [1.75547, 1.86879]\n", + "Interval 0 = [0.96263, 1.02388]\n", + "Interval 1 = [1.02388, 1.08512]\n", + "Interval 2 = [1.08512, 1.14637]\n", + "Interval 3 = [1.14637, 1.20761]\n", + "Interval 4 = [1.20761, 1.26886]\n", + "Interval 5 = [1.26886, 1.33011]\n", + "Interval 6 = [1.33011, 1.39135]\n", + "Interval 7 = [1.39135, 1.4526]\n", + "Interval 8 = [1.4526, 1.51384]\n", + "Interval 9 = [1.51384, 1.57509]\n", + "Interval 10 = [1.57509, 1.63634]\n", + "Interval 11 = [1.63634, 1.69758]\n", + "Interval 12 = [1.69758, 1.75883]\n", + "Interval 13 = [1.75883, 1.86879]\n", "Computing preimages...\n", - "Computing connected components (parallelized)...\n" + "Computing connected components...\n" ] } ], @@ -3983,7 +5687,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [ @@ -3995,7 +5699,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -4004,8 +5708,107 @@ "text": [ "15910 points in R^0\n", "Subsampling 3786 points\n", - "delta = 0.0619632\n", - "Computing geodesic distances (parallelized)...\n" + "delta = 0.0616358\n", + "Computing geodesic distances to seed 0...\n", + "Computing geodesic distances to seed 1...\n", + "Computing geodesic distances to seed 2...\n", + "Computing geodesic distances to seed 3...\n", + "Computing geodesic distances to seed 4...\n", + "Computing geodesic distances to seed 5...\n", + "Computing geodesic distances to seed 6...\n", + "Computing geodesic distances to seed 7...\n", + "Computing geodesic distances to seed 8...\n", + "Computing geodesic distances to seed 9...\n", + "Computing geodesic distances to seed 10...\n", + "Computing geodesic distances to seed 11...\n", + "Computing geodesic distances to seed 12...\n", + "Computing geodesic distances to seed 13...\n", + "Computing geodesic distances to seed 14...\n", + "Computing geodesic distances to seed 15...\n", + "Computing geodesic distances to seed 16...\n", + "Computing geodesic distances to seed 17...\n", + "Computing geodesic distances to seed 18...\n", + "Computing geodesic distances to seed 19...\n", + "Computing geodesic distances to seed 20...\n", + "Computing geodesic distances to seed 21...\n", + "Computing geodesic distances to seed 22...\n", + "Computing geodesic distances to seed 23...\n", + "Computing geodesic distances to seed 24...\n", + "Computing geodesic distances to seed 25...\n", + "Computing geodesic distances to seed 26...\n", + "Computing geodesic distances to seed 27...\n", + "Computing geodesic distances to seed 28...\n", + "Computing geodesic distances to seed 29...\n", + "Computing geodesic distances to seed 30...\n", + "Computing geodesic distances to seed 31...\n", + "Computing geodesic distances to seed 32...\n", + "Computing geodesic distances to seed 33...\n", + "Computing geodesic distances to seed 34...\n", + "Computing geodesic distances to seed 35...\n", + "Computing geodesic distances to seed 36...\n", + "Computing geodesic distances to seed 37...\n", + "Computing geodesic distances to seed 38...\n", + "Computing geodesic distances to seed 39...\n", + "Computing geodesic distances to seed 40...\n", + "Computing geodesic distances to seed 41...\n", + "Computing geodesic distances to seed 42...\n", + "Computing geodesic distances to seed 43...\n", + "Computing geodesic distances to seed 44...\n", + "Computing geodesic distances to seed 45...\n", + "Computing geodesic distances to seed 46...\n", + "Computing geodesic distances to seed 47...\n", + "Computing geodesic distances to seed 48...\n", + "Computing geodesic distances to seed 49...\n", + "Computing geodesic distances to seed 50...\n", + "Computing geodesic distances to seed 51...\n", + "Computing geodesic distances to seed 52...\n", + "Computing geodesic distances to seed 53...\n", + "Computing geodesic distances to seed 54...\n", + "Computing geodesic distances to seed 55...\n", + "Computing geodesic distances to seed 56...\n", + "Computing geodesic distances to seed 57...\n", + "Computing geodesic distances to seed 58...\n", + "Computing geodesic distances to seed 59...\n", + "Computing geodesic distances to seed 60...\n", + "Computing geodesic distances to seed 61...\n", + "Computing geodesic distances to seed 62...\n", + "Computing geodesic distances to seed 63...\n", + "Computing geodesic distances to seed 64...\n", + "Computing geodesic distances to seed 65...\n", + "Computing geodesic distances to seed 66...\n", + "Computing geodesic distances to seed 67...\n", + "Computing geodesic distances to seed 68...\n", + "Computing geodesic distances to seed 69...\n", + "Computing geodesic distances to seed 70...\n", + "Computing geodesic distances to seed 71...\n", + "Computing geodesic distances to seed 72...\n", + "Computing geodesic distances to seed 73...\n", + "Computing geodesic distances to seed 74...\n", + "Computing geodesic distances to seed 75...\n", + "Computing geodesic distances to seed 76...\n", + "Computing geodesic distances to seed 77...\n", + "Computing geodesic distances to seed 78...\n", + "Computing geodesic distances to seed 79...\n", + "Computing geodesic distances to seed 80...\n", + "Computing geodesic distances to seed 81...\n", + "Computing geodesic distances to seed 82...\n", + "Computing geodesic distances to seed 83...\n", + "Computing geodesic distances to seed 84...\n", + "Computing geodesic distances to seed 85...\n", + "Computing geodesic distances to seed 86...\n", + "Computing geodesic distances to seed 87...\n", + "Computing geodesic distances to seed 88...\n", + "Computing geodesic distances to seed 89...\n", + "Computing geodesic distances to seed 90...\n", + "Computing geodesic distances to seed 91...\n", + "Computing geodesic distances to seed 92...\n", + "Computing geodesic distances to seed 93...\n", + "Computing geodesic distances to seed 94...\n", + "Computing geodesic distances to seed 95...\n", + "Computing geodesic distances to seed 96...\n", + "Computing geodesic distances to seed 97...\n", + "Computing geodesic distances to seed 98...\n", + "Computing geodesic distances to seed 99...\n" ] } ], @@ -4022,7 +5825,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 20, "metadata": {}, "outputs": [], "source": [ @@ -4034,7 +5837,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 21, "metadata": {}, "outputs": [], "source": [ @@ -4057,7 +5860,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 22, "metadata": {}, "outputs": [], "source": [ @@ -4066,7 +5869,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 23, "metadata": {}, "outputs": [], "source": [ @@ -4078,96 +5881,11 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 24, "metadata": { "scrolled": true }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n", - "/user/mcarrier/home/.local/lib/python3.11/site-packages/sklearn/cluster/_agglomerative.py:1005: FutureWarning: Attribute `affinity` was deprecated in version 1.2 and will be removed in 1.4. Use `metric` instead\n", - " warnings.warn(\n" - ] - } - ], + "outputs": [], "source": [ "_ = cover_complex.fit(X, filters=filt2d, colors=filt2d)" ] @@ -4195,7 +5913,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 25, "metadata": {}, "outputs": [], "source": [ @@ -4204,7 +5922,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 26, "metadata": {}, "outputs": [], "source": [ @@ -4213,7 +5931,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 28, "metadata": {}, "outputs": [ { @@ -5229,7 +6947,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 29, "metadata": {}, "outputs": [ { @@ -6236,7 +7954,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 30, "metadata": {}, "outputs": [], "source": [ @@ -6252,7 +7970,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 31, "metadata": {}, "outputs": [], "source": [ @@ -6261,7 +7979,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 32, "metadata": {}, "outputs": [ { @@ -6278,7 +7996,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 33, "metadata": {}, "outputs": [ { @@ -6296,10 +8014,10 @@ " " ], "text/plain": [ - "" + "" ] }, - "execution_count": 22, + "execution_count": 33, "metadata": {}, "output_type": "execute_result" } @@ -6325,7 +8043,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 34, "metadata": {}, "outputs": [], "source": [ @@ -6338,7 +8056,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 35, "metadata": {}, "outputs": [], "source": [ @@ -6347,7 +8065,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 36, "metadata": {}, "outputs": [], "source": [ @@ -6356,7 +8074,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 37, "metadata": {}, "outputs": [], "source": [ @@ -6607,7 +8325,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 38, "metadata": {}, "outputs": [], "source": [ @@ -6616,7 +8334,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 39, "metadata": {}, "outputs": [ { @@ -7607,7 +9325,7 @@ { "data": { "text/html": [ - "" + "" ], "text/plain": [ "" @@ -7636,14 +9354,14 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 40, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:27<00:00, 3.59it/s]\n" + "100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:46<00:00, 2.14it/s]\n" ] } ], @@ -7653,7 +9371,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 41, "metadata": {}, "outputs": [], "source": [ @@ -7662,7 +9380,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 42, "metadata": {}, "outputs": [], "source": [ @@ -7671,7 +9389,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 43, "metadata": {}, "outputs": [ { @@ -8662,7 +10380,7 @@ { "data": { "text/html": [ - "" + "" ], "text/plain": [ "" @@ -8698,7 +10416,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 44, "metadata": {}, "outputs": [ { @@ -8707,7 +10425,7 @@ "(array([0, 1, 2]), array([0., 0., 0.]))" ] }, - "execution_count": 41, + "execution_count": 44, "metadata": {}, "output_type": "execute_result" } @@ -8718,16 +10436,16 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 45, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "(array([0, 2, 1]), array([0.00000000e+000, 0.00000000e+000, 3.87238276e-289]))" + "(array([1, 2, 0]), array([0.00000000e+000, 0.00000000e+000, 4.87710222e-147]))" ] }, - "execution_count": 42, + "execution_count": 45, "metadata": {}, "output_type": "execute_result" } @@ -8738,16 +10456,16 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 46, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "(array([0, 2, 1]), array([0.00000000e+000, 0.00000000e+000, 9.31466329e-244]))" + "(array([0, 2, 1]), array([0.00000000e+000, 0.00000000e+000, 3.13211519e-128]))" ] }, - "execution_count": 43, + "execution_count": 46, "metadata": {}, "output_type": "execute_result" } From d3d772abf6b7e5a5a6c6306d06b41134bb1d1b0f Mon Sep 17 00:00:00 2001 From: MathieuCarriere Date: Fri, 10 Nov 2023 12:17:27 +0100 Subject: [PATCH 3/7] new api command for html --- Tuto-GUDHI-cover-complex.ipynb | 64 +++-- utils/KeplerMapperVisuFromTxtFile.py | 44 +-- utils/km.py | 390 --------------------------- 3 files changed, 49 insertions(+), 449 deletions(-) delete mode 100755 utils/km.py diff --git a/Tuto-GUDHI-cover-complex.ipynb b/Tuto-GUDHI-cover-complex.ipynb index 9779526..a774132 100644 --- a/Tuto-GUDHI-cover-complex.ipynb +++ b/Tuto-GUDHI-cover-complex.ipynb @@ -1062,7 +1062,7 @@ { "data": { "text/html": [ - "" + "" ], "text/plain": [ "" @@ -4545,7 +4545,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -4558,7 +4558,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -7965,38 +7965,29 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "3. You can create a TXT file that you can process later with our KeplerMapper wrapper to produce a HTML file that you can visualize in browser." - ] - }, - { - "cell_type": "code", - "execution_count": 31, - "metadata": {}, - "outputs": [], - "source": [ - "cover_complex.save_to_txt(file_name=\"human\", data_name=\"human\", cover_name=\"uniform\", color_name=\"height\")" + "3. You can create an HTML file and visualize it in browser." ] }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "'human.html' is generated. You can now use your favorite web browser to visualize it.\r\n" + "'human.html' is generated. You can now use your favorite web browser to visualize it.\n" ] } ], "source": [ - "!python ./utils/KeplerMapperVisuFromTxtFile.py -f human.txt" + "cover_complex.save_to_html(file_name=\"human\", data_name=\"human\", cover_name=\"uniform\", color_name=\"height\")" ] }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -8014,10 +8005,10 @@ " " ], "text/plain": [ - "" + "" ] }, - "execution_count": 33, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -8027,6 +8018,39 @@ "IFrame(src=\"human.html\", width='100%', height='500px')" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Alternatively, you can create a TXT file that you can process later with our KeplerMapper wrapper to produce the HTML file." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "cover_complex.save_to_txt(file_name=\"human\", data_name=\"human\", cover_name=\"uniform\", color_name=\"height\")" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "'human.html' is generated. You can now use your favorite web browser to visualize it.\r\n" + ] + } + ], + "source": [ + "!python ./utils/KeplerMapperVisuFromTxtFile.py -f human.txt" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -10498,7 +10522,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.4" + "version": "3.11.6" }, "toc": { "base_numbering": 1, diff --git a/utils/KeplerMapperVisuFromTxtFile.py b/utils/KeplerMapperVisuFromTxtFile.py index b4bbabc..0b0ce3a 100755 --- a/utils/KeplerMapperVisuFromTxtFile.py +++ b/utils/KeplerMapperVisuFromTxtFile.py @@ -1,9 +1,7 @@ #!/usr/bin/env python -import km -import numpy as np -from collections import defaultdict import argparse +from gudhi.cover_complex import save_to_html_ """This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. @@ -30,48 +28,16 @@ args = parser.parse_args() with open(args.file, 'r') as f: - network = {} - mapper = km.KeplerMapper(verbose=0) - data = np.zeros((3,3)) - projected_data = mapper.fit_transform( data, projection="sum", scaler=None ) - - nodes = defaultdict(list) - links = defaultdict(list) - custom = defaultdict(list) dat = f.readline() lens = f.readline() color = f.readline(); param = [float(i) for i in f.readline().split(" ")] - nums = [int(i) for i in f.readline().split(" ")] - num_nodes = nums[0] - num_edges = nums[1] - - for i in range(0,num_nodes): - point = [float(j) for j in f.readline().split(" ")] - nodes[ str(int(point[0])) ] = [ int(point[0]), point[1], int(point[2]) ] - links[ str(int(point[0])) ] = [] - custom[ int(point[0]) ] = point[1] - - m = min([custom[i] for i in range(0,num_nodes)]) - M = max([custom[i] for i in range(0,num_nodes)]) - - for i in range(0,num_edges): - edge = [int(j) for j in f.readline().split(" ")] - links[ str(edge[0]) ].append( str(edge[1]) ) - links[ str(edge[1]) ].append( str(edge[0]) ) - - network["nodes"] = nodes - network["links"] = links - network["meta"] = lens - + points = [[float(j) for j in f.readline().split(" ")] for i in range(0, nums[0])] + edges = [[int(j) for j in f.readline().split(" ")] for i in range(0, nums[1])] html_output_filename = args.file.rsplit('.', 1)[0] + '.html' - mapper.visualize(network, color_function=color, path_html=html_output_filename, title=dat, - graph_link_distance=30, graph_gravity=0.1, graph_charge=-120, custom_tooltips=custom, width_html=0, - height_html=0, show_tooltips=True, show_title=True, show_meta=True, res=param[0],gain=param[1], minimum=m,maximum=M) - message = repr(html_output_filename) + " is generated. You can now use your favorite web browser to visualize it." - print(message) - f.close() + +save_to_html_(dat, lens, color, param, nums, points, edges, html_output_filename) diff --git a/utils/km.py b/utils/km.py deleted file mode 100755 index 53024aa..0000000 --- a/utils/km.py +++ /dev/null @@ -1,390 +0,0 @@ -from __future__ import division -import numpy as np -from collections import defaultdict -import json -import itertools -from sklearn import cluster, preprocessing, manifold -from datetime import datetime -import sys - -class KeplerMapper(object): - # With this class you can build topological networks from (high-dimensional) data. - # - # 1) Fit a projection/lens/function to a dataset and transform it. - # For instance "mean_of_row(x) for x in X" - # 2) Map this projection with overlapping intervals/hypercubes. - # Cluster the points inside the interval - # (Note: we cluster on the inverse image/original data to lessen projection loss). - # If two clusters/nodes have the same members (due to the overlap), then: - # connect these with an edge. - # 3) Visualize the network using HTML and D3.js. - # - # functions - # --------- - # fit_transform: Create a projection (lens) from a dataset - # map: Apply Mapper algorithm on this projection and build a simplicial complex - # visualize: Turns the complex dictionary into a HTML/D3.js visualization - - def __init__(self, verbose=2): - self.verbose = verbose - - self.chunk_dist = [] - self.overlap_dist = [] - self.d = [] - self.nr_cubes = 0 - self.overlap_perc = 0 - self.clusterer = False - - def fit_transform(self, X, projection="sum", scaler=preprocessing.MinMaxScaler()): - # Creates the projection/lens from X. - # - # Input: X. Input features as a numpy array. - # Output: projected_X. original data transformed to a projection (lens). - # - # parameters - # ---------- - # projection: Projection parameter is either a string, - # a scikit class with fit_transform, like manifold.TSNE(), - # or a list of dimension indices. - # scaler: if None, do no scaling, else apply scaling to the projection - # Default: Min-Max scaling - - self.scaler = scaler - self.projection = str(projection) - - # Detect if projection is a class (for scikit-learn) - #if str(type(projection))[1:6] == "class": #TODO: de-ugly-fy - # reducer = projection - # if self.verbose > 0: - # try: - # projection.set_params(**{"verbose":self.verbose}) - # except: - # pass - # print("\n..Projecting data using: \n\t%s\n"%str(projection)) - # X = reducer.fit_transform(X) - - # Detect if projection is a string (for standard functions) - if isinstance(projection, str): - if self.verbose > 0: - print("\n..Projecting data using: %s"%(projection)) - # Stats lenses - if projection == "sum": # sum of row - X = np.sum(X, axis=1).reshape((X.shape[0],1)) - if projection == "mean": # mean of row - X = np.mean(X, axis=1).reshape((X.shape[0],1)) - if projection == "median": # mean of row - X = np.median(X, axis=1).reshape((X.shape[0],1)) - if projection == "max": # max of row - X = np.max(X, axis=1).reshape((X.shape[0],1)) - if projection == "min": # min of row - X = np.min(X, axis=1).reshape((X.shape[0],1)) - if projection == "std": # std of row - X = np.std(X, axis=1).reshape((X.shape[0],1)) - - if projection == "dist_mean": # Distance of x to mean of X - X_mean = np.mean(X, axis=0) - X = np.sum(np.sqrt((X - X_mean)**2), axis=1).reshape((X.shape[0],1)) - - # Detect if projection is a list (with dimension indices) - if isinstance(projection, list): - if self.verbose > 0: - print("\n..Projecting data using: %s"%(str(projection))) - X = X[:,np.array(projection)] - - # Scaling - if scaler is not None: - if self.verbose > 0: - print("\n..Scaling with: %s\n"%str(scaler)) - X = scaler.fit_transform(X) - - return X - - def map(self, projected_X, inverse_X=None, clusterer=cluster.DBSCAN(eps=0.5,min_samples=3), nr_cubes=10, overlap_perc=0.1): - # This maps the data to a simplicial complex. Returns a dictionary with nodes and links. - # - # Input: projected_X. A Numpy array with the projection/lens. - # Output: complex. A dictionary with "nodes", "links" and "meta information" - # - # parameters - # ---------- - # projected_X projected_X. A Numpy array with the projection/lens. Required. - # inverse_X Numpy array or None. If None then the projection itself is used for clustering. - # clusterer Scikit-learn API compatible clustering algorithm. Default: DBSCAN - # nr_cubes Int. The number of intervals/hypercubes to create. - # overlap_perc Float. The percentage of overlap "between" the intervals/hypercubes. - - start = datetime.now() - - # Helper function - def cube_coordinates_all(nr_cubes, nr_dimensions): - # Helper function to get origin coordinates for our intervals/hypercubes - # Useful for looping no matter the number of cubes or dimensions - # Example: if there are 4 cubes per dimension and 3 dimensions - # return the bottom left (origin) coordinates of 64 hypercubes, - # as a sorted list of Numpy arrays - # TODO: elegance-ify... - l = [] - for x in range(nr_cubes): - l += [x] * nr_dimensions - return [np.array(list(f)) for f in sorted(set(itertools.permutations(l,nr_dimensions)))] - - nodes = defaultdict(list) - links = defaultdict(list) - complex = {} - self.nr_cubes = nr_cubes - self.clusterer = clusterer - self.overlap_perc = overlap_perc - - if self.verbose > 0: - print("Mapping on data shaped %s using dimensions\n"%(str(projected_X.shape))) - - # If inverse image is not provided, we use the projection as the inverse image (suffer projection loss) - if inverse_X is None: - inverse_X = projected_X - - # We chop up the min-max column ranges into 'nr_cubes' parts - self.chunk_dist = (np.max(projected_X, axis=0) - np.min(projected_X, axis=0))/nr_cubes - - # We calculate the overlapping windows distance - self.overlap_dist = self.overlap_perc * self.chunk_dist - - # We find our starting point - self.d = np.min(projected_X, axis=0) - - # Use a dimension index array on the projected X - # (For now this uses the entire dimensionality, but we keep for experimentation) - di = np.array([x for x in range(projected_X.shape[1])]) - - # Prefix'ing the data with ID's - ids = np.array([x for x in range(projected_X.shape[0])]) - projected_X = np.c_[ids,projected_X] - inverse_X = np.c_[ids,inverse_X] - - # Subdivide the projected data X in intervals/hypercubes with overlap - if self.verbose > 0: - total_cubes = len(cube_coordinates_all(nr_cubes,projected_X.shape[1])) - print("Creating %s hypercubes."%total_cubes) - - for i, coor in enumerate(cube_coordinates_all(nr_cubes,di.shape[0])): - # Slice the hypercube - hypercube = projected_X[ np.invert(np.any((projected_X[:,di+1] >= self.d[di] + (coor * self.chunk_dist[di])) & - (projected_X[:,di+1] < self.d[di] + (coor * self.chunk_dist[di]) + self.chunk_dist[di] + self.overlap_dist[di]) == False, axis=1 )) ] - - if self.verbose > 1: - print("There are %s points in cube_%s / %s with starting range %s"% - (hypercube.shape[0],i,total_cubes,self.d[di] + (coor * self.chunk_dist[di]))) - - # If at least one sample inside the hypercube - if hypercube.shape[0] > 0: - # Cluster the data point(s) in the cube, skipping the id-column - # Note that we apply clustering on the inverse image (original data samples) that fall inside the cube. - inverse_x = inverse_X[[int(nn) for nn in hypercube[:,0]]] - - clusterer.fit(inverse_x[:,1:]) - - if self.verbose > 1: - print("Found %s clusters in cube_%s\n"%(np.unique(clusterer.labels_[clusterer.labels_ > -1]).shape[0],i)) - - #Now for every (sample id in cube, predicted cluster label) - for a in np.c_[hypercube[:,0],clusterer.labels_]: - if a[1] != -1: #if not predicted as noise - cluster_id = str(coor[0])+"_"+str(i)+"_"+str(a[1])+"_"+str(coor)+"_"+str(self.d[di] + (coor * self.chunk_dist[di])) # TODO: de-rudimentary-ify - nodes[cluster_id].append( int(a[0]) ) # Append the member id's as integers - else: - if self.verbose > 1: - print("Cube_%s is empty.\n"%(i)) - - # Create links when clusters from different hypercubes have members with the same sample id. - candidates = itertools.combinations(nodes.keys(),2) - for candidate in candidates: - # if there are non-unique members in the union - if len(nodes[candidate[0]]+nodes[candidate[1]]) != len(set(nodes[candidate[0]]+nodes[candidate[1]])): - links[candidate[0]].append( candidate[1] ) - - # Reporting - if self.verbose > 0: - nr_links = 0 - for k in links: - nr_links += len(links[k]) - print("\ncreated %s edges and %s nodes in %s."%(nr_links,len(nodes),str(datetime.now()-start))) - - complex["nodes"] = nodes - complex["links"] = links - complex["meta"] = self.projection - - return complex - - def visualize(self, complex, color_function="", path_html="mapper_visualization_output.html", title="My Data", - graph_link_distance=30, graph_gravity=0.1, graph_charge=-120, custom_tooltips=None, width_html=0, - height_html=0, show_tooltips=True, show_title=True, show_meta=True, res=0,gain=0,minimum=0,maximum=0): - # Turns the dictionary 'complex' in a html file with d3.js - # - # Input: complex. Dictionary (output from calling .map()) - # Output: a HTML page saved as a file in 'path_html'. - # - # parameters - # ---------- - # color_function string. Not fully implemented. Default: "" (distance to origin) - # path_html file path as string. Where to save the HTML page. - # title string. HTML page document title and first heading. - # graph_link_distance int. Edge length. - # graph_gravity float. "Gravity" to center of layout. - # graph_charge int. charge between nodes. - # custom_tooltips None or Numpy Array. You could use "y"-label array for this. - # width_html int. Width of canvas. Default: 0 (full width) - # height_html int. Height of canvas. Default: 0 (full height) - # show_tooltips bool. default:True - # show_title bool. default:True - # show_meta bool. default:True - - # Format JSON for D3 graph - json_s = {} - json_s["nodes"] = [] - json_s["links"] = [] - k2e = {} # a key to incremental int dict, used for id's when linking - - for e, k in enumerate(complex["nodes"]): - # Tooltip and node color formatting, TODO: de-mess-ify - if custom_tooltips is not None: - tooltip_s = "

Cluster %s

"%k + " ".join(str(custom_tooltips[complex["nodes"][k][0]]).split(" ")) - if maximum == minimum: - tooltip_i = 0 - else: - tooltip_i = int(30*(custom_tooltips[complex["nodes"][k][0]]-minimum)/(maximum-minimum)) - json_s["nodes"].append({"name": str(k), "tooltip": tooltip_s, "group": 2 * int(np.log(complex["nodes"][k][2])), "color": tooltip_i}) - else: - tooltip_s = "

Cluster %s

Contains %s members."%(k,len(complex["nodes"][k])) - json_s["nodes"].append({"name": str(k), "tooltip": tooltip_s, "group": 2 * int(np.log(len(complex["nodes"][k]))), "color": str(k.split("_")[0])}) - k2e[k] = e - for k in complex["links"]: - for link in complex["links"][k]: - json_s["links"].append({"source": k2e[k], "target":k2e[link],"value":1}) - - # Width and height of graph in HTML output - if width_html == 0: - width_css = "100%" - width_js = 'document.getElementById("holder").offsetWidth-20' - else: - width_css = "%spx" % width_html - width_js = "%s" % width_html - if height_html == 0: - height_css = "100%" - height_js = 'document.getElementById("holder").offsetHeight-20' - else: - height_css = "%spx" % height_html - height_js = "%s" % height_html - - # Whether to show certain UI elements or not - if show_tooltips == False: - tooltips_display = "display: none;" - else: - tooltips_display = "" - - if show_meta == False: - meta_display = "display: none;" - else: - meta_display = "" - - if show_title == False: - title_display = "display: none;" - else: - title_display = "" - - with open(path_html,"wb") as outfile: - html = """ - - - %s | KeplerMapper - - - -
-

%s

-

- Lens
%s

- Length of intervals
%s

- Overlap percentage
%s%%

- Color Function
%s -

-
- - """%(title,width_css, height_css, title_display, meta_display, tooltips_display, title,complex["meta"],res,gain*100,color_function,width_js,height_js,graph_charge,graph_link_distance,graph_gravity,json.dumps(json_s)) - outfile.write(html.encode("utf-8")) - if self.verbose > 0: - print("\nWrote d3.js graph to '%s'"%path_html) From bf0ea7c39a2024a57989b72d8a5c27422fb071da Mon Sep 17 00:00:00 2001 From: MathieuCarriere Date: Sat, 18 Nov 2023 21:17:37 +0100 Subject: [PATCH 4/7] new name for html --- utils/KeplerMapperVisuFromTxtFile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/KeplerMapperVisuFromTxtFile.py b/utils/KeplerMapperVisuFromTxtFile.py index 0b0ce3a..0fe9bfc 100755 --- a/utils/KeplerMapperVisuFromTxtFile.py +++ b/utils/KeplerMapperVisuFromTxtFile.py @@ -1,7 +1,7 @@ #!/usr/bin/env python import argparse -from gudhi.cover_complex import save_to_html_ +from gudhi.cover_complex import _save_to_html """This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. @@ -40,4 +40,4 @@ f.close() -save_to_html_(dat, lens, color, param, nums, points, edges, html_output_filename) +_save_to_html(dat, lens, color, param, nums, points, edges, html_output_filename) From fbf211189f9006c0970b9fbea8582da872809312 Mon Sep 17 00:00:00 2001 From: MathieuCarriere Date: Mon, 20 Nov 2023 21:51:55 +0100 Subject: [PATCH 5/7] updated API --- utils/KeplerMapperVisuFromTxtFile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/KeplerMapperVisuFromTxtFile.py b/utils/KeplerMapperVisuFromTxtFile.py index 0fe9bfc..4f5f42a 100755 --- a/utils/KeplerMapperVisuFromTxtFile.py +++ b/utils/KeplerMapperVisuFromTxtFile.py @@ -40,4 +40,4 @@ f.close() -_save_to_html(dat, lens, color, param, nums, points, edges, html_output_filename) +_save_to_html(dat, lens, color, param, points, edges, html_output_filename) From 09ae397110b2828f9e3d0e10ef2c1d4ca16eab5c Mon Sep 17 00:00:00 2001 From: MathieuCarriere Date: Wed, 24 Jan 2024 15:07:51 +0100 Subject: [PATCH 6/7] update requirements + verbose --- .binder/requirements.txt | 2 +- Tuto-GUDHI-cover-complex.ipynb | 3574 +------------------------------- 2 files changed, 43 insertions(+), 3533 deletions(-) diff --git a/.binder/requirements.txt b/.binder/requirements.txt index 7bd587c..fa765e7 100644 --- a/.binder/requirements.txt +++ b/.binder/requirements.txt @@ -8,7 +8,7 @@ tensorflow-addons plotly pot networkx -gudhi!=3.7.0 # cf. https://github.com/GUDHI/TDA-tutorial/issues/65 +gudhi>=3.9.0 # cf. https://github.com/GUDHI/TDA-tutorial/issues/65 torch tqdm eagerpy diff --git a/Tuto-GUDHI-cover-complex.ipynb b/Tuto-GUDHI-cover-complex.ipynb index a774132..483ab20 100644 --- a/Tuto-GUDHI-cover-complex.ipynb +++ b/Tuto-GUDHI-cover-complex.ipynb @@ -29,6 +29,15 @@ "%matplotlib notebook" ] }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "verbose = False # set it to True for debug information" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -59,7 +68,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -69,7 +78,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "metadata": { "scrolled": false }, @@ -1062,7 +1071,7 @@ { "data": { "text/html": [ - "" + "" ], "text/plain": [ "" @@ -1103,7 +1112,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -1126,1741 +1135,23 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "cover_complex = GraphInducedComplex(\n", " input_type='point cloud', cover='voronoi', min_points_per_node=0,\n", " graph=\"rips\", rips_threshold=None, N=100, beta=0., C=10,\n", - " voronoi_samples=100, verbose=True)" + " voronoi_samples=100, verbose=verbose)" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "metadata": { "scrolled": true }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "15910 points in R^3\n", - "Subsampling 3786 points\n", - "Computing distances...\n", - "\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "100%\n", - "delta = 0.0613632\n", - "Computing geodesic distances to seed 0...\n", - "Computing geodesic distances to seed 1...\n", - "Computing geodesic distances to seed 2...\n", - "Computing geodesic distances to seed 3...\n", - "Computing geodesic distances to seed 4...\n", - "Computing geodesic distances to seed 5...\n", - "Computing geodesic distances to seed 6...\n", - "Computing geodesic distances to seed 7...\n", - "Computing geodesic distances to seed 8...\n", - "Computing geodesic distances to seed 9...\n", - "Computing geodesic distances to seed 10...\n", - "Computing geodesic distances to seed 11...\n", - "Computing geodesic distances to seed 12...\n", - "Computing geodesic distances to seed 13...\n", - "Computing geodesic distances to seed 14...\n", - "Computing geodesic distances to seed 15...\n", - "Computing geodesic distances to seed 16...\n", - "Computing geodesic distances to seed 17...\n", - "Computing geodesic distances to seed 18...\n", - "Computing geodesic distances to seed 19...\n", - "Computing geodesic distances to seed 20...\n", - "Computing geodesic distances to seed 21...\n", - "Computing geodesic distances to seed 22...\n", - "Computing geodesic distances to seed 23...\n", - "Computing geodesic distances to seed 24...\n", - "Computing geodesic distances to seed 25...\n", - "Computing geodesic distances to seed 26...\n", - "Computing geodesic distances to seed 27...\n", - "Computing geodesic distances to seed 28...\n", - "Computing geodesic distances to seed 29...\n", - "Computing geodesic distances to seed 30...\n", - "Computing geodesic distances to seed 31...\n", - "Computing geodesic distances to seed 32...\n", - "Computing geodesic distances to seed 33...\n", - "Computing geodesic distances to seed 34...\n", - "Computing geodesic distances to seed 35...\n", - "Computing geodesic distances to seed 36...\n", - "Computing geodesic distances to seed 37...\n", - "Computing geodesic distances to seed 38...\n", - "Computing geodesic distances to seed 39...\n", - "Computing geodesic distances to seed 40...\n", - "Computing geodesic distances to seed 41...\n", - "Computing geodesic distances to seed 42...\n", - "Computing geodesic distances to seed 43...\n", - "Computing geodesic distances to seed 44...\n", - "Computing geodesic distances to seed 45...\n", - "Computing geodesic distances to seed 46...\n", - "Computing geodesic distances to seed 47...\n", - "Computing geodesic distances to seed 48...\n", - "Computing geodesic distances to seed 49...\n", - "Computing geodesic distances to seed 50...\n", - "Computing geodesic distances to seed 51...\n", - "Computing geodesic distances to seed 52...\n", - "Computing geodesic distances to seed 53...\n", - "Computing geodesic distances to seed 54...\n", - "Computing geodesic distances to seed 55...\n", - "Computing geodesic distances to seed 56...\n", - "Computing geodesic distances to seed 57...\n", - "Computing geodesic distances to seed 58...\n", - "Computing geodesic distances to seed 59...\n", - "Computing geodesic distances to seed 60...\n", - "Computing geodesic distances to seed 61...\n", - "Computing geodesic distances to seed 62...\n", - "Computing geodesic distances to seed 63...\n", - "Computing geodesic distances to seed 64...\n", - "Computing geodesic distances to seed 65...\n", - "Computing geodesic distances to seed 66...\n", - "Computing geodesic distances to seed 67...\n", - "Computing geodesic distances to seed 68...\n", - "Computing geodesic distances to seed 69...\n", - "Computing geodesic distances to seed 70...\n", - "Computing geodesic distances to seed 71...\n", - "Computing geodesic distances to seed 72...\n", - "Computing geodesic distances to seed 73...\n", - "Computing geodesic distances to seed 74...\n", - "Computing geodesic distances to seed 75...\n", - "Computing geodesic distances to seed 76...\n", - "Computing geodesic distances to seed 77...\n", - "Computing geodesic distances to seed 78...\n", - "Computing geodesic distances to seed 79...\n", - "Computing geodesic distances to seed 80...\n", - "Computing geodesic distances to seed 81...\n", - "Computing geodesic distances to seed 82...\n", - "Computing geodesic distances to seed 83...\n", - "Computing geodesic distances to seed 84...\n", - "Computing geodesic distances to seed 85...\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Computing geodesic distances to seed 86...\n", - "Computing geodesic distances to seed 87...\n", - "Computing geodesic distances to seed 88...\n", - "Computing geodesic distances to seed 89...\n", - "Computing geodesic distances to seed 90...\n", - "Computing geodesic distances to seed 91...\n", - "Computing geodesic distances to seed 92...\n", - "Computing geodesic distances to seed 93...\n", - "Computing geodesic distances to seed 94...\n", - "Computing geodesic distances to seed 95...\n", - "Computing geodesic distances to seed 96...\n", - "Computing geodesic distances to seed 97...\n", - "Computing geodesic distances to seed 98...\n", - "Computing geodesic distances to seed 99...\n" - ] - } - ], + "outputs": [], "source": [ "_ = cover_complex.fit(X, filter=height, color=height)" ] @@ -2874,1664 +1165,21 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "cover_complex = GraphInducedComplex(\n", " input_type='point cloud', cover='functional', min_points_per_node=0,\n", " graph=\"rips\", rips_threshold=None, N=100, beta=0., C=10,\n", - " resolution=None, gain=0., verbose=True)" + " resolution=None, gain=0., verbose=verbose)" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "15910 points in R^3\n", - "Subsampling 3786 points\n", - "Computing distances...\n", - "\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "0%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "10%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "20%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "30%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "40%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "50%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "60%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "70%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "80%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "90%\r", - "100%\n", - "delta = 0.0616142\n", - "resolution = 0.061597\n", - "Min function value = -0.846853 and Max function value = 0.819366\n", - "Interval 0 = [-0.846853, -0.785256]\n", - "Interval 1 = [-0.785256, -0.723659]\n", - "Interval 2 = [-0.723659, -0.662062]\n", - "Interval 3 = [-0.662062, -0.600465]\n", - "Interval 4 = [-0.600465, -0.538868]\n", - "Interval 5 = [-0.538868, -0.477271]\n", - "Interval 6 = [-0.477271, -0.415674]\n", - "Interval 7 = [-0.415674, -0.354077]\n", - "Interval 8 = [-0.354077, -0.29248]\n", - "Interval 9 = [-0.29248, -0.230883]\n", - "Interval 10 = [-0.230883, -0.169286]\n", - "Interval 11 = [-0.169286, -0.107689]\n", - "Interval 12 = [-0.107689, -0.046092]\n", - "Interval 13 = [-0.046092, 0.015505]\n", - "Interval 14 = [0.015505, 0.077102]\n", - "Interval 15 = [0.077102, 0.138699]\n", - "Interval 16 = [0.138699, 0.200296]\n", - "Interval 17 = [0.200296, 0.261893]\n", - "Interval 18 = [0.261893, 0.32349]\n", - "Interval 19 = [0.32349, 0.385087]\n", - "Interval 20 = [0.385087, 0.446684]\n", - "Interval 21 = [0.446684, 0.508281]\n", - "Interval 22 = [0.508281, 0.569878]\n", - "Interval 23 = [0.569878, 0.631475]\n", - "Interval 24 = [0.631475, 0.693072]\n", - "Interval 25 = [0.693072, 0.754669]\n", - "Interval 26 = [0.754669, 0.819366]\n", - "Computing preimages...\n", - "Computing connected components...\n" - ] - } - ], + "outputs": [], "source": [ "_ = cover_complex.fit(X, filter=height, color=height)" ] @@ -4545,7 +1193,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -4553,12 +1201,12 @@ " input_type='point cloud', min_points_per_node=0,\n", " clustering=None, N=100, beta=0., C=10,\n", " filter_bnds=None, resolutions=None, gains=None,\n", - " verbose=True)" + " verbose=verbose)" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -5590,7 +2238,7 @@ { "data": { "text/html": [ - "" + "" ], "text/plain": [ "" @@ -5638,42 +2286,14 @@ "cover_complex = GraphInducedComplex(\n", " input_type='distance matrix', cover='functional', min_points_per_node=0,\n", " graph=\"rips\", rips_threshold=None, N=100, beta=0., C=10,\n", - " resolution=None, gain=0., verbose=True)" + " resolution=None, gain=0., verbose=verbose)" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "15910 points in R^0\n", - "Subsampling 3786 points\n", - "delta = 0.061323\n", - "resolution = 0.0612461\n", - "Min function value = 0.96263 and Max function value = 1.86879\n", - "Interval 0 = [0.96263, 1.02388]\n", - "Interval 1 = [1.02388, 1.08512]\n", - "Interval 2 = [1.08512, 1.14637]\n", - "Interval 3 = [1.14637, 1.20761]\n", - "Interval 4 = [1.20761, 1.26886]\n", - "Interval 5 = [1.26886, 1.33011]\n", - "Interval 6 = [1.33011, 1.39135]\n", - "Interval 7 = [1.39135, 1.4526]\n", - "Interval 8 = [1.4526, 1.51384]\n", - "Interval 9 = [1.51384, 1.57509]\n", - "Interval 10 = [1.57509, 1.63634]\n", - "Interval 11 = [1.63634, 1.69758]\n", - "Interval 12 = [1.69758, 1.75883]\n", - "Interval 13 = [1.75883, 1.86879]\n", - "Computing preimages...\n", - "Computing connected components...\n" - ] - } - ], + "outputs": [], "source": [ "_ = cover_complex.fit(D, filter=ecc, color=ecc)" ] @@ -5694,124 +2314,14 @@ "cover_complex = GraphInducedComplex(\n", " input_type='distance matrix', cover='voronoi', min_points_per_node=0,\n", " graph=\"rips\", rips_threshold=None, N=100, beta=0., C=10,\n", - " voronoi_samples=100, verbose=True)" + " voronoi_samples=100, verbose=verbose)" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "15910 points in R^0\n", - "Subsampling 3786 points\n", - "delta = 0.0616358\n", - "Computing geodesic distances to seed 0...\n", - "Computing geodesic distances to seed 1...\n", - "Computing geodesic distances to seed 2...\n", - "Computing geodesic distances to seed 3...\n", - "Computing geodesic distances to seed 4...\n", - "Computing geodesic distances to seed 5...\n", - "Computing geodesic distances to seed 6...\n", - "Computing geodesic distances to seed 7...\n", - "Computing geodesic distances to seed 8...\n", - "Computing geodesic distances to seed 9...\n", - "Computing geodesic distances to seed 10...\n", - "Computing geodesic distances to seed 11...\n", - "Computing geodesic distances to seed 12...\n", - "Computing geodesic distances to seed 13...\n", - "Computing geodesic distances to seed 14...\n", - "Computing geodesic distances to seed 15...\n", - "Computing geodesic distances to seed 16...\n", - "Computing geodesic distances to seed 17...\n", - "Computing geodesic distances to seed 18...\n", - "Computing geodesic distances to seed 19...\n", - "Computing geodesic distances to seed 20...\n", - "Computing geodesic distances to seed 21...\n", - "Computing geodesic distances to seed 22...\n", - "Computing geodesic distances to seed 23...\n", - "Computing geodesic distances to seed 24...\n", - "Computing geodesic distances to seed 25...\n", - "Computing geodesic distances to seed 26...\n", - "Computing geodesic distances to seed 27...\n", - "Computing geodesic distances to seed 28...\n", - "Computing geodesic distances to seed 29...\n", - "Computing geodesic distances to seed 30...\n", - "Computing geodesic distances to seed 31...\n", - "Computing geodesic distances to seed 32...\n", - "Computing geodesic distances to seed 33...\n", - "Computing geodesic distances to seed 34...\n", - "Computing geodesic distances to seed 35...\n", - "Computing geodesic distances to seed 36...\n", - "Computing geodesic distances to seed 37...\n", - "Computing geodesic distances to seed 38...\n", - "Computing geodesic distances to seed 39...\n", - "Computing geodesic distances to seed 40...\n", - "Computing geodesic distances to seed 41...\n", - "Computing geodesic distances to seed 42...\n", - "Computing geodesic distances to seed 43...\n", - "Computing geodesic distances to seed 44...\n", - "Computing geodesic distances to seed 45...\n", - "Computing geodesic distances to seed 46...\n", - "Computing geodesic distances to seed 47...\n", - "Computing geodesic distances to seed 48...\n", - "Computing geodesic distances to seed 49...\n", - "Computing geodesic distances to seed 50...\n", - "Computing geodesic distances to seed 51...\n", - "Computing geodesic distances to seed 52...\n", - "Computing geodesic distances to seed 53...\n", - "Computing geodesic distances to seed 54...\n", - "Computing geodesic distances to seed 55...\n", - "Computing geodesic distances to seed 56...\n", - "Computing geodesic distances to seed 57...\n", - "Computing geodesic distances to seed 58...\n", - "Computing geodesic distances to seed 59...\n", - "Computing geodesic distances to seed 60...\n", - "Computing geodesic distances to seed 61...\n", - "Computing geodesic distances to seed 62...\n", - "Computing geodesic distances to seed 63...\n", - "Computing geodesic distances to seed 64...\n", - "Computing geodesic distances to seed 65...\n", - "Computing geodesic distances to seed 66...\n", - "Computing geodesic distances to seed 67...\n", - "Computing geodesic distances to seed 68...\n", - "Computing geodesic distances to seed 69...\n", - "Computing geodesic distances to seed 70...\n", - "Computing geodesic distances to seed 71...\n", - "Computing geodesic distances to seed 72...\n", - "Computing geodesic distances to seed 73...\n", - "Computing geodesic distances to seed 74...\n", - "Computing geodesic distances to seed 75...\n", - "Computing geodesic distances to seed 76...\n", - "Computing geodesic distances to seed 77...\n", - "Computing geodesic distances to seed 78...\n", - "Computing geodesic distances to seed 79...\n", - "Computing geodesic distances to seed 80...\n", - "Computing geodesic distances to seed 81...\n", - "Computing geodesic distances to seed 82...\n", - "Computing geodesic distances to seed 83...\n", - "Computing geodesic distances to seed 84...\n", - "Computing geodesic distances to seed 85...\n", - "Computing geodesic distances to seed 86...\n", - "Computing geodesic distances to seed 87...\n", - "Computing geodesic distances to seed 88...\n", - "Computing geodesic distances to seed 89...\n", - "Computing geodesic distances to seed 90...\n", - "Computing geodesic distances to seed 91...\n", - "Computing geodesic distances to seed 92...\n", - "Computing geodesic distances to seed 93...\n", - "Computing geodesic distances to seed 94...\n", - "Computing geodesic distances to seed 95...\n", - "Computing geodesic distances to seed 96...\n", - "Computing geodesic distances to seed 97...\n", - "Computing geodesic distances to seed 98...\n", - "Computing geodesic distances to seed 99...\n" - ] - } - ], + "outputs": [], "source": [ "_ = cover_complex.fit(D, filter=ecc, color=ecc)" ] @@ -5832,7 +2342,7 @@ "cover_complex = MapperComplex(\n", " input_type='distance matrix', min_points_per_node=0,\n", " clustering=None, N=100, beta=0., C=10,\n", - " filter_bnds=None, resolutions=None, gains=None, verbose=True)" + " filter_bnds=None, resolutions=None, gains=None, verbose=verbose)" ] }, { @@ -5876,7 +2386,7 @@ "cover_complex = MapperComplex(\n", " input_type='point cloud', min_points_per_node=0,\n", " clustering=None, N=100, beta=0., C=10,\n", - " filter_bnds=None, resolutions=[20,2], gains=None, verbose=True)" + " filter_bnds=None, resolutions=[20,2], gains=None, verbose=verbose)" ] }, { @@ -5931,7 +2441,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 27, "metadata": {}, "outputs": [ { @@ -6947,7 +3457,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 28, "metadata": {}, "outputs": [ { @@ -7954,7 +4464,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 29, "metadata": {}, "outputs": [], "source": [ @@ -7970,7 +4480,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 30, "metadata": {}, "outputs": [ { @@ -7987,7 +4497,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 31, "metadata": {}, "outputs": [ { @@ -8005,10 +4515,10 @@ " " ], "text/plain": [ - "" + "" ] }, - "execution_count": 9, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" } @@ -8027,7 +4537,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 32, "metadata": {}, "outputs": [], "source": [ @@ -8036,7 +4546,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 33, "metadata": {}, "outputs": [ { @@ -8075,7 +4585,7 @@ " input_type='point cloud', min_points_per_node=0,\n", " clustering=None, N=100, beta=0., C=10,\n", " filter_bnds=None, resolutions=None, gains=None,\n", - " verbose=True)" + " verbose=verbose)" ] }, { @@ -9385,7 +5895,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:46<00:00, 2.14it/s]\n" + "100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:39<00:00, 2.55it/s]\n" ] } ], From d83fd60af682e5e2cce1db3efdbecfc46292ee67 Mon Sep 17 00:00:00 2001 From: Vincent Rouvreau <10407034+VincentRouvreau@users.noreply.github.com> Date: Fri, 26 Jan 2024 17:17:59 +0100 Subject: [PATCH 7/7] Modify the comment --- .binder/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.binder/requirements.txt b/.binder/requirements.txt index fa765e7..722658a 100644 --- a/.binder/requirements.txt +++ b/.binder/requirements.txt @@ -8,7 +8,7 @@ tensorflow-addons plotly pot networkx -gudhi>=3.9.0 # cf. https://github.com/GUDHI/TDA-tutorial/issues/65 +gudhi>=3.9.0 # Tuto-GUDHI-cover-complex.ipynb requires sklearn interfaces torch tqdm eagerpy