Skip to content

Commit 79ae0c0

Browse files
committed
Updated dependencies and README.
1 parent 7069b60 commit 79ae0c0

File tree

10 files changed

+34
-177
lines changed

10 files changed

+34
-177
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# notebooks/results/
33

44
.venv/
5+
.torchsom_env/
56
*.egg-info/
67
__pycache__/
78
setup.py

README.md

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ It provides an efficient and scalable implementation of **Self-Organizing Maps (
3737
**TorchSOM** is a PyTorch-based library for training Self-Organizing Maps (SOMs), a type of unsupervised learning algorithm used for clustering and dimensionality reduction. Designed for scalability and ease of use, this implementation is optimized for large-scale data.
3838

3939
Also, this **repository is highly documented and commented**, which makes it easy to use, understand, deploy, and which offers endless possibilities for improvements.
40-
To help you explore and experiment with **TorchSOM**, we provide Jupyter notebooks in the [`notebooks/`](notebooks) directory. There are multiples datasets and the corresponding results respectively in the [`data/`](data) and [`notebooks/results/`](notebooks/results) directories.
40+
To help you explore and experiment with **TorchSOM**, we provide Jupyter notebooks in the [`notebooks/`](notebooks) directory. There are multiples datasets and the corresponding results respectively in the [`data/`](data) and [`results/`](notebooks/results) directories.
4141
- [`iris.ipynb`](notebooks/iris.ipynb): A multiclass classification example.
4242
- [`wine.ipynb`](notebooks/wine.ipynb): Another multiclass classification example.
4343
- [`boston_housing.ipynb`](notebooks/boston_housing.ipynb): A regression example.
@@ -50,37 +50,26 @@ If you find this project interesting, we would be grateful for your support by s
5050

5151
## Installation
5252

53-
You can install the package using pip following this command (not available yet):
53+
You can install the package using PyPI (not available yet):
5454

5555
```bash
56-
pip install torchsom # Requires the dependencies from the requirements.txt file
56+
pip install torchsom
5757
```
5858

59-
If you want to use the latest version, or if you prefer the command line interface, you can use it locally by cloning or forking this repository to your local machine. TorchSOM requires a recent version of Python, preferably **3.11 or higher**.
59+
If you want to use the latest version, or if you prefer the command line interface, you can use it locally by cloning or forking this repository to your local machine. TorchSOM requires a recent version of Python, preferably **3.9 or higher**.
6060

6161
```bash
62-
git clone https://github.com/LouisTier/TorchSOM.git # Retrieve the GitHub repository
62+
git clone https://github.com/LouisTier/TorchSOM.git
6363
```
6464

6565
If you want to develop the package and run the notebooks after cloning the repository, make sure you have the required dependencies installed before using it:
6666

6767
```bash
68-
python3.11 -m venv .torchsom_env # Create a virtual environment
68+
python3.9 -m venv .torchsom_env # Create a virtual environment
6969
source .torchsom_env/bin/activate # Activate the environment
70-
pip install -r dev-requirements.txt # Install the required dependencies
71-
pip install -e . # Install the torchsom package
70+
pip install -e '.[dev]' # Install the required dependencies
7271
```
7372

74-
You can also run:
75-
76-
```bash
77-
pip install . # Install the required dependencies from setup.py
78-
pip install .[dev] # Install the required dependencies from setup.py and "extras_require"
79-
```
80-
81-
[`requirements.txt`](requirements.txt) stands for the dependencies that are required when importing `torchsom`.
82-
[`dev-requirements.txt`](dev-requirements.txt) stands for the dependencies that are required when cloning the GitHub repository and developing the `torchsom` package or running `notebooks`.
83-
8473

8574

8675
<!-- ## Documentation

dev-requirements.txt

Lines changed: 0 additions & 81 deletions
This file was deleted.

notebooks/boston_housing.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
}
163163
],
164164
"conversionMethod": "pd.DataFrame",
165-
"ref": "e138cdf3-e814-44aa-9e6f-8d7ac31913a4",
165+
"ref": "3a51b819-7b96-445f-85f6-d9a67a05b5cf",
166166
"rows": [
167167
[
168168
"0",
@@ -491,7 +491,7 @@
491491
}
492492
],
493493
"conversionMethod": "pd.DataFrame",
494-
"ref": "42a0e774-c2c9-4d76-81a6-e4270650b92c",
494+
"ref": "1bd00c2f-a6fe-468a-b5f8-38eaa6322c66",
495495
"rows": [
496496
[
497497
"count",
@@ -994,7 +994,7 @@
994994
"name": "stderr",
995995
"output_type": "stream",
996996
"text": [
997-
"Training SOM: 100%|██████████| 125/125 [00:42<00:00, 2.92epoch/s]\n"
997+
"Training SOM: 100%|██████████| 125/125 [00:12<00:00, 9.85epoch/s]\n"
998998
]
999999
}
10001000
],
@@ -1249,7 +1249,7 @@
12491249
],
12501250
"metadata": {
12511251
"kernelspec": {
1252-
"display_name": ".venv_sensing",
1252+
"display_name": ".torchsom_env",
12531253
"language": "python",
12541254
"name": "python3"
12551255
},

notebooks/energy_efficiency.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
}
143143
],
144144
"conversionMethod": "pd.DataFrame",
145-
"ref": "54803c65-4d2d-4883-b314-b77097128e09",
145+
"ref": "98fdc7e8-56e2-4928-a0d1-00275e84d24e",
146146
"rows": [
147147
[
148148
"0",
@@ -414,7 +414,7 @@
414414
}
415415
],
416416
"conversionMethod": "pd.DataFrame",
417-
"ref": "8ac4cc70-224d-4091-838e-ebaeee192468",
417+
"ref": "21b91459-5c37-48c9-a391-529e734cadf4",
418418
"rows": [
419419
[
420420
"count",
@@ -849,7 +849,7 @@
849849
"name": "stderr",
850850
"output_type": "stream",
851851
"text": [
852-
"Training SOM: 100%|██████████| 125/125 [00:42<00:00, 2.97epoch/s]\n"
852+
"Training SOM: 100%|██████████| 125/125 [00:12<00:00, 9.92epoch/s]\n"
853853
]
854854
}
855855
],
@@ -1190,7 +1190,7 @@
11901190
],
11911191
"metadata": {
11921192
"kernelspec": {
1193-
"display_name": ".venv_sensing",
1193+
"display_name": ".torchsom_env",
11941194
"language": "python",
11951195
"name": "python3"
11961196
},

notebooks/get_data.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
}
8686
],
8787
"conversionMethod": "pd.DataFrame",
88-
"ref": "d0faae81-278f-437c-b591-e026c1ba1dc3",
88+
"ref": "3cd60923-0262-4b10-8624-dc93997c19b0",
8989
"rows": [
9090
[
9191
"0",
@@ -354,7 +354,7 @@
354354
}
355355
],
356356
"conversionMethod": "pd.DataFrame",
357-
"ref": "9cc9cc09-3d25-4638-8e63-cd0b40cf6c43",
357+
"ref": "1a16edbe-3326-41df-aa91-5808d9d2488b",
358358
"rows": [
359359
[
360360
"0",
@@ -725,7 +725,7 @@
725725
}
726726
],
727727
"conversionMethod": "pd.DataFrame",
728-
"ref": "ed93ed99-da8b-44ad-af06-e022105e2e13",
728+
"ref": "bc465952-3d53-458c-908b-b18a08720806",
729729
"rows": [
730730
[
731731
"0",
@@ -1075,7 +1075,7 @@
10751075
}
10761076
],
10771077
"conversionMethod": "pd.DataFrame",
1078-
"ref": "1d671c62-5e61-4c9e-9aff-79e102940319",
1078+
"ref": "e2b7ad4f-e7fe-490d-9360-57d4bfb00be3",
10791079
"rows": [
10801080
[
10811081
"0",
@@ -1293,7 +1293,7 @@
12931293
],
12941294
"metadata": {
12951295
"kernelspec": {
1296-
"display_name": ".venv_sensing",
1296+
"display_name": ".torchsom_env",
12971297
"language": "python",
12981298
"name": "python3"
12991299
},

notebooks/iris.ipynb

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
}
134134
],
135135
"conversionMethod": "pd.DataFrame",
136-
"ref": "337885f5-c2ae-4187-b5d4-81cb39680b47",
136+
"ref": "9b6ae288-5e88-43d2-8dd4-be55df78a08a",
137137
"rows": [
138138
[
139139
"0",
@@ -311,7 +311,7 @@
311311
}
312312
],
313313
"conversionMethod": "pd.DataFrame",
314-
"ref": "eaaf9bfb-c28a-4322-9401-1066d0f72e48",
314+
"ref": "cdc7f381-9c1a-4ca7-ad2e-0060b2525861",
315315
"rows": [
316316
[
317317
"count",
@@ -629,14 +629,7 @@
629629
"name": "stderr",
630630
"output_type": "stream",
631631
"text": [
632-
"Training SOM: 0%| | 0/100 [00:00<?, ?epoch/s]"
633-
]
634-
},
635-
{
636-
"name": "stderr",
637-
"output_type": "stream",
638-
"text": [
639-
"Training SOM: 100%|██████████| 100/100 [00:08<00:00, 12.06epoch/s]\n"
632+
"Training SOM: 100%|██████████| 100/100 [00:01<00:00, 75.45epoch/s]\n"
640633
]
641634
}
642635
],
@@ -726,7 +719,7 @@
726719
},
727720
{
728721
"cell_type": "code",
729-
"execution_count": 23,
722+
"execution_count": 20,
730723
"metadata": {},
731724
"outputs": [],
732725
"source": [
@@ -774,7 +767,7 @@
774767
},
775768
{
776769
"cell_type": "code",
777-
"execution_count": 24,
770+
"execution_count": 21,
778771
"metadata": {},
779772
"outputs": [],
780773
"source": [
@@ -794,7 +787,7 @@
794787
},
795788
{
796789
"cell_type": "code",
797-
"execution_count": 25,
790+
"execution_count": 22,
798791
"metadata": {},
799792
"outputs": [
800793
{
@@ -824,7 +817,7 @@
824817
},
825818
{
826819
"cell_type": "code",
827-
"execution_count": 26,
820+
"execution_count": 23,
828821
"metadata": {},
829822
"outputs": [
830823
{
@@ -852,7 +845,7 @@
852845
],
853846
"metadata": {
854847
"kernelspec": {
855-
"display_name": ".venv",
848+
"display_name": ".torchsom_env",
856849
"language": "python",
857850
"name": "python3"
858851
},

notebooks/wine.ipynb

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
}
167167
],
168168
"conversionMethod": "pd.DataFrame",
169-
"ref": "b1c02221-fa87-4177-a697-a36be67e0a6a",
169+
"ref": "710f77c1-343e-450c-9b86-e6ea52d92357",
170170
"rows": [
171171
[
172172
"0",
@@ -502,7 +502,7 @@
502502
}
503503
],
504504
"conversionMethod": "pd.DataFrame",
505-
"ref": "cebf9ebc-1ab1-4f91-9ac9-329a1c4c71b7",
505+
"ref": "b2258ad3-e0eb-4f76-b25b-10e63db90d1f",
506506
"rows": [
507507
[
508508
"count",
@@ -1015,14 +1015,7 @@
10151015
"name": "stderr",
10161016
"output_type": "stream",
10171017
"text": [
1018-
"Training SOM: 5%|▌ | 5/100 [00:00<00:05, 17.79epoch/s]"
1019-
]
1020-
},
1021-
{
1022-
"name": "stderr",
1023-
"output_type": "stream",
1024-
"text": [
1025-
"Training SOM: 100%|██████████| 100/100 [00:06<00:00, 16.15epoch/s]\n"
1018+
"Training SOM: 100%|██████████| 100/100 [00:02<00:00, 44.87epoch/s]\n"
10261019
]
10271020
}
10281021
],
@@ -1238,7 +1231,7 @@
12381231
],
12391232
"metadata": {
12401233
"kernelspec": {
1241-
"display_name": ".venv_sensing",
1234+
"display_name": ".torchsom_env",
12421235
"language": "python",
12431236
"name": "python3"
12441237
},

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ include = ["torchsom*"] # Include packages matching this pattern
5757
dev = [
5858
"pandas",
5959
"scikit-learn",
60-
"warnings",
60+
"openpyxl",
6161
"black",
6262
"isort",
6363
"rich",

0 commit comments

Comments
 (0)