|
5 | 5 |
|
6 | 6 |
|
7 | 7 | <p align="justify">
|
8 |
| - a Numpy vectorized implementation written in Python of some of the fuzzy clustering algorithms which includes the following: |
| 8 | + a Numpy vectorized implementation written in Python of some of the fuzzy clustering algorithms, it includes the following: |
9 | 9 | </p>
|
10 | 10 |
|
11 | 11 | <ul>
|
@@ -38,23 +38,47 @@ in non-fuzzy clustering, data is divided into distinct clusters, where each data
|
38 | 38 |
|
39 | 39 |
|
40 | 40 | <p> before installing the package its highly recommended that you create a virtual environment, there are many tools which are capable of that, such as conda , venv ...etc.
|
41 |
| -here is an example of doing so using virtualenv: </p> |
| 41 | + here is an example of doing so using virtualenv: </p> |
42 | 42 |
|
43 |
| -<p> first you install virtualenv </p> |
| 43 | +<p> First you install virtualenv </p> |
44 | 44 | <pre><code>$ pip install virtualenv </code></pre>
|
45 | 45 |
|
46 |
| -<p> and then create a folder where you can create your environment and cd into it and then execute the following command: </p> |
| 46 | +<p> Then create a folder where you can create your environment and cd into it and then execute the following command: </p> |
47 | 47 | <pre><code>$ virtualenv env </code></pre>
|
48 | 48 |
|
49 |
| -<p> now activate the environment </p> |
| 49 | +<p> Now activate the environment </p> |
50 | 50 | <pre><code>$ \env\Scripts\activate.bat </code></pre>
|
51 | 51 |
|
52 |
| -<p> to Install the Package from PyPi, install pip then run the following code: </p> |
| 52 | +<p> To Install the Package from PyPi, install pip then run the following code: </p> |
53 | 53 | <pre><code>$ pip install Fuzzy_Clustering </code></pre>
|
54 | 54 |
|
55 | 55 |
|
56 | 56 | <p> OR if you want to also include dependencies which are necessery for running the examples, you must run the following:(Recommended) </p>
|
57 | 57 | <pre><code>$ pip install Fuzzy_Clustering[examples] </code></pre>
|
58 | 58 |
|
| 59 | +<h2 id="Usage"> :pencil: Usage</h2> |
| 60 | + |
| 61 | +<p> You can clone the repository and check into the examples folder, |
| 62 | + it provides two examples.</p> |
| 63 | + |
| 64 | +<p> The first example demonstrates how one can use fuzzy clustering to segment the color values within an into several distinct groups, |
| 65 | +in the example below,Fuzzy C-Means was used with a parameterof 10 clusters. </p> |
| 66 | + |
| 67 | +<pre><code>$ python fuzzy_image_segmentation.py </code></pre> |
| 68 | + |
| 69 | + |
| 70 | +<p align="center"> |
| 71 | + <img src="res/segmentation.JPG" alt="segmentation results" height="282px" width="550px"> |
| 72 | +</p> |
| 73 | + |
| 74 | +<p> The second example demonstrates the results of running the algorithm on a set of random scattered data points, |
| 75 | +the algorithm was run several times with a varying number of clusters parameter.</p> |
| 76 | + |
| 77 | +<pre><code>$ python random_data_clustering.py </code></pre> |
| 78 | + |
| 79 | +<p align="center"> |
| 80 | + <img src="res/random_clustering.JPG" alt="random points clustering" height="282px" width="550px"> |
| 81 | +</p> |
| 82 | + |
59 | 83 |
|
60 | 84 |
|
0 commit comments