This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Code snippet written by Davide Chicco <davidechicco@davidechicco.it> on 25th March 2026 | |
| # Tested on Linux Xubuntu 24.04.4 LTS with Python 3.11.9 | |
| # | |
| import subprocess | |
| import sys | |
| import time # <-- Added for timing | |
| # --- Upgrade pip --- | |
| bash_command = sys.executable + " -m pip install --upgrade pip" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Code snippet written by Davide Chicco <davidechicco@davidechicco.it> on 25th March 2026 | |
| # Tested on Linux Xubuntu 24.04.4 LTS with Python 3.11.9 | |
| # | |
| import subprocess | |
| import sys | |
| import time # <-- Added for timing | |
| # --- Upgrade pip --- | |
| bash_command = sys.executable + " -m pip install --upgrade pip" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| import dbcv | |
| data_file_name = 'DB1.csv' | |
| df = pd.read_csv(data_file_name, header = None) | |
| print("data file name read: ", data_file_name) | |
| clusters_file_name = '../Labels/DB1_786.txt' | |
| clusters = pd.read_csv(clusters_file_name, header = None) | |
| clusters.columns = ['cluster'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Piece of Python code developed by Davide Chicco on 17th November 2024 | |
| # developed for Python 3.11 on Linux Xubuntu 22 | |
| # released with creative commons license | |
| # contact: davidechicco@davidechicco.it | |
| import numpy as np | |
| from permetrics import ClusteringMetric | |
| from dbcv import dbcv | |