Skip to content

Commit

Permalink
Merge pull request #31 from panagiotisanagnostou/new_features
Browse files Browse the repository at this point in the history
Inicorporation of the t-SNE method in projection based algorithms and documentation update
  • Loading branch information
panagiotisanagnostou authored Apr 25, 2023
2 parents 89eaaf0 + 3312f10 commit 667e311
Show file tree
Hide file tree
Showing 11 changed files with 172 additions and 113 deletions.
8 changes: 1 addition & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,4 @@ generation in the repository folder docs.

## Contact

For more information or any questions on the documentation you can contact us in
the email

## Attribution

This guide is based on the **contributing-gen
**. [Make your own](https://github.com/bttger/contributing-gen)!
For more information or any questions you can contact the maintainer [Panagiotis Anagnostou](mailto:[email protected]).
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![codecov](https://codecov.io/gh/panagiotisanagnostou/HiPart/branch/main/graph/badge.svg?token=FHoZrLjqfj)](https://codecov.io/gh/panagiotisanagnostou/HiPart)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/60c751d914474e288b369461e6e3466a)](https://www.codacy.com/gh/panagiotisanagnostou/HiPart/dashboard?utm_source=github.com&utm_medium=referral&utm_content=panagiotisanagnostou/HiPart&utm_campaign=Badge_Grade)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/panagiotisanagnostou/HiPart/blob/main/LICENSE)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.05024/status.svg)](https://doi.org/10.21105/joss.05024)

HiPart: Hierarchical divisive clustering toolbox
================================================
Expand All @@ -19,15 +20,15 @@ pip install HiPart

Simple Example Execution
------------------------
The example bellow is the simplest form of the package's execution. Shortly, it shows the creation of synthetic clustering dataset containing 6 clusters. Afterwards it is clustered with the dePDDP algorithm and only the cluster labels are returned.
The example bellow is the simplest form of the package's execution. Shortly, it shows the creation of synthetic clustering dataset containing 6 clusters. Afterwards it is clustered with the DePDDP algorithm and only the cluster labels are returned.

```python
from HiPart.clustering import dePDDP
from HiPart.clustering import DePDDP
from sklearn.datasets import make_blobs

X, y = make_blobs(n_samples=1500, centers=6, random_state=0)

clustered_class = dePDDP(max_clusters_number=6).fit_predict(X)
clustered_class = DePDDP(max_clusters_number=6).fit_predict(X)
```

Users can find complete execution examples for all the algorithms of the HiPart package in the [clustering_example](https://github.com/panagiotisanagnostou/HiPart/blob/main/examples/clustering_example.py) file of the repository. Also, the users can find a KernelPCA method usage example in the [clustering_with_kpca_example](https://github.com/panagiotisanagnostou/HiPart/blob/main/examples/clustering_with_kpca_example.py) file of the repository. Finally, the file [interactive_visualization_example](https://github.com/panagiotisanagnostou/HiPart/blob/main/examples/interactive_visualization_example.py) contains an example execution of the interactive visualization. The instructions for the interactive visualization GUI can be found with the execution of this visualization.
Expand All @@ -40,15 +41,18 @@ Citation
--------

```bibtex
@misc{anagnostou2022hipart,
doi = {10.48550/ARXIV.2209.08680},
url = {https://arxiv.org/abs/2209.08680},
author = {Anagnostou, Panagiotis and Tasoulis, Sotiris and Plagianakos, Vassilis and Tasoulis, Dimitris},
keywords = {Machine Learning (stat.ML), Artificial Intelligence (cs.AI), Machine Learning (cs.LG), FOS: Computer and information sciences, FOS: Computer and information sciences},
@article{Anagnostou2023HiPart,
title = {HiPart: Hierarchical Divisive Clustering Toolbox},
publisher = {arXiv},
year = {2022},
}
author = {Panagiotis Anagnostou and Sotiris Tasoulis and Vassilis P. Plagianakos and Dimitris Tasoulis},
year = {2023},
journal = {Journal of Open Source Software},
publisher = {The Open Journal},
volume = {8},
number = {84},
pages = {5024},
doi = {10.21105/joss.05024},
url = {https://doi.org/10.21105/joss.05024}
}
```

Acknowledgments
Expand All @@ -60,3 +64,4 @@ Collaborators
Dimitris Tasoulis [:email:](mailto:[email protected])
Panagiotis Anagnostou [:email:](mailto:[email protected])
Sotiris Tasoulis [:email:](mailto:[email protected])
Vassilis Plagianakos [:email:](mailto:[email protected])
27 changes: 12 additions & 15 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Welcome to HiPart's documentation!
:target: https://www.codacy.com/gh/panagiotisanagnostou/HiPart/dashboard?utm_source=github.com&utm_medium=referral&utm_content=panagiotisanagnostou/HiPart&utm_campaign=Badge_Grade
.. image:: https://img.shields.io/badge/License-MIT-yellow.svg
:target: https://github.com/panagiotisanagnostou/HiPart/blob/main/LICENSE
.. image:: https://joss.theoj.org/papers/10.21105/joss.05024/status.svg
:target: https://doi.org/10.21105/joss.05024

HiPart: Hierarchical divisive clustering toolbox
------------------------------------------------
Expand Down Expand Up @@ -50,14 +52,17 @@ Citation

.. code-block:: bibtex
@misc{anagnostou2022hipart,
doi = {10.48550/ARXIV.2209.08680},
url = {https://arxiv.org/abs/2209.08680},
author = {Anagnostou, Panagiotis and Tasoulis, Sotiris and Plagianakos, Vassilis and Tasoulis, Dimitris},
keywords = {Machine Learning (stat.ML), Artificial Intelligence (cs.AI), Machine Learning (cs.LG), FOS: Computer and information sciences, FOS: Computer and information sciences},
@article{Anagnostou2023HiPart,
title = {HiPart: Hierarchical Divisive Clustering Toolbox},
publisher = {arXiv},
year = {2022},
author = {Panagiotis Anagnostou and Sotiris Tasoulis and Vassilis P. Plagianakos and Dimitris Tasoulis},
year = {2023},
journal = {Journal of Open Source Software},
publisher = {The Open Journal},
volume = {8},
number = {84},
pages = {5024},
doi = {10.21105/joss.05024},
url = {https://doi.org/10.21105/joss.05024}
}
Expand All @@ -66,14 +71,6 @@ Acknowledgments
This project has received funding from the Hellenic Foundation for Research and Innovation (HFRI), under grant agreement No 1901.


Collaborators
-------------
Dimitris Tasoulis [:email:]([email protected])
Panagiotis Anagnostou [:email:]([email protected])
Sotiris Tasoulis [:email:]([email protected])



.. toctree::
:maxdepth: 2
:hidden:
Expand Down
2 changes: 1 addition & 1 deletion examples/interactive_visualization_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
).fit(X)

# interactive visualization execution
int_viz.main(depddp)
int_viz.main(depddp)
2 changes: 0 additions & 2 deletions paper_scripts/__utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
subprocess.check_call([sys.executable, "-m", "pip", "install", "h5py"])
import h5py
import numpy as np
import re
import string
import time
import traceback
import warnings
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

__version__ = "0.3.1"
__version__ = "0.3.2"

setuptools.setup(
name="HiPart",
Expand Down Expand Up @@ -32,7 +32,9 @@
"dash>=2.0",
],
project_urls={
"Bug Tracker": "https://github.com/panagiotisanagnostou/HiPart",
"Documentation": "https://hipart.readthedocs.io/en/latest/",
"Source Code": "https://github.com/panagiotisanagnostou/HiPart/",
"Bug Tracker": "https://github.com/panagiotisanagnostou/HiPart/issues",
},
classifiers=[
"Development Status :: 4 - Beta",
Expand Down
2 changes: 1 addition & 1 deletion src/HiPart/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from KDEpy.TreeKDE import TreeKDE
from KDEpy.FFTKDE import FFTKDE

__version__ = "0.3.1"
__version__ = "0.3.2"
__author__ = "Panagiotis Anagnostou"

TreeKDE = TreeKDE
Expand Down
7 changes: 7 additions & 0 deletions src/HiPart/__utility_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import warnings

from KDEpy import FFTKDE
from sklearn.manifold import TSNE
from sklearn.decomposition import PCA, KernelPCA, FastICA


Expand Down Expand Up @@ -88,6 +89,12 @@ def execute_decomposition_method(
**decomposition_args
)
two_dimensions = ica.fit_transform(data_matrix)
elif decomposition_method == "tsne":
tsne = TSNE(
n_components=n_of_dimentions,
**decomposition_args
)
two_dimensions = tsne.fit_transform(data_matrix)
else:
raise ValueError(
": The decomposition method ("
Expand Down
Loading

0 comments on commit 667e311

Please sign in to comment.