Skip to content

Commit 759ae88

Browse files
committed
fixing typos
1 parent a9d02db commit 759ae88

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

demos/Segmenting_Greek_coins.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
"This demo follows the sklearn image segmentation example available at [https://scikit-learn.org/stable/auto_examples/cluster/plot_coin_segmentation.html](https://scikit-learn.org/stable/auto_examples/cluster/plot_coin_segmentation.html)\n",
1111
"\n",
1212
"\n",
13-
"That example uses spectral clustering to identify connected pixel regions of similar grayscale in an image. Spectral clustering is well suited for image segmentation tasks as it naturally works with graph Laplacians that can encode neighborhood information about nodes (in this case, the nodes are the pixels of an image). In such a way, the method favours clustering nearby pixels together, tending to produce connected regions.\n",
13+
"That example uses spectral clustering to identify connected pixel regions of similar grayscale in an image. Spectral clustering is well suited for image segmentation tasks as it naturally works with graph Laplacians that can encode neighborhood information about nodes (in this case, the nodes are the pixels of an image). In such a way, the method favours clustering nearby pixels together, tending to produce connected 2D regions in an image.\n",
1414
"\n",
1515
"\n",
16-
"CLASSIX is primarily a distance-based clustering method, but we can encode affinity information of pixels as additional features of the data points. More precisely, we can represent each grayscale pixel as a 3D point of the form \\texttt{[c,scl*x,scl*y]} , where <samp>c</samp> is the colour value, and <samp>x, y</samp> are the pixel coordinates. The scaling parameter <samp>scl</samp> is used to control the relative weighting between colour and position of a pixel.\n",
16+
"CLASSIX is primarily a distance-based clustering method, but we can encode affinity information of pixels as additional features of the data points. More precisely, we can represent each grayscale pixel as a 3D point of the form [c,scl*x,scl*y], where <samp>c</samp> is the colour value, and <samp>x,y</samp> are the pixel coordinates. The scaling parameter <samp>scl</samp> is used to control the relative weighting between colour and position of a pixel.\n",
1717
"\n",
1818
"\n",
19-
"In this example we make use of MATLAB's Python interface to load a photos of Greek coins and preprocess (smooth, downsample) it exactly as in the sklearn image segmentation example.\n",
19+
"In this example we make use of MATLAB's Python interface to load the Greek coins image and preprocess (smooth, downsample) it exactly as in the sklearn image segmentation example.\n",
2020
""
2121
]
2222
},
@@ -104,7 +104,7 @@
104104
"This took just under half a second. Note that 25 clusters were computed. These correspond to the 24 coins plus the image background.\n",
105105
"\n",
106106
"\n",
107-
"Calling CLASSIX's explain method leads to fascinating output: it essentially regenerates the original image without \"knowing\" that the provided 3D data matrix corresponded to an image!\n",
107+
"Calling CLASSIX's <samp>explain</samp> method leads to fascinating output: it essentially regenerates the original image without \"knowing\" that the provided 3D data matrix corresponded to an image!\n",
108108
""
109109
]
110110
},
@@ -150,7 +150,7 @@
150150
"metadata": {},
151151
"source": [
152152
"\n",
153-
"We can also reshape the label vector back to the original image size and plot that image:\n",
153+
"We can also reshape the <samp>labels</samp> returned by CLASSIX back to the original image size and plot that image:\n",
154154
""
155155
]
156156
},
@@ -194,7 +194,7 @@
194194
"to segment the Greek coin image to similar quality.\n",
195195
"\n",
196196
"\n",
197-
"It is a common observation that CLASSIX's MATLAB implementation is slightly faster than Python. Compared to spectral clustering in Python, using sklearn's <samp>spectral_clustering</samp> method with the <samp>cluster_qr</samp> option (the fastest we have tried), CLASSIX.PY is about five times faster.\n",
197+
"It is a common observation that CLASSIX's MATLAB implementation is slightly faster than Python. In Python, using sklearn's <samp>spectral_clustering</samp> method with the <samp>cluster_qr</samp> option (the fastest we have tried), CLASSIX.PY is about five times faster than spectral clustering on this example.\n",
198198
"\n",
199199
""
200200
]

demos/Segmenting_Greek_coins.mlx

-1 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)